{"author_name":"donaldducky","cat":"LD #28","comments":[],"epoch":1387582260,"likes":0,"metadata":{"p_key":"34167","p_author":"donaldducky","p_authorkey":"31430","p_urlkey":"69712","p_title":"Ludum Dare 28 part 3","p_cat":"LD #28","p_event":"LD28","p_time":"1387582260","p_likes":"0","p_comments":"0","p_status":"UPD5","us_key":"31430","us_name":"donaldducky","us_username":"donaldducky","event_start":"1386892800","event_key":"20","event_name":"LD28"},"text":"<p>This is the third part of my LD 28 experience. You can read the previous parts here: <a href=\"http:\/\/pyjamacoder.com\/2013\/12\/17\/ludum-dare\/\">part 1<\/a>, <a href=\"http:\/\/pyjamacoder.com\/2013\/12\/18\/ludum-dare-part-2\/\">part 2<\/a><\/p>\n <p>The actual entry is here: <a href=\"http:\/\/www.ludumdare.com\/compo\/ludum-dare-28\/?action=preview&amp;uid=31430\">Existence<\/a><br \/>\n The game is playable here: <a href=\"http:\/\/pyjamacoder.com\/ld28\/\">http:\/\/pyjamacoder.com\/ld28\/<\/a><\/p>\n <p>People on the <a href=\"http:\/\/www.ludumdare.com\/compo\/\">Ludum Dare<\/a> website seem to love doing these post mortem things.<\/p>\n <p>So, without further ado, here&#8217;s my post mortem on creating Existence.<\/p>\n <p><span id=\"more-325185\"><\/span><\/p>\n <h2>Preamble<\/h2>\n <p>I mentioned in the first post that I entered the compo on a spur of the moment decision, without any real preparation. This isn&#8217;t quite true. I&#8217;ve looked at creating a component entity system for a while now&#8230;I just haven&#8217;t had any success with it.<\/p>\n <h3>Tip 0: Be prepared<\/h3>\n <p>In reality, I&#8217;ve been thinking about how I wanted to set one up, which made it easier for me to get started. I&#8217;m also a developer in my day job, so I&#8217;m somewhat experienced with how to handle looming deadlines.<\/p>\n <p>Nevertheless, it was still a challenge.<\/p>\n <h2>My goal<\/h2>\n <p>I wanted to create a game from scratch, no matter how long or complex, just to see if I could do it.<\/p>\n <p>I&#8217;ve tried to create a game in the past, but for one reason or another, I lost interest. Most of the time it was because of something unrelated to the game itself or I would go down a rabbit hole trying to make something too&#8230;perfect.<\/p>\n <p>This was basically a way of testing my ability to cast aside some of my weaknesses and actually complete something.<\/p>\n <h2>The game engine<\/h2>\n <p><a href=\"http:\/\/www.ludumdare.com\/compo\/wp-content\/uploads\/2013\/12\/existence-fire.png\"><img class=\"alignnone size-medium wp-image-325187\" alt=\"Fire!\" src=\"http:\/\/www.ludumdare.com\/compo\/wp-content\/uploads\/2013\/12\/existence-fire-300x225.png\" width=\"300\" height=\"225\" srcset=\"http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2013\/12\/existence-fire-300x225.png 300w, http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2013\/12\/existence-fire-550x413.png 550w, http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2013\/12\/existence-fire.png 633w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n <p>Creating a game engine from scratch obviously puts me at a disadvantage compared to someone who uses something full featured like <a href=\"http:\/\/unity3d.com\/\">Unity<\/a>. It cost me time to create something that would do such basic things like running a game loop, parsing a sprite map, loading a map and drawing to a canvas.<\/p>\n <p>My engine couldn&#8217;t even play a sound or have a good way to load another screen. Heck, I couldn&#8217;t find a simple way to &#8216;reset&#8217; my game after playing it without having to resort to the web browser&#8217;s refresh feature. Although&#8230;that is exactly what the refresh button in a browser is supposed to do!<\/p>\n <p>Revelations like that are part of the reason I learned so much during this 48 hour development period. If you think about it, it&#8217;s basically the same as hitting the good ol RESET button on an NES.<\/p>\n <h3>Tip 1: Know your tools<\/h3>\n <p>As a web developer, refreshing the page or redirecting is the ultimate reset button. We don&#8217;t really like doing it but it&#8217;s there if needed. In a pinch, it works like a charm.<\/p>\n <p>Creating my own engine meant I knew what was possible at any given time. I wasn&#8217;t hit with any nasty surprises. I wasn&#8217;t restricted to doing things in a particular way. I knew where to extend it and didn&#8217;t really have to fight with it to see how something was &#8220;supposed&#8221; to be done.<\/p>\n <p>The drawback was that I had to create it. If I was proficient with some kind of framework, you better believe I would&#8217;ve used it \ud83d\ude00<\/p>\n <h2>The theme<\/h2>\n <p>I spent quite a bit of time on the game engine and didn&#8217;t think too much about the theme, at first. There was no point in spending all my time thinking about a concept when I couldn&#8217;t paint any pixels on the screen. As I finished some of the initial setup, things started to fall into place.<\/p>\n <h3>Tip 2: Don&#8217;t get sidetracked<\/h3>\n <p>As I started seeing what was possible, I focused my ideas on what could be done with the time left.<\/p>\n <p>For instance, I wanted to do something more than I had done on the final screen. But I didn&#8217;t even have an ending screen. In order to &#8216;finish&#8217; the game, it needed an ending screen, no matter how simple it was. The primary goal was to finish a game.<\/p>\n <p>I didn&#8217;t have a good way of displaying screens with the normal game loop, so I had to resort to some hackery. I&#8217;m not too proud of it but sometimes dirty things need to be done :p<\/p>\n <p>In the end, the theme had to do with having one &#8220;life&#8221;, which is so clich\u00e9 but at least it was achieved in a unique way (I think).<\/p>\n <h2>The game itself<\/h2>\n <p>I was very pleased with how it turned out.<\/p>\n <p>The game was only 3 screens, which doesn&#8217;t seem like much, but I was able to add some depth to it. I didn&#8217;t want the player going from screen to screen collecting &#8216;x&#8217; items or destroying &#8216;y&#8217; monsters. There wasn&#8217;t much of a story but each room gave you a sense of discovery and purpose.<\/p>\n <p>Here&#8217;s a (non-exhaustive) list of features:<\/p>\n <ul>\n <li>multiple maps (3) linked together<\/li>\n <li>action button to interact with characters and items<\/li>\n <li>multi directional shooting<\/li>\n <li>multiple weapons with different properties (wind, fire)<\/li>\n <li>weapon type immunities (you can burn down the world tree but wind doesn&#8217;t hurt it)<\/li>\n <li>npc ai scripts<\/li>\n <li>treasure chest (that tell you what was in it after you open it)<\/li>\n <li>dialogue<\/li>\n <li>damage animation (when you get hit, blood flies out)<\/li>\n <li>hp bars<\/li>\n <li>moving between screens saves the state (number of enemies, treasure, etc)<\/li>\n <li>multiple endings!<\/li>\n <\/ul>\n <p>All of this and the game is pretty smooth with no real bugs!<\/p>\n <p>Which brings me to my next lesson.<\/p>\n <h3>Tip 3: Practice!<\/h3>\n <p>I don&#8217;t create games (often) but I do develop a lot. I&#8217;ve learned a few techniques here and there and continually try to practice my skills.<\/p>\n <p>When you complete something, take the time to reflect upon it. Was there anything you didn&#8217;t like? What&#8217;s a better way of accomplishing what you&#8217;ve done? How have other people accomplished the same tasks?<\/p>\n <p>Do some research. The best way to learn is by reading about other people&#8217;s experiences and see how they do things.<\/p>\n <p>I couldn&#8217;t have gotten this far without all of the experience I&#8217;ve gained over the years and all of the valuable resources available. The internet is a gold mine of information.<\/p>\n <p>Speaking of resources, I also created a walkthrough and a guide of sorts for people to know what each character represented in the game. Judging by the comments, it proved useful to at least a few people, which makes it worth it.<\/p>\n <h2>Overall<\/h2>\n <p><a href=\"http:\/\/www.ludumdare.com\/compo\/wp-content\/uploads\/2013\/12\/existence-explosion.png\"><img class=\"alignnone size-medium wp-image-325189\" alt=\"Explosion!\" src=\"http:\/\/www.ludumdare.com\/compo\/wp-content\/uploads\/2013\/12\/existence-explosion-300x225.png\" width=\"300\" height=\"225\" srcset=\"http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2013\/12\/existence-explosion-300x225.png 300w, http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2013\/12\/existence-explosion-550x412.png 550w, http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2013\/12\/existence-explosion.png 637w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n <p>I would not change how any of this went. I was able to stay focused and complete my goal of creating a playable game, no matter how short it ended up being.<\/p>\n <p>I will probably enter future Ludum Dares because it was so enjoyable \ud83d\ude00<\/p>\n <p>I&#8217;ve already posted so much about my experience but I wanted to capture as much about it as I could.<\/p>\n <p>I have at least one more post in me about the actual game engine if anyone&#8217;s interested.<\/p>","time":"December 20th, 2013 6:31 pm","title":"Ludum Dare 28 part 3"}