{"author_name":"Drebin","cat":"LD #22","comments":[],"epoch":1324492200,"likes":1,"metadata":{"p_key":"60092","p_author":"Drebin","p_authorkey":"7345","p_urlkey":"95844","p_title":"\u201cAdventures of One\u201d \u2013 A postmortem, journal log, and time-lapse video","p_cat":"LD #22","p_event":"LD22","p_time":"1324492200","p_likes":"1","p_comments":"0","p_status":"UPD5","us_key":"7345","us_name":"Drebin","us_username":"gavin_pugh","event_start":"1323993600","event_key":"8","event_name":"LD22"},"text":"<p>Cross-posted from my blog:<\/p>\n <ul>\n <li><a href=\"http:\/\/www.gavpugh.com\/2011\/12\/21\/ludum-dare-22-postmortem-journal-and-timelapse\/\" target=\"_blank\">http:\/\/www.gavpugh.com\/2011\/12\/21\/ludum-dare-22-postmortem-journal-and-timelapse\/<\/a><\/ul>\n <hr>\n <p align=\"center\"><img src=\"http:\/\/www.gavpugh.com\/wp-content\/uploads\/2011\/12\/advofone.png\" alt=\"\" width=\"450\" height=\"334\" class=\"alignnone size-full wp-image-1352\" \/><\/p>\n <p>So, this past weekend I participated in the <a href=\"http:\/\/www.ludumdare.com\/compo\/\" target=\"_blank\">22nd Ludum Dare<\/a> competition. You have just 48 hours over the weekend in which to create a game. The crux of the competition is that you create all code and content within that 48 hour period. No re-used assets at all. Only engine\/middleware\/framework code is permitted to be prepared beforehand.<\/p>\n <p>I wrote my game with <a href=\"http:\/\/unity3d.com\/\" target=\"_blank\">Unity<\/a>. It\u2019s the first project I\u2019ve ever undertaken in Unity, and I had very little experience of it. I came out of the other side with a very positive impression, I really liked using it. As much as I love C\/C++; given the time constraints, it seemed a good idea to go with Unity. The other big upside is that you can deploy the game to be played via a web browser. This was definitely what I wanted. I didn\u2019t want people to have to go to the hassle of a download-and-install, just to play the little toy game I made over a weekend.<\/p>\n <p><span id=\"more-103338\"><\/span><\/p>\n <p>I wrote a turn-based strategy RPG game. My inspiration was the \u201cShining Force\u201d series of games. The theme of Ludum Dare this time was \u201cAlone\u201d; every game submitted had to follow this theme. This obviously doesn\u2019t fit the team-based gameplay of Shining Force, but mine has a twist. You just play as a single character. It just takes the combat part of those RPG games, there\u2019s no walking around and talking to villagers. There is a shop to purchase and sell items between battles, but that\u2019s it.<\/p>\n <p>&nbsp;<\/p>\n <h2>The Game<\/h2>\n <p>Here\u2019s a link to play the finished game:<\/p>\n <div align=\"center\"><a href=\"http:\/\/www.gavpugh.com\/ludumdare\/ld22\/WebPlayer.html\" target=\"_blank\"><b><i><br \/>\n <img src=\"http:\/\/www.gavpugh.com\/wp-content\/uploads\/2011\/12\/unity.png\" alt=\"\" width=\"350\" height=\"160\" class=\"alignnone size-full wp-image-1354\" \/><br \/>&#8220;Adventures of One&#8221;<br \/><\/b><\/i><\/a><\/div>\n <p>&nbsp;<\/p>\n <p>I was disappointed with what I ended up with, mostly due to how much work I had to squeeze into the time. In my eyes the game had two major failings:<\/p>\n <ul>\n <li>A lack of polish. The art is my placeholder art, and the GUI is the default-Unity GUI.<\/p>\n <li>Little game balancing. The first world is decently balanced, but after that it gets way too easy. The game is completely procedurally-generated. I just didn\u2019t have the time to playtest it.\n <\/ul>\n <p>The biggest achievement though was:<\/p>\n <ul>\n <li>I wrote a game in 48 hours, that\u2019s actually playable; and a little bit fun! <img src=\"http:\/\/ludumdare.com\/compo\/wp-includes\/images\/smilies\/simple-smile.png\" alt=\":)\" class=\"wp-smiley\" style=\"height: 1em; max-height: 1em;\" \/>\n <\/ul>\n <p>That&#8217;s my introduction out of the way. Now, onto the postmortem&#8230;<\/p>\n <p>&nbsp;<\/p>\n <h2>What Went Right?<\/h2>\n <ul>\n <li>Choosing an idea which I\u2019d see through to the end. I actually lost most of the first two hours to thinking over what type of game I\u2019d do. The theme \u2018Alone\u2019 was tricky for me, as most of the ideas I had before it was announced didn\u2019t fit it. I ended up taking one of those ideas and simplified it. In retrospect doing a full-blown party of player characters would have been ridiculously hard to do in 48 hours. But yeah, I was excited by the idea and that helped me keep my motivation.\n <li>Using a higher level language like C#. Considering the game didn\u2019t make too much use of Unity-specific \u2018scene\u2019 features, and was mostly generated in code; I could have had similar results using something like XNA instead. Either way, this sort of rapid development lends itself to something higher-level like C#. Out of habit, I think I would have been too anal about my code if I wrote it in C++. C# just lets you throw caution to the wind that little bit easier!\n <li>Enemy AI. Pretty close to \u201cShining Force\u201d\u2019s enemy AI. It slotted in well to the turn system I had set up; so it followed the same rules and states the player had. The turn system I wrote had its positives and negatives, but since I left the AI to pretty late on, I\u2019m happy I spent the time earlier making the turn system generic.\n <li>The UI. I left it to pretty late on. I hate coding UI. I\u2019m glad though I just used the stock Unity functions and didn\u2019t try any fancy rendering techniques. I went for the basics, and that was the right decision. I\u2019d hoped I\u2019d get the chance at the end during the polish phase to \u2018skin\u2019 it, but I had no polish phase.\n <li>Save and load. Lost close to an hour implementing it, but it\u2019s a pretty cool feature. It autosaves after each battle (Unity stores web-app info on your hard-drive, so it\u2019s transparent). I also got in a crude Base64 load\/save screen, to bring your save to other computers.\n <li>Bug free? Well, it seems to be for me. I kept it in a pretty stable condition, considering the game\u2019s complexity and reliance on procedural generation, and AI.\n <li>Food, drink, and breaks. I think I was sensible with what I ate and drank. I took pretty regular short breaks. Even if it was to just chill on the sofa with a notepad for five minutes, and plan out my next coding session. I\u2019m not a coffee or energy-drink guy, so just cups of tea kept me going. I\u2019m unsure how I wasn\u2019t totally fatigued by the end, I\u2019m guessing it was adrenaline.\n <li>The \u2018all nighter\u2019. It saved me from not finishing. I\u2019m an optimist when it comes to scheduling time. Re-reading my <a href=\"http:\/\/gavpugh.com\/ludumdare\/ld22\/log.txt\" target=\"_blank\">journal log<\/a>, I hardly meet any of my set goals (but to be honest I did surprise myself with getting \u2018unscheduled\u2019 stuff done really quickly). If I\u2019d had lost say, another five hours to a second nap, there is no way I\u2019d have had a functional game come submission time.\n <li>Placeholder work. Crappy art, blocks instead of characters, a checkerboard playing area for 90% of development. These sorts of things meant I had systems playable sooner. This helps my motivation, there\u2019s nothing worse than building up to a point, where you\u2019ve seen nothing on screen and hoping \u2018everything will work out at the end\u2019\u2026. And then it inevitably doesn\u2019t. My longest blind-coding run without actually seeing anything on the screen working, was about half an hour; for the turn system. Everything was short and sweet to rapidly iterate on.\n <li>The audio. I think it went well. I dropped in the sound effects just after the halfway point, which provided good battling feedback, with the lack of particles\/visual effects. The music I also procedurally generated. I lucked out with some good classical piano pieces which fit the style of game well. The voiceovers by the wife I threw in at the last minute. They worked out well, but I\u2019d have liked to try and fix the audio balance between her and the music a bit more.\n <li>Not caring about the code quality. It\u2019s awful. Terribly hacked-about stuff that reminds me of the sort of thing I\u2019d have written in college. I however still coded pretty defensively though. I just didn\u2019t worry about things like commenting, and whitespace\/indentation being off. Fix something \u2018properly\u2019, or throw in a sure-fire hack? A no brainer. I also committed many cardinal sins with global static singletons, instead of jumping through Unity\u2019s component hoops. My typing fingers thanked me!\n <li>Stand-up desk. I have an <a href=\"http:\/\/adam.pra.to\/content\/jerker\/\" target=\"_blank\">IKEA Jerker desk<\/a>. It\u2019s not adjustable, but I have a high stool which I use when I need a rest. Being able to constantly switch between two was awesome. When I\u2019d feel lethargic in the chair, I could stand. When my feet got tired of the standing, I\u2019d be able to take a load off and sit. I probably was about 50\/50 in each position, time-wise.\n <li>No internet distractions. I know some people who do these completions regularly like to use Twitter and IRC extensively during the dev time. I\u2019m a bit of a procrastinator; those sorts of things can be a big timesink. I told myself I would just check my emails on my cellphone, and do nothing more than that. It worked out well. I\u2019m real surprised that I didn\u2019t feed my <a href=\"http:\/\/www.thechaosengine.com\/forum\" target=\"_blank\">Chaos Engine<\/a> addiction, throughout the whole 48 hours!\n <\/ul>\n <p>&nbsp;<\/p>\n <h2>What Went Wrong?<\/h2>\n <ul>\n <li>I left some important features until way near the end. In particular the attack logic I rushed through, such that it doesn\u2019t scale into later battles. Enemy placement and the map terrain generation I did with less than two hours to go. I should have had all the procedural-generation stuff done very early, and other risky things like the battle logic calculations too. Instead I did the bread-and-butter stuff that\u2019s hard to get wrong first, and did the risky stuff later.\n <li>Very little playtesting. It\u2019s a slow game to play through to test leveling into later battles. I should have made leveling stats deterministic and had some way of starting myself off in the later, harder battles to test balancing.\n <li>Graphics\/art. I spent hardly any time at all on the graphics. I can\u2019t draw for shit, but I can usually fudge things to look very aesthetically pleasing despite that lack of talent. I didn\u2019t even get any time to try that.\n <li>A lack of preparation. I\u2019d planned each day during the week prior to \u201clook at Unity tonight\u201d. I hadn\u2019t got around to it. So I had to learn as I went.  Some aspects like hooking up audio took a little longer than they would have, if I knew how to do it beforehand. I also found myself dropping in and out of the \u2018component\u2019 model that Unity has for objects, because it didn\u2019t \u2018click\u2019 for me until a few hours in. I think I would have likely pen-and-paper planned out my components to be better organized, than the ad-hoc mess they ended up as.\n <li>AOE (area-of-effect) magic; stuff that affects more than one tile. Probably lost a couple of hours spread over the whole period, to implementing it, and dealing with fallout from it. I envisioned it as being useful in later battles when there are tons of enemies; which drove me to add it in the first place. It\u2019s a shame later battles are such a walkover, which kind of renders it just a time-saving device.\n <li>I started working at about 11am on the Saturday, after about five hours of sleep. I took it easy in the morning, and watched some football as I coded. That time was actually pretty productive. I then carried on for well over 24 hours and worked up to the 6pm deadline the next day. I really didn\u2019t feel too tired, but my productivity certainly slowed. I didn\u2019t have many bugs to fix, but one in particular was niggling in the last four hours.  I only fixed it shortly before submission. I think with a fresher head, I\u2019d probably have not caused the bug in the first place.\n <li>UI and state machines. I hate coding UI. I hate coding state machines. This game had plenty of both. I\u2019m surprised it didn\u2019t demotivate me.  State machines always seem such a chore. So much code for what has very simple intentions. Scripting languages can make this a lot easier with their micro-threading capabilities. I remember reading something about C# and the \u2018yield\u2019 statement lending itself well to state machines, but it\u2019s a little less straightforward to grok. I should have probably checked that out again.\n <li>The scope. Too big. Too ambitious. Given my lack of preparation too, it was silly to think I could do the idea justice in less than 48 hours. I had a good stab at it, though. <img src=\"http:\/\/ludumdare.com\/compo\/wp-includes\/images\/smilies\/simple-smile.png\" alt=\":)\" class=\"wp-smiley\" style=\"height: 1em; max-height: 1em;\" \/>\n <\/ul>\n <div align=\"center\"><b><i><br \/>\n <img src=\"http:\/\/www.gavpugh.com\/wp-content\/uploads\/2011\/12\/picasso.png\" alt=\"\" width=\"300\" height=\"300\" class=\"alignnone size-full wp-image-1289\" \/><br \/>&#8220;Picasso&#8221; &#8211; Look at that work of art!<br \/><\/b><\/i><\/div>\n <p>&nbsp;<\/p>\n <h2>My TODO List At The End<\/h2>\n <p>I had to prioritize the last few tasks, so I inevitably had some on the cutting room floor. Here are the features I really wanted to add:<\/p>\n <ul>\n <li>Particle effects on attacks. I\u2019d seen some demos of particles in Unity, and they looked really simple to set up. A good bang-for-buck. Didn\u2019t even give it a slight look.\n <li>More\/better character graphics. I also rushed through naming and giving stats to the enemies that did make it in. The art in the game isn\u2019t good, and I don\u2019t think I\u2019d have made it that much better; but I\u2019d have liked to added more varied enemies for sure. I think I probably spent a grand total of about twenty minutes the whole project (if that), making art.\n <li>I had functionality to \u2018slow\u2019 the player movement over harsh terrain, and collision for impassable squares. I always planned to procedurally generate the terrain, but I didn\u2019t get the chance to hook this stuff up. Impassable squares would have been tricky, in order to avoid blocking the player out of areas. \u2018Slow\u2019 terrain though wouldn\u2019t have been much work.\n <li>Healing spells for enemies. \u2018Buff\u2019 and \u2018debuff\u2019 spells for the hero player, as well as the enemies. Similar \u2018buff\u2019 and \u2018debuff\u2019 items to use as well. Some of the turn-logic for this sort of thing was in place; it would have probably taken less than an hour to add these.\n <li>A better looking GUI. I\u2019d have liked to try changing the font and colour used. I did Google search at one point, but it looked pretty involved, and would require me to go through all my UI code and hookup references to a \u2018GUISkin\u2019. Probably not much time to do at all, but every minute counted at this stage.\n <\/ul>\n <p>Of course, all of these things still fall way below \u2018fixing the balancing\u2019, and some other things mentioned in the \u201cWhat went wrong\u201d section. The Perlin-noise, colored and textured terrain was actually a wishlist item for me originally. I wonder if I\u2019d have left that on the wishlist, I would have been able to fix the balancing?<\/p>\n <p>&nbsp;<\/p>\n <h2>Final Thoughts<\/h2>\n <p>In all, I enjoyed the experience. I was disappointed that the game I was intending to be challenging and provide seemingly \u2018endless hours\u2019 of battling, only holds up for about ten minutes. But I had fun coding something that quickly under a time pressure. Sure, the code looks absolutely horrible, but it\u2019s a thrilling experience just churning out stuff at that speed, and having it all come together.<\/p>\n <p>I would consider doing another Ludum Dare in future, but I\u2019d definitely want to do more preparation. I\u2019d also certainly scope my idea much better. I think a shorter, tighter game is the way to go. Something that would be doable with two \u2018sleeps\u2019 in there as well. I\u2019d like to get a good twelve hours of sleep next time, instead of five! <\/p>\n <p>&nbsp;<\/p>\n <h2>My Journal Log<\/h2>\n <p>You\u2019ll notice the log ends at about 2pm, four hours before my 6pm deadline. That last four hours was just a whirlwind, the time flew by ridiculously fast!<\/p>\n <p><a href=\"http:\/\/gavpugh.com\/ludumdare\/ld22\/log.txt\" target=\"_blank\"><br \/>\n <img class=\"alignleft size-full wp-image-437\" style=\"vertical-align: middle\" src=\"http:\/\/www.gavpugh.com\/wp-content\/uploads\/2011\/11\/inf-file.png\" alt=\"Zip File\" width=\"48\" height=\"52\" \/>log.txt<\/a><\/p>\n <p>I found it pretty useful to keep this log. It helped with motivation, and helped me focus on what I should be doing next.<\/p>\n <p>I also have half a dozen mini-notepads full of ramblings about movement, AI, and the turn system. Taking a break from the computer and sitting down with a pad and paper is pretty valuable. Just gives you time to refocus, so you don\u2019t just sit there coding down a blind alley.<\/p>\n <p>&nbsp;<\/p>\n <h2>My Time-lapse Video<\/h2>\n <p>~38 hours in ~4 minutes:<\/p>\n <p><a href=\"http:\/\/www.youtube.com\/watch?v=q_VTmWSDQ-k\" target=\"_blank\">Ludum Dare #22 &#8211; Adventures of One<\/a><\/p>\n <p>The first session was about 10 hours; the second session was about 28. <img src=\"http:\/\/ludumdare.com\/compo\/wp-includes\/images\/smilies\/simple-smile.png\" alt=\":)\" class=\"wp-smiley\" style=\"height: 1em; max-height: 1em;\" \/><\/p>\n \n <p>Tags: <a href=\"http:\/\/ludumdare.com\/compo\/tag\/postmortem\/\" rel=\"tag\">postmortem<\/a>, <a href=\"http:\/\/ludumdare.com\/compo\/tag\/timelapse\/\" rel=\"tag\">timelapse<\/a><\/p>","time":"December 21st, 2011 1:30 pm","title":"\u201cAdventures of One\u201d \u2013 A postmortem, journal log, and time-lapse video"}