{"id":681,"date":"2017-01-01T10:36:27","date_gmt":"2017-01-01T18:36:27","guid":{"rendered":"https:\/\/jacksontech.net\/?p=681"},"modified":"2017-01-01T10:37:04","modified_gmt":"2017-01-01T18:37:04","slug":"furry-octo-pancake-postmortem","status":"publish","type":"post","link":"https:\/\/jacksontech.net\/index.php\/2017\/01\/furry-octo-pancake-postmortem\/","title":{"rendered":"Furry Octo Pancake &#8211; Postmortem"},"content":{"rendered":"<p><a href=\"https:\/\/jacksontech.net\/index.php\/furry-octo-pancake-eight-day-vr-game-project\/\">With the upload of the .apk file<\/a>, I consider this project &#8220;done&#8221;. (It&#8217;s not actually done, I&#8217;d like to expand it, but whatever.) Here&#8217;s some of my thoughts on the process of building the thing:<\/p>\n<h3>Bake EVERYTHING<\/h3>\n<p>Mobile phones are limited in their processing power. Realtime lights look awesome, but will bring a mobile phone to its knees. Just say no. But&#8230;<\/p>\n<h3>Don&#8217;t forget to factor in build times<\/h3>\n<p>&#8220;Hmm, I don&#8217;t like the way the lightmaps look. I know, I&#8217;ll just kick off a final compile and go to bed.&#8221; 27 hours later&#8230;<\/p>\n<p>Not good for estimating release dates.<\/p>\n<p>On a related note&#8230;<\/p>\n<h3>Do learn how to use your darn tools<\/h3>\n<p>I had the lightmap settings cranked up <em>way<\/em> too high for no good reason. Some tweaking brought the build down to a much more manageable 30 minutes or so.<\/p>\n<h3>Lots of different materials == rendering state changes == bad<\/h3>\n<p>One of the main problems with the game is that it lags terribly because of a high number of state changes and a high number of vertices. Even static batching didn&#8217;t help much. The problem is that 1) I&#8217;m using Unity&#8217;s built-in shaders and 2) I assigned multiple materials per mesh to make things like windows&#8230;and I made a ton of windows. In the future I&#8217;ll experiment with my own shaders and using some textures and\/or vertex colors to pull off different colored materials. On a similar note&#8230;<\/p>\n<h3>Using vertex displacement for undistortion looks interesting<\/h3>\n<p>I&#8217;m referring to Brian Kehrer&#8217;s excellent <a href=\"https:\/\/www.youtube.com\/watch?v=yJVkdsZc9YA\">talk on achieving smooth VR performance on older devices<\/a>. The gist of it is to use the vertex shader to correct for lens distortion by moving vertices around, instead of by using a more expensive render texture or postprocessing shader. I really wanted to implement this but did not have time. (As a side note, this is why some objects, like the bed, have way too many vertices&#8211;denser meshes is a requirement for this technique, but I went overboard, also contributing to the performance issue.)<\/p>\n<p>And finally&#8230;<\/p>\n<h3>Gamedev is hard work<\/h3>\n<p>I mean, this should be obvious, but the project reaffirmed my belief. The 2-5 minutes of gameplay, relatively unpolished and still a bit buggy (I&#8217;ll let my kind readers discover the bugs&#8211;yay using users as beta testers!), took over a week to produce. A large game title with hours and hours of content, lots of high quality textures, beautiful graphical effects, a custom soundtrack, animated models, etc etc etc, quickly becomes prohibitive for one person to produce. But it was still fun, and I&#8217;m up for another project in the future! Stay tuned.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>With the upload of the .apk file, I consider this project &#8220;done&#8221;. (It&#8217;s not actually done, I&#8217;d like to expand it, but whatever.) Here&#8217;s some of my thoughts on the process of building the thing: Bake EVERYTHING Mobile phones are limited in their processing power. Realtime lights look awesome, but will bring a mobile phone &#8230; <a class=\"moretag\" href=\"https:\/\/jacksontech.net\/index.php\/2017\/01\/furry-octo-pancake-postmortem\/\">more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[102,105,9,106],"tags":[110,103,108,107],"class_list":["post-681","post","type-post","status-publish","format-standard","hentry","category-game-dev","category-google-cardboard","category-projects","category-vr","tag-eight-day-game-project-1","tag-gamedev","tag-google-cardboard","tag-vr"],"_links":{"self":[{"href":"https:\/\/jacksontech.net\/index.php\/wp-json\/wp\/v2\/posts\/681","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jacksontech.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jacksontech.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jacksontech.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jacksontech.net\/index.php\/wp-json\/wp\/v2\/comments?post=681"}],"version-history":[{"count":1,"href":"https:\/\/jacksontech.net\/index.php\/wp-json\/wp\/v2\/posts\/681\/revisions"}],"predecessor-version":[{"id":683,"href":"https:\/\/jacksontech.net\/index.php\/wp-json\/wp\/v2\/posts\/681\/revisions\/683"}],"wp:attachment":[{"href":"https:\/\/jacksontech.net\/index.php\/wp-json\/wp\/v2\/media?parent=681"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jacksontech.net\/index.php\/wp-json\/wp\/v2\/categories?post=681"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jacksontech.net\/index.php\/wp-json\/wp\/v2\/tags?post=681"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}