{"author_name":"Kynrael","cat":"LD #20 - It's Dangerous to go Alone! Take This!","comments":[],"epoch":1304436720,"likes":0,"metadata":{"p_key":"65758","p_author":"Kynrael","p_authorkey":"3913","p_urlkey":"101554","p_title":"Take One of These \u2013 Postmortem","p_cat":"LD #20 - It's Dangerous to go Alone! Take This!","p_event":"LD20","p_time":"1304436720","p_likes":"0","p_comments":"0","p_status":"UPD5","us_key":"3913","us_name":"Kynrael","us_username":"yrael","event_start":"1304035200","event_key":"6","event_name":"LD20"},"text":"<p>So, this was my first Ludum Dare ! And also, the first &#8220;real&#8221; game I made. You can play it <a href=\"http:\/\/www.ludumdare.com\/compo\/ludum-dare-20\/?action=rate&amp;uid=3913\"><em><strong>here<\/strong><\/em><\/a> first before reading this.<br \/>\n First things first : the title sucks. I didn&#8217;t have any ideas on it so I just took what first went through my mind.<\/p>\n <p>You might find interesting to read this post describing the whole process. You can also find my quite uninteresting timelapse video <a href=\"http:\/\/dl.dropbox.com\/u\/27894007\/timelapse.zip\"><em><strong>here<\/strong><\/em><\/a>; not of much interest, as i mostly spent my time munching code.<\/p>\n <p><strong>The idea<\/strong><\/p>\n <p>The first think that occured to me, was that the theme wasn&#8217;t great, and that nearly anything could be fit into it. As I had wanted to create some rogue-like game, that being one of my favorite genres and in my opinion having a lot of potential. Of course I wasn&#8217;t going to go for some groundbreaking game, but I liked the idea of doing something like that.<\/p>\n <p>So I decided that I would &#8220;mock&#8221; a little bit the theme by having a old man give you a random set of items, those items being stupid&#8230; Then you would have to adapt in the dangerous caverns where all the monsters awaited you without much help (I was thinking toothbrushes and stuff). Alas, caught up by time, I ended up only putting in &#8220;serious&#8221; stuff.<\/p>\n <p>I wanted something simple to play, but fully randomized like the original Rogue so that if players wanted to go on playing they wouldn&#8217;t have to stop because I didn&#8217;t have time to make levels (which sometimes happened to other participants, which was truly a pity !). That also meant I could really take my time on the game engine, starting from scratch.<\/p>\n <p>&nbsp;<\/p>\n <p><strong>The process<\/strong><\/p>\n <p>I started by implementing a basic loader, that took me about 5 minutes. Then I started work on the map. First big snag and also enormous error, was when I tried using a two dimensional array in AS3. I had never heard of nested arrays so I then assumed for some reason it wasn&#8217;t possible, instead of doing some research. I started coding using a very long array. Let&#8217;s say that I lost 6hours total, when I discovered I couldn&#8217;t do much with this, found out about nested arrays and learned using them, and cleaned all the mess left by the giant array.<\/p>\n <p>So I worked on the generation algorithm. Didn&#8217;t know anything about that, so I sort of improvised to imitate Rogue. The algorithm goes through the map, and sometimes starts creating a room of variable size. After that, it creates corridors between rooms&#8230; That&#8217;s where it sort of became hectic. Thinks started behaving wildly sometimes, so I ended up doing some wall borders then floor all around the area, that way I could stop working on it. I had already spent a day on this. I finished it with random mob and item spawning.<\/p>\n <p>Then came feature creep. I thought, &#8220;Line of sight, why not ?&#8221;. Ended up spending half of day two on it with no result. Twas fun, but then I started getting nervous about finishing.<\/p>\n <p>I moved on to the inventory system and item interactions. That was pretty straightforward, using different arrays and algorithms. It was quite simple and I think, one of the things I managed the best. You don&#8217;t notice it in the game (well, I think) because it works seamlessly and frustration-less. This took me about three hours, max.<\/p>\n <p>Finally, I implemented fighting and mob &#8220;AI&#8221;. Not really AI, because I didn&#8217;t have time to do pathfinding or stuff like that. It&#8217;s less than 50 lines of code. It justs checks if the player is standing next to him to attack him, and if not, moves in his direction. And even that&#8217;s basic.<\/p>\n <p>Then came features : luckily I had worked by being careful that most things were dynamic, so I could easily implement items\/mobs. I was hard pressed on time so I did only a small portion of what I had in mind&#8230; That&#8217;s where graphics kicked in, pixel-drawing armor\/swords\/potions. Not much work of course.<\/p>\n <p>&nbsp;<\/p>\n <p><strong>The end of LD#20<\/strong><\/p>\n <p>I think I did really okay, and I might even polish this to get a solid, entertaining game. It&#8217;s more of a engine now than anything else, but it could be more. I hope you found reading this interesting !<\/p>\n <p>&nbsp;<\/p>\n <p>You can check out the game <em><strong><a href=\"http:\/\/www.ludumdare.com\/compo\/ludum-dare-20\/?action=rate&amp;uid=3913\">here<\/a><\/strong><\/em>, and my 31hrs timelapse of me coding away <a href=\"http:\/\/dl.dropbox.com\/u\/27894007\/timelapse.zip\"><em><strong>here<\/strong><\/em><\/a>.<\/p>","time":"May 3rd, 2011 10:32 am","title":"Take One of These \u2013 Postmortem"}