{"id":2897,"date":"2020-04-12T16:01:36","date_gmt":"2020-04-12T16:01:36","guid":{"rendered":"http:\/\/www.papystampy.com\/?p=2897"},"modified":"2020-04-12T16:01:36","modified_gmt":"2020-04-12T16:01:36","slug":"papy-stampy-is-finally-back","status":"publish","type":"post","link":"http:\/\/www.papystampy.com\/?p=2897","title":{"rendered":"Papy Stampy is finally back"},"content":{"rendered":"<p>Hi,<\/p>\n<p>I&#8217;m back working on Papy Stampy after more than 3 years. After so much time, it&#8217;s not so easy to be efficient again.\u00a0Today I&#8217;ll tell you all the methods used to start again with a clean slate.<\/p>\n<h2>Reproducible dev environment<\/h2>\n<p>Papy Stampy and the game editors are stored in Github. But they do not contain all the prerequisites needed to start working (ideally a repository manager shall be used):<\/p>\n<ul>\n<li>Java<\/li>\n<li>Eclipse<\/li>\n<li>Eclipse plugins (e.g. ADT)<\/li>\n<li>Android SDK,<\/li>\n<li>&#8230;<\/li>\n<\/ul>\n<p>All those prerequisites were not documented at all. As I was planning to develop on a new computer, I needed to setup my new dev environment with everything.<\/p>\n<p>The first step was therefore to retrieve all those prerequisites on Internet and to document all the steps needed to install them and configure the dev environment.<\/p>\n<p>Of course, some versions of those libraries were outdated. Therefore each project also needed to be adapted to the new versions.<\/p>\n<h2>Game design document<\/h2>\n<p>After so many years, it was hard for me to remember all the game mechanics and all the level design technics that were available. I spent some time documenting as many technics as possible in the <em>Game Design Document (<\/em><em>The Game Design Document (GDD) is a Markdown file that I can access direcly on Github).<\/em><\/p>\n<p>This was achieved by making video captures of those mechanics during gameplay and by adding animated gifs of those mechanics in the GDD. The GDD also reminds how to implement the mechanics in the Level editor.<\/p>\n<p><center><br \/>\n<a href=\"http:\/\/www.papystampy.com\/wp-content\/uploads\/2020\/04\/level_mechanics.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2909\" alt=\"level_mechanics\" src=\"http:\/\/www.papystampy.com\/wp-content\/uploads\/2020\/04\/level_mechanics.gif\" width=\"900\" height=\"514\" \/><\/a><br \/>\n<i>Level mechanics in the GDD<\/i><\/center><\/p>\n<h2>Reusable level subsets<\/h2>\n<p>The next step was to dig existing levels looking for the elements and patterns that could be reused in new levels. The Level Editor allows to import and export level subsets; called level subgraphs. Making a <em>library of level subgraphs<\/em> will allow me later to\u00a0 more easily create coherent levels.<\/p>\n<p>All the subgraphs were also documented in the GDD so that I can later remember all the available subgraphs.<\/p>\n<p><center><br \/>\n<a href=\"http:\/\/www.papystampy.com\/wp-content\/uploads\/2020\/04\/level_subgraphs.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2908\" alt=\"level_subgraphs\" src=\"http:\/\/www.papystampy.com\/wp-content\/uploads\/2020\/04\/level_subgraphs.gif\" width=\"900\" height=\"514\" \/><\/a><br \/>\n<i>Level subgraphs in the GDD<\/i><\/center><\/p>\n<h2>Prepare for fast iteration on game levels<\/h2>\n<p>Finally, I wanted to improve level design iterations . The legacy workflow was :<\/p>\n<ul>\n<li>to modify a level in the level editor<\/li>\n<li>to copy the level and new textures in the Android game asset directory<\/li>\n<li>to build the game<\/li>\n<li>to deploy the game on a smartphone, connected in USB<\/li>\n<li>and finally to test the level<\/li>\n<\/ul>\n<p>This workflow works but it is quite long.\u00a0A more efficient workflow is to remove the need to update and rebuild the Android application. This is achieved by :<\/p>\n<ul>\n<li>running a web server that serves the level and textures directly from the Editor directory<\/li>\n<li>Adding the possibility for the Android Application to load the level and textures from an HTTP URL<\/li>\n<\/ul>\n<p>As a result, whenever the level is modified, I simply need to launch the HTTP debug level from the unmodified application<\/p>\n<p>&nbsp;<\/p>\n<p>I first added a debug HTTP level in the game level list<\/p>\n<p><center><br \/>\n<a href=\"http:\/\/www.papystampy.com\/wp-content\/uploads\/2020\/04\/http_level_description.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2906\" alt=\"http_level_description\" src=\"http:\/\/www.papystampy.com\/wp-content\/uploads\/2020\/04\/http_level_description.png\" width=\"1206\" height=\"413\" srcset=\"http:\/\/www.papystampy.com\/wp-content\/uploads\/2020\/04\/http_level_description.png 1206w, http:\/\/www.papystampy.com\/wp-content\/uploads\/2020\/04\/http_level_description-300x102.png 300w, http:\/\/www.papystampy.com\/wp-content\/uploads\/2020\/04\/http_level_description-1024x350.png 1024w\" sizes=\"auto, (max-width: 1206px) 100vw, 1206px\" \/><\/a><br \/>\n<i>Debug HTTP level in the Android game<\/i><\/center>The Debug level is available in the application<\/p>\n<p><center><br \/>\n<a href=\"http:\/\/www.papystampy.com\/wp-content\/uploads\/2020\/04\/http_level.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2905\" alt=\"http_level\" src=\"http:\/\/www.papystampy.com\/wp-content\/uploads\/2020\/04\/http_level.jpg\" width=\"1920\" height=\"1080\" srcset=\"http:\/\/www.papystampy.com\/wp-content\/uploads\/2020\/04\/http_level.jpg 1920w, http:\/\/www.papystampy.com\/wp-content\/uploads\/2020\/04\/http_level-300x168.jpg 300w, http:\/\/www.papystampy.com\/wp-content\/uploads\/2020\/04\/http_level-1024x576.jpg 1024w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><\/a><br \/>\n<i>Debug HTTP level that loads assets from the web server running on the dev computer<\/i><\/center>When launching the level, the assets are loaded from the HTTP server running on the dev PC<\/p>\n<p><center><br \/>\n<a href=\"http:\/\/www.papystampy.com\/wp-content\/uploads\/2020\/04\/http_server_loading_assets.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2904\" alt=\"http_server_loading_assets\" src=\"http:\/\/www.papystampy.com\/wp-content\/uploads\/2020\/04\/http_server_loading_assets.png\" width=\"1834\" height=\"1151\" srcset=\"http:\/\/www.papystampy.com\/wp-content\/uploads\/2020\/04\/http_server_loading_assets.png 1834w, http:\/\/www.papystampy.com\/wp-content\/uploads\/2020\/04\/http_server_loading_assets-300x188.png 300w, http:\/\/www.papystampy.com\/wp-content\/uploads\/2020\/04\/http_server_loading_assets-1024x642.png 1024w\" sizes=\"auto, (max-width: 1834px) 100vw, 1834px\" \/><\/a><\/center><\/p>\n<p style=\"text-align: center;\"><i>HTTP server serving the assets<\/i><\/p>\n<p>&nbsp;<\/p>\n<p>That\u2019s it for today!<\/p>\n<p>Stay tunned,<br \/>\nNoxis<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi, I&#8217;m back working on Papy Stampy after more than 3 years. After so much time, it&#8217;s not so easy to be efficient again.\u00a0Today I&#8217;ll tell you all the methods used to start again with a clean slate. Reproducible dev environment Papy Stampy and the game editors are stored in Github. But they do not<\/p>\n<p><a class=\"read-more\" href=\"http:\/\/www.papystampy.com\/?p=2897\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2897","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"http:\/\/www.papystampy.com\/index.php?rest_route=\/wp\/v2\/posts\/2897","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.papystampy.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.papystampy.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.papystampy.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.papystampy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2897"}],"version-history":[{"count":30,"href":"http:\/\/www.papystampy.com\/index.php?rest_route=\/wp\/v2\/posts\/2897\/revisions"}],"predecessor-version":[{"id":2932,"href":"http:\/\/www.papystampy.com\/index.php?rest_route=\/wp\/v2\/posts\/2897\/revisions\/2932"}],"wp:attachment":[{"href":"http:\/\/www.papystampy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2897"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.papystampy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2897"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.papystampy.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2897"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}