{"id":323,"date":"2016-06-23T13:03:56","date_gmt":"2016-06-23T12:03:56","guid":{"rendered":"http:\/\/blogs.kent.ac.uk\/psychotech\/?p=323"},"modified":"2016-06-23T13:04:22","modified_gmt":"2016-06-23T12:04:22","slug":"game-frameworks-for-experimental-development","status":"publish","type":"post","link":"https:\/\/blogs.kent.ac.uk\/hsstech\/2016\/06\/23\/game-frameworks-for-experimental-development\/","title":{"rendered":"Game frameworks for experimental development?"},"content":{"rendered":"<p>There have been a few requests and rumblings recently about using games as a way of presenting experiments. \u00a0Last year, we developed a simple pairs matching game in PsychoPy, which played a standard game of pairs &#8211; but with reaction times and sequence of correct answers recorded in a separate data file.<\/p>\n<p>One of our units within the School has expressed an interest in simple games for children, which record reaction times and correct responses. \u00a0 In most cases, the beauty of PsychoPy and being based in Python, is that we can make use of various game related libraries with the experimental API&#8217;s from PsychoPy.<\/p>\n<p>Occasionally though, there may be a need to create a game which is either available to play on a mobile device or over the internet, so we decided to briefly investigate some game frameworks in our self development time, so that we are aware of the options if such a project comes up. \u00a0Here are some that we looked at:<\/p>\n<p><strong><a href=\"https:\/\/github.com\/Fiona\/Myrmidon\">Myrmidon<\/a><\/strong><\/p>\n<p>From last year&#8217;s PyCon, we took part in a 1 day event looking at a game framework called Myrmidon &#8211; which is Python based. \u00a0All code has to be written in a text editor, with no GUI interface &#8211; and due to being in the early stages of development, working out how the system worked was done by looking at code examples and going through the main engine code itself. \u00a0After not too long, we managed to get a basic Asteroids clone working, showing the potential of the framework. \u00a0 \u00a0The experience was useful also in going through the process of creating a game, where you essentially start with a &#8220;loop&#8221; which goes round and round, runs a sequence of events and waits for user input. \u00a0 One of the benefits of the framework and using Python, is that it should be suitable to compile and run on a desktop PC, \u00a0Mac, \u00a0iPhone, \u00a0Android if required &#8211; though the documentation at this early stage was lacking on how to achieve this properly.<\/p>\n<p><strong><a href=\"http:\/\/www.yoyogames.com\/gamemaker\">Gamemaker studio<\/a><\/strong><\/p>\n<p><a href=\"http:\/\/blogs.kent.ac.uk\/psychotech\/files\/2016\/06\/game2.png\"><img loading=\"lazy\" class=\"size-medium wp-image-325 alignleft\" src=\"http:\/\/blogs.kent.ac.uk\/psychotech\/files\/2016\/06\/game2-300x225.png\" alt=\"game2\" width=\"300\" height=\"225\" srcset=\"https:\/\/blogs.kent.ac.uk\/hsstech\/files\/2016\/06\/game2-300x225.png 300w, https:\/\/blogs.kent.ac.uk\/hsstech\/files\/2016\/06\/game2-768x577.png 768w, https:\/\/blogs.kent.ac.uk\/hsstech\/files\/2016\/06\/game2-1024x769.png 1024w, https:\/\/blogs.kent.ac.uk\/hsstech\/files\/2016\/06\/game2.png 1027w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>Next up we looked at a full game development studio, in the shape of Gamemaker Studio &#8211; which has a free option that you can download to try out.<\/p>\n<p>Like with PsychoPy, you can either develop via a graphical user interface, or via a code view if you want to jump straight in. \u00a0The language is its own internal language, but the syntax is very similar to PHP and can be picked up quickly.<\/p>\n<p>This time, the documentation and online support is a lot more vast, and there are many tutorials to get you started for creating your own game. \u00a0 Within an hour, we had a very simple game running where you had to click onto a clown object, which moved faster and faster each time.<\/p>\n<p>With the fully paid option (which comes with a discount for educational institutions!), there are modules which you can purchase and install which allow easy export to different platforms &#8211; without really having to write any code or ensure libraries are correctly imported.<\/p>\n<p><strong><a href=\"http:\/\/phaser.io\/\">Phaser<\/a><\/strong><\/p>\n<p><a href=\"http:\/\/blogs.kent.ac.uk\/psychotech\/files\/2016\/06\/game3.png\"><img loading=\"lazy\" class=\"size-medium wp-image-326 alignright\" src=\"http:\/\/blogs.kent.ac.uk\/psychotech\/files\/2016\/06\/game3-300x225.png\" alt=\"game3\" width=\"300\" height=\"225\" srcset=\"https:\/\/blogs.kent.ac.uk\/hsstech\/files\/2016\/06\/game3-300x225.png 300w, https:\/\/blogs.kent.ac.uk\/hsstech\/files\/2016\/06\/game3-768x576.png 768w, https:\/\/blogs.kent.ac.uk\/hsstech\/files\/2016\/06\/game3.png 800w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>Then finally, to complete a range of different product types &#8211; there was some time spent looking at frameworks which were build specifically to develop HTML5 based games. \u00a0 The introduction of <a href=\"http:\/\/www.w3schools.com\/html\/html5_intro.asp\">HTML5<\/a> and CSS3 has helped to push a new wave of online application\/game development &#8211; thanks to the new HTML5 canvas tag.<\/p>\n<p>Some companies are starting to lean more and more towards using the technology, as it enables software to be developed which will essentially run on most platforms &#8211; without custom deployments at a simple level. \u00a0 There were many frameworks out there to choose from, but we found Phaser (a JavaScript library), which had a lot of on-line support and tutorials.<\/p>\n<p>Running through one of the tutorials had us set up with a quick and simple platform game, within only an hour or so. \u00a0Phaser looks appealing in particular, due to its support of a useful layout\/map tool called &#8211; <a href=\"http:\/\/www.mapeditor.org\/\">Tiled<\/a>, which outputs map definitions in a JSON format (which could be re-used in other libraries too).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There have been a few requests and rumblings recently about using games as a way of presenting experiments. \u00a0Last year, we developed a simple pairs &hellip; <a href=\"https:\/\/blogs.kent.ac.uk\/hsstech\/2016\/06\/23\/game-frameworks-for-experimental-development\/\">Read&nbsp;more<\/a><\/p>\n","protected":false},"author":18,"featured_media":324,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[16561],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.kent.ac.uk\/hsstech\/wp-json\/wp\/v2\/posts\/323"}],"collection":[{"href":"https:\/\/blogs.kent.ac.uk\/hsstech\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.kent.ac.uk\/hsstech\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.kent.ac.uk\/hsstech\/wp-json\/wp\/v2\/users\/18"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.kent.ac.uk\/hsstech\/wp-json\/wp\/v2\/comments?post=323"}],"version-history":[{"count":2,"href":"https:\/\/blogs.kent.ac.uk\/hsstech\/wp-json\/wp\/v2\/posts\/323\/revisions"}],"predecessor-version":[{"id":328,"href":"https:\/\/blogs.kent.ac.uk\/hsstech\/wp-json\/wp\/v2\/posts\/323\/revisions\/328"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blogs.kent.ac.uk\/hsstech\/wp-json\/wp\/v2\/media\/324"}],"wp:attachment":[{"href":"https:\/\/blogs.kent.ac.uk\/hsstech\/wp-json\/wp\/v2\/media?parent=323"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.kent.ac.uk\/hsstech\/wp-json\/wp\/v2\/categories?post=323"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.kent.ac.uk\/hsstech\/wp-json\/wp\/v2\/tags?post=323"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}