{"assets":[{"original":"http:\/\/www.ludumdare.com\/compo\/wp-content\/uploads\/2013\/02\/pXUc2hB-550x452.png","local":"\/data\/posts\/2013\/02\/096b1ba27495fd1853242559e2e92bb7.png"},{"original":"http:\/\/www.ludumdare.com\/compo\/wp-content\/uploads\/2013\/02\/Dvc0GEu-550x448.png","local":"\/data\/posts\/2013\/02\/60a8a870880306fc89234ffbeb02942f.png"},{"original":"http:\/\/www.ludumdare.com\/compo\/wp-content\/uploads\/2013\/02\/klbyui0-550x355.png","local":"\/data\/posts\/2013\/02\/afa8051d7f80f82540859c5262a8bfc7.png"}],"author_link":"author\/31eee384\/","author_name":"the31","cat":"LD #25","categories":["LD #25"],"comments":[],"epoch":1361097660,"event":"LD25","likes":3,"metadata":{"p_key":"80045","p_author":"the31","p_authorkey":"0","p_urlkey":"289055","p_title":"LD25: A delayed retrospective","p_cat":"LD #25","p_event":"LD25","p_time":"1361097660","p_likes":"3","p_comments":"0","p_status":"WAYBACK","us_key":null,"us_name":null,"us_username":null,"event_start":"1355443200","event_key":"14","event_name":"LD25"},"source_url":"2013\/02\/17\/ld25-a-delayed-retrospective\/","text":"<p>For LD25, I tried using Unity for the first time. Well, that\u2019s not quite true\u2013I had tried using it a few times before, but never got anything done. As a programmer, the seemingly content-oriented interface threw me off, so before LD25 I read a lot of documentation to ensure I knew what Unity is all about.<\/p>\n<div class=\"wp-caption aligncenter\" id=\"attachment_221680\" style=\"width: 560px\"><a href=\"http:\/\/www.ludumdare.com\/compo\/wp-content\/uploads\/2013\/02\/pXUc2hB.png\"><img alt=\"Where's the code?\" class=\"size-large wp-image-221680\" height=\"452\" sizes=\"(max-width: 550px) 100vw, 550px\" src=\"\/data\/posts\/2013\/02\/096b1ba27495fd1853242559e2e92bb7.png\" srcset=\"http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2013\/02\/pXUc2hB-300x246.png 300w, http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2013\/02\/pXUc2hB-550x452.png 550w, http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2013\/02\/pXUc2hB.png 1101w\" width=\"550\"\/><\/a><p class=\"wp-caption-text\">Where\u2019s the code?<\/p><\/div>\n<p><span id=\"more-221587\"><\/span><\/p>\n<p>So, what did I learn about Unity while making my game, <a href=\"http:\/\/www.ludumdare.com\/compo\/ludum-dare-25\/?action=preview&amp;uid=1712\" title=\"Entropic\">Entropic<\/a>? Quite a bit, but in summary: Unity is awesome, it handles its component engine well, and I look forward to using it again in the future.<\/p>\n<p>I made a few odd design choices near the beginning that I\u2019d like to share, since the rest of the LD was the usual \u201cstarted off well, hit a major issue in the middle, almost jumped ship, but came around in the end and finished it off.\u201d<\/p>\n<p>Entropic is, at its roots, a space sim, and in science fiction space ships tend to have gravity independent of ship acceleration. If a starship starts spinning, actors typically just stumble around a bit.<\/p>\n<p>How is this accomplished in a constrained physics engine like Unity\u2019s while retaining physics-powered movement both inside and outside the ship? One way would be to have multiple physics worlds (aka spaces), one simulating the exterior and the other the interior\u2013but Unity only allows one world to exist. The next best thing are physics layers, which can be configured to only allow interaction between objects in the ship and objects outside the ship. Simple enough, and Unity makes this easy to configure.<\/p>\n<p>I then (too eagerly, in hindsight) decided to add scale into the problem. Ships move at much greater speeds and have much larger sizes than humans within a ship, so I thought it would be a good idea to scale down the \u201cspace\u201d world to account for potential accuracy issues. Easy enough, especially in Unity\u2013just turn down the scale on all the \u201cship exterior\u201d and \u201casteroid\u201d meshes, and it\u2019s done.<\/p>\n<div class=\"wp-caption aligncenter\" id=\"attachment_221684\" style=\"width: 560px\"><a href=\"http:\/\/www.ludumdare.com\/compo\/wp-content\/uploads\/2013\/02\/Dvc0GEu.png\"><img alt=\"It does look really weird, though. (I hid some of the ship bridge's walls to get this screenshot of both layers combined.)\" class=\"size-large wp-image-221684\" height=\"448\" sizes=\"(max-width: 550px) 100vw, 550px\" src=\"\/data\/posts\/2013\/02\/60a8a870880306fc89234ffbeb02942f.png\" srcset=\"http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2013\/02\/Dvc0GEu-300x244.png 300w, http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2013\/02\/Dvc0GEu-550x448.png 550w, http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2013\/02\/Dvc0GEu.png 911w\" width=\"550\"\/><\/a><p class=\"wp-caption-text\">It does look really weird, though. (I hid some of the ship bridge\u2019s walls to get this screenshot of both layers combined.)<\/p><\/div>\n<p>One problem that I had early on is that there was very little visibility on the bridge. On the Enterprise, that little screen was enough because they could tell is to look at anything around the ship\u2013with an equally-sized window on a ship, it\u2019s surprisingly hard to tell what\u2019s going on.<\/p>\n<div class=\"wp-caption aligncenter\" id=\"attachment_221685\" style=\"width: 560px\"><a href=\"http:\/\/www.ludumdare.com\/compo\/wp-content\/uploads\/2013\/02\/klbyui0.png\"><img alt='High visibility. The player can actually see \"out\" of the ship at almost any direction.' class=\"size-large wp-image-221685\" height=\"355\" sizes=\"(max-width: 550px) 100vw, 550px\" src=\"\/data\/posts\/2013\/02\/afa8051d7f80f82540859c5262a8bfc7.png\" srcset=\"http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2013\/02\/klbyui0-550x355.png 550w, http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2013\/02\/klbyui0.png 1136w\" width=\"550\"\/><\/a><p class=\"wp-caption-text\">High visibility. The player can actually see \u201cout\u201d of the bridge at almost any direction.<\/p><\/div>\n<p>To make the field of view much higher, I decided to apply an idea I had been holding onto for a while. By playing with the depth buffer a bit, I made some surfaces that hide the parts of the ship behind it. This dramatically improves visibility, and is also cool since it creates the effect of having an \u201cimpossible geometry.\u201d (My explanation is that the ship is covered with tiny cameras that capture the state of the ship\u2019s exterior, then display on interior screen-panels what the system extrapolates you would see from that point.)<\/p>\n<div class=\"wp-caption aligncenter\" id=\"attachment_221689\" style=\"width: 560px\"><a href=\"http:\/\/www.ludumdare.com\/compo\/wp-content\/uploads\/2013\/02\/9NLAiVT.png\"><img alt=\"It's bigger on the inside.\" class=\"size-large wp-image-221689\" height=\"408\" sizes=\"(max-width: 550px) 100vw, 550px\" src=\"http:\/\/www.ludumdare.com\/compo\/wp-content\/uploads\/2013\/02\/9NLAiVT-550x408.png\" srcset=\"http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2013\/02\/9NLAiVT-300x222.png 300w, http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2013\/02\/9NLAiVT-550x408.png 550w, http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2013\/02\/9NLAiVT.png 980w\" width=\"550\"\/><\/a><p class=\"wp-caption-text\">It\u2019s bigger on the inside.<\/p><\/div>\n<p>With some more advanced ship designs, I think that could get really cool, really quick. (Battle bridge, anyone?)<\/p>\n<p>One thing that made this effect much weaker is the cloudy effect I had to use to represent the volume of the ship. They look somewhat like stars, and it is a little weird that they form a box around the ship. This is meant to represent the volume of your craft, since you don\u2019t have any other reference with the fancy windows active. Need to find a few artists for the next time I do something like this, so it doesn\u2019t confuse.<\/p>\n<p>Overall, I\u2019m happy with how it turned out, although as a game the project was sorely lacking. For the next LD I\u2019ll avoid ideas that need fancy but non-value-adding programming. I hope. It\u2019s hard to resist a challenge.<\/p>","time":"February 17th, 2013 10:41 am","title":"LD25: A delayed retrospective","title_was_empty":false}