{"author_name":"GFM","cat":"LD #30","comments":[],"epoch":1410817380,"likes":3,"metadata":{"p_key":"26187","p_author":"GFM","p_authorkey":"7375","p_urlkey":"61612","p_title":"The Nether \u2013 Post Mortem and timelapse","p_cat":"LD #30","p_event":"LD30","p_time":"1410817380","p_likes":"3","p_comments":"0","p_status":"UPD5","us_key":"7375","us_name":"GFM","us_username":"\/author\/gfm\/","event_start":"1408665600","event_key":"24","event_name":"LD30"},"text":"<p>The results will be out <del>tomorrow<\/del> in a few hours, and I&#8217;ve yet to write my post mortem&#8230; &gt;_&lt; Ok, let&#8217;s do this!<\/p>\n <p>(also, here&#8217;s my timelapse for this LD&#8217;s entry!)<\/p>\n <p><iframe width=\"500\" height=\"375\" src=\"https:\/\/www.youtube.com\/embed\/WJwhozcfPMI?feature=oembed\" frameborder=\"0\" allowfullscreen><\/iframe><\/p>\n <p>Since there are a quite few gifs and images (which add up to almost 2MB), I thought it was best to not keep everything on the main page&#8230;<\/p>\n <p><span id=\"more-392271\"><\/span><\/p>\n <h3>Reason for the delay<\/h3>\n <p>On my first compo I used Flixel. It was so easy to use and so similar to the way I wanted to think about games that I&#8217;ve pretty much only used it since them. I&#8217;ve tried\u00a0to use Unity a few times, but I always tried to go\u00a0about it in a structured way (which\u00a0didn&#8217;t quite work out).<\/p>\n <p>Though I&#8217;ve already toyed with SDL and OpenGL, since Flixel was enough to me I kept using it. But, when I\u00a0made the post compo for my LD#28 I started to think Flash isn&#8217;t good enough, anymore. My implementation is probably also faulty, but\u00a0there are a lot of missed inputs\u00a0in that game, when trying to run it at 60 FPS. Also, rendering is quite slow (since I added an overlay to the whole screen).<\/p>\n <p>I\u00a0switch to Air or to a newer Flash version with another library (like Axl, which already\u00a0has GPU support). Or I could even switch to Unity&#8230; but this idea isn&#8217;t much to my liking.<\/p>\n <p>Well, since I&#8217;m a coder and I&#8217;ve been meaning to do that for some time, I decided to finally write\u00a0my own framework in C. I wanted to use SDL2, so I could easily port games to Android and maybe even web (with the Chrome Native Client). Also, it would enable me to work with OpenGL and shaders (which would allow me to do overlays without actually having to render a square over the screen).<\/p>\n <p>Some two months ago, I started to develop that Framework. Unfortunately, by the time of the compo, I was no where near finishing it. It wasn&#8217;t even on a usable state. So I had to fall back to Flixel. As soon as the compo ended, though, I went back to work on my framework and on a test game I&#8217;d been doing to test it.<\/p>\n <p>I tried to play a few game each day, but I couldn&#8217;t quite manage my time. Since I try to write a comment to every game I play, I ended up spending too much time thinking about what to write than actually playing games. As time went by, I stopped playing entries and focused solely on my framework.<\/p>\n <p>At least, now it&#8217;s on a usable state (though it&#8217;s still missing many features) and I&#8217;ve finished that game! I&#8217;ll talk about it on a later post. For now, know that I&#8217;ll most likely use it on the next LD! =D<\/p>\n <p>On to talk about the actual compo&#8230;<\/p>\n <h3>Theme and game idea<\/h3>\n <p>For some time, &#8220;Connected Worlds&#8221; has been one of my least favorite themes. As usual, I was kind of disappointed with the theme&#8230; but when I started to actually give it some thought, I saw that it&#8217;s actually a great theme.<\/p>\n <p>Getting over that small hurdle, I was able to\u00a0create a nice lil&#8217; story (that barely made into the final game) and how I wanted it to play.<\/p>\n <p>The game was to be able\u00a0three\u00a0races from different planets,\u00a0two of those being sentient and always at war. The other one was to be of creatures that from time to time attacked either of them. The story would move toward either reaching a agreement with the other people or waging war and wiping (or getting wiped) them.<\/p>\n <p><a href=\"http:\/\/www.ludumdare.com\/compo\/wp-content\/uploads\/2014\/09\/gfm-ld30-sprites-000.png\"><img class=\"aligncenter size-full wp-image-393267\" src=\"http:\/\/www.ludumdare.com\/compo\/wp-content\/uploads\/2014\/09\/gfm-ld30-sprites-000.png\" alt=\"gfm-ld30-sprites-000\" width=\"194\" height=\"99\" \/><\/a><\/p>\n <p>I, for some\u00a0stupid reason, thought it would be a nice idea to make it a &#8220;side scrolling RTS&#8221; kinda game. I quickly drew a few sprites and implemented the base of the menu and of the movement&#8230;<\/p>\n <p><a href=\"http:\/\/www.ludumdare.com\/compo\/wp-content\/uploads\/2014\/09\/gfm-ld30-anim-001.gif\"><img class=\"aligncenter size-full wp-image-393269\" src=\"http:\/\/www.ludumdare.com\/compo\/wp-content\/uploads\/2014\/09\/gfm-ld30-anim-001.gif\" alt=\"gfm-ld30-anim-001\" width=\"297\" height=\"122\" \/><\/a><\/p>\n <p>Then, I decided to add platforms and gravity. Prior to that, you would have to micro manage every unit and use a jump button to actually make it go over platforms.<\/p>\n <p><a href=\"http:\/\/www.ludumdare.com\/compo\/wp-content\/uploads\/2014\/09\/gfm-ld30-anim-002.gif\"><img class=\"aligncenter size-full wp-image-393275\" src=\"http:\/\/www.ludumdare.com\/compo\/wp-content\/uploads\/2014\/09\/gfm-ld30-anim-002.gif\" alt=\"gfm-ld30-anim-002\" width=\"297\" height=\"122\" \/><\/a><\/p>\n <p>And this is when everything went down the hole.<\/p>\n <h3>Writing a 2D path finder<\/h3>\n <p>The idea of implementing a path finder wasn&#8217;t all that intimidating. I knew that I was risking wasting too much time on something that could not\u00a0work, but I thought it was worth it. All I needed was to transform the tilemap into a graph and traverse it. Then I would have to deal with the problem of making an entity actually traverse that path.<\/p>\n <p>I wrote it in a really straight forward way. If I&#8217;m not wrong, I traversed the tilemap iteratively and every time I reached a solid tile I would check if it was part of a already found node and, if not, recursively search for its bounding rectangle. I also modified it&#8217;s actual height and vertical position to make it take all the vertical space possible,\u00a0so I would be able to click above a platform and select it. Even thought my implementation\u00a0worked, I later found out that it was really buggy and had to redo some parts.<\/p>\n <p><a href=\"http:\/\/www.ludumdare.com\/compo\/wp-content\/uploads\/2014\/09\/gfm-ld30-anim-003-2.gif\"><img class=\"aligncenter size-full wp-image-393270\" src=\"http:\/\/www.ludumdare.com\/compo\/wp-content\/uploads\/2014\/09\/gfm-ld30-anim-003-2.gif\" alt=\"gfm-ld30-anim-003-2\" width=\"680\" height=\"439\" \/><\/a><\/p>\n <p>For the path finder, I first listed every possible\u00a0path, that is, every two nodes that were reachable, even if by jumping. To simplify things, I made them bi-directional (which\u00a0ignored the fact that a character could fall from a platform to the floor below it). Then, when trying to trace a path, I would check from the current node every other node recursively,\u00a0in a depth-first search, while maintaining a list of visited nodes and the current shortest path and distance, to avoid cyclic paths and to be able to travel the &#8220;shortest&#8221; (in a kinda random meaning) path. Finally, I simply had to make an entity follow that path.<\/p>\n <p>Pretty simple, right? Well&#8230;<\/p>\n <p><a href=\"http:\/\/www.ludumdare.com\/compo\/wp-content\/uploads\/2014\/09\/gfm-ld30-anim-005.gif\"><img class=\"aligncenter size-full wp-image-393271\" src=\"http:\/\/www.ludumdare.com\/compo\/wp-content\/uploads\/2014\/09\/gfm-ld30-anim-005.gif\" alt=\"gfm-ld30-anim-005\" width=\"638\" height=\"476\" \/><\/a><\/p>\n <p>yeah, not, it wasn&#8217;t. I made lots of typos and small logic errors (like incrementing the loop counter on the while statement [\u00a0while (++i &lt; nodes.length)] and at the end). I broke and &#8220;fixed&#8221; the code\u00a0a lot of times before I found those stupid mistakes&#8230; Just then I was able to make it somewhat working (after some actual fixing).<\/p>\n <p><a href=\"http:\/\/www.ludumdare.com\/compo\/wp-content\/uploads\/2014\/09\/gfm-ld30-anim-006.gif\"><img class=\"aligncenter size-full wp-image-393272\" src=\"http:\/\/www.ludumdare.com\/compo\/wp-content\/uploads\/2014\/09\/gfm-ld30-anim-006.gif\" alt=\"gfm-ld30-anim-006\" width=\"638\" height=\"476\" \/><\/a><\/p>\n <p>By then, I had already spent some 9~10 hours on that single problem and had to finish the game on my Sunday afternoon. I also hard coded a few things (like every character speed) into the path find code, so I couldn&#8217;t change that without potentially breaking everything. And for some stupid reason, I kept the bullet speed the same as\u00a0every\u00a0character speed&#8230; yeah&#8230; lots of great ideas.<\/p>\n <h3>Finishing the game<\/h3>\n <p>Time wasn&#8217;t quite on my side (totally my own fault, I know). So I kinda rushed things to a complete state. Those drafty drawings I did for the animations are a reflect to that. I draw everything on paper and\u00a0tried to simply pass it to the computer. Since I wouldn&#8217;t have time to make it into proper pixel art, I tried to make it\u00a0somewhat nice\u00a0and interesting.<\/p>\n <p><a href=\"http:\/\/www.ludumdare.com\/compo\/wp-content\/uploads\/2014\/09\/gfm-ld30-cg-000.png\"><img class=\"aligncenter size-full wp-image-393273\" src=\"http:\/\/www.ludumdare.com\/compo\/wp-content\/uploads\/2014\/09\/gfm-ld30-cg-000.png\" alt=\"gfm-ld30-cg-000\" width=\"320\" height=\"240\" srcset=\"http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2014\/09\/gfm-ld30-cg-000-300x225.png 300w, http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2014\/09\/gfm-ld30-cg-000.png 320w\" sizes=\"(max-width: 320px) 100vw, 320px\" \/><\/a><\/p>\n <p>The waves were also decided at random. I made three enemy types and put a few of each every stage.\u00a0I didn&#8217;t test it as a whole, but I (thought I) was sure that every state would properly switch to the next one. Later, I found out that a single typo broke every stage transition, but I fixed it a few minutes (I think) after submitting the game.<\/p>\n <p>And that&#8217;s pretty much it.<\/p>\n <h3>Conclusion<\/h3>\n <p>Well, I had tons of fun. I was able to ignore trying to make the best possible game I potentially\u00a0could, going for a platformer and\u00a0avoiding some choices because they would be too hard to implement or too time consuming, and to embraced simply trying to make the game I wanted to. This is why, even thought &#8220;The Nether&#8221; is one of the worst and most unpolished of my entries, I&#8217;m really happy with it.<\/p>\n <p>At the same time, I feel bad for not playing all that many games, not even playing back the games of everyone who commented on my game. This was necessary, though, because I really needed to focus on\u00a0developing that framework.<\/p>\n <p>I may try to fix the game&#8217;s bugs and make a post compo&#8230; but there are a few games that I want to make\u00a0first. So, yeah&#8230; that might never happen&#8230;<\/p>\n <p>Thanks for reading! =D<\/p>\n \n <p>Tags: <a href=\"http:\/\/ludumdare.com\/compo\/tag\/post-mortem\/\" rel=\"tag\">post-mortem<\/a>, <a href=\"http:\/\/ludumdare.com\/compo\/tag\/postmortem\/\" rel=\"tag\">postmortem<\/a><\/p>","time":"September 15th, 2014 4:43 pm","title":"The Nether \u2013 Post Mortem and timelapse"}