{"author_name":"ChainedLupine","cat":"LD #17 - Islands - 2010","comments":[],"epoch":1272358200,"likes":0,"metadata":{"p_key":"70620","p_author":"ChainedLupine","p_authorkey":"1746","p_urlkey":"106441","p_title":"Jealous Gods: Postmortem","p_cat":"LD #17 - Islands - 2010","p_event":"LD17","p_time":"1272358200","p_likes":"0","p_comments":"0","p_status":"UPD5","us_key":"1746","us_name":"ChainedLupine","us_username":"chainedlupine","event_start":"1271980800","event_key":"3","event_name":"LD17"},"text":"<p>I already posted a mini-postmortem in my submission screen, but here&#8217;s my expanded version.<\/p>\n <p>First up, I want to give a big shout out to everybody who contributed to Ludum Dare, and to those who made this entire site and contest a reality.\u00a0 It&#8217;s great to see so many people active a community focused on game development.\u00a0 While this was my first Ludum Dare 48, I&#8217;ve participated in community-driven game competitions before and it&#8217;s always been a blast.\u00a0 LD48 was no exception.<\/p>\n <p><span id=\"more-19895\"><\/span>Here&#8217;s a summary:<\/p>\n <ul>\n <li>Lack of working debugger\/inspector meant much gnashing of teeth.<\/li>\n <li>Unfamiliarity with Flixel library\/AS3 specifics cost me time.<\/li>\n <li>Spent too much time getting art into a state that was usable.<\/li>\n <li>Generally spent too much time arguing with my tools, and not enough refining gameplay.<\/li>\n <\/ul>\n <p><strong>Friday:<\/strong><\/p>\n <p>The islands theme sort of threw me for a loop.\u00a0 I wasn&#8217;t expecting it, and in fact had down-voted it. But, in retrospect, I admit it&#8217;s a good theme.\u00a0 It&#8217;s open enough that people were able to do some really cool and interesting things with it.<\/p>\n <p>After grousing over the theme for a bit and finally having a flash of inspiration, I sat down and sketched up concept art.\u00a0 I half-expected it to end up as my final art, so I spent more time on than I might normally.\u00a0 Later, I&#8217;m glad I did this.<\/p>\n <p>Now I had a gameplay idea, concept, and a bit of art.\u00a0 The next step was dumping the art into separate sprites and making sure they were properly configured to work in Flixel.\u00a0 This part cost me a fair amount of time.\u00a0 My original idea to use Cosmigo&#8217;s ProMotion and do strict pixel art would have been easier on my mouse-hand.<\/p>\n <p>I then created a project in FlashDev and made sure that all of my assets would load up properly via Flixel.\u00a0 After that, I coded the scrolling background.\u00a0 My original sketch had everything on one screen, but I felt a bit constrained so I enabled a larger, scrolling playfield in order to make the game level more expansive.\u00a0 However, I wasn&#8217;t able to properly enable the off-screen indicators for enemy islands\/fireballs, so I felt that hurt the gameplay in the end by making the game a little confusing.\u00a0 It would have just been simpler to keep everything on-screen;\u00a0 Most of the levels I designed did this anyway.<\/p>\n <p>The final bit I accomplished before turning in for the first day was to sketch the little animated islanders in Photoshop.\u00a0 Photoshop is not meant for pixel art, I&#8217;ve found.\u00a0 It&#8217;s incredibly annoying to use for this task.\u00a0\u00a0 More time wasted!\u00a0 But once I was done, I had idle, running, swimming, burning, and praying animations.\u00a0 This is all I needed from the little guys, so I could at least sign off on them.<\/p>\n <p>After writing the Native class and making sure the little guys spawned properly, I decided to call it a night.<\/p>\n <p><strong>Saturday:<\/strong><\/p>\n <p>Ugh!\u00a0 Nasty storms!\u00a0 They kept me offline until later in the day.\u00a0 Boo!<\/p>\n <p>Once I finally was able to get back into my form, I started work on the most critical aspect of the game;\u00a0 Animated fireballs that could be launched at the other islands.\u00a0 This part was fun, but my unfamiliarity with Flixel started to rear its ugly head.\u00a0 This resulted in some digging in Flixel code in order to grok the purpose of the FlxEmitter class and how to bend it to my needs.<\/p>\n <p>Then, more time tweaking it so that I could have a dozen fireballs onscreen without grinding my system to a halt.\u00a0 At the time, I was unaware of the profiling functions in Flixel, so I could have cut out some of the guesswork with this.<\/p>\n <p>Next I finished the animation state code for the islanders.\u00a0 They convincingly milled about on my islands, and occasionally went to their knees and prayed, but at the time this was just a visual effect.<\/p>\n <p>The final thing I completed before calling it a night as implement the fireball arc code, so that they fell convincingly, and the collision code, so that the fireballs landed on the islands.\u00a0 The collision code kept me up for a while.\u00a0 There was some silly little overlooked error that prevented the fireballs from exploding properly.\u00a0\u00a0 I don&#8217;t even remember what it was, exactly.<\/p>\n <p><strong>Sunday:<\/strong><\/p>\n <p>Hoo boy!\u00a0 Down less than 12 hours, I didn&#8217;t have a working game at all.\u00a0 I just had pieces.<\/p>\n <p>The spawning code for islands worked.\u00a0 You could launch fireballs and they would impact the other islands, set natives into poofs of flame.\u00a0 This was all fun, and such, but not a real game.<\/p>\n <p>First up was writing the prayer-power system.\u00a0 Islanders prayed, increasing power, which powered the fireballs.\u00a0 I also coded the health\/power bar system and drew two little Tiki heads to represent the gods.\u00a0 Unfortunately, I didn&#8217;t have enough time to add in an expanded graphic of your islanders worshiping your Tiki (the horned red-eyed god), which would have clued a player in which of the two sets of islands they controlled.\u00a0 (Hence the odd left gap in the dialog boxes, and the confusion some pointed out about where to aim the fireballs. :))<\/p>\n <p>This was all cute, but disaster struck!\u00a0 Sometimes, when destroying an island, my islanders would swim to a nearby island and join it (as intended).\u00a0 However, they wouldn&#8217;t stop joining.\u00a0 The game quickly crawled to a halt when over 50,000 sprites were rendered.\u00a0 Oops!\u00a0 A lack of a Flash debugger really hurt me here.\u00a0 I wasn&#8217;t aware that the Flex SDK comes with fdb, so I had to debug the old fashioned way:\u00a0 Hack and slash until the problem went away.\u00a0 I eventually narrowed it down to a bug in the abandonment routine, which checked to make sure the islanders were swimming towards a still-existing island.<\/p>\n <p>The final pieces were falling into place, but I was quickly running out of time.\u00a0 I wrote a very simple AI, which simply only had one job due to unfinished game mechanics:\u00a0 Select where to aim on the screen.\u00a0 That wasn&#8217;t too difficult, but a subtle bug would later come to bite me concerning AI aiming&#8230;<\/p>\n <p>There were two components left for what I considered a&#8221;complete&#8221; game:\u00a0 The bumper code, which is my term for things like overall game state transition, level changes, and so on.\u00a0 And the construction of at least three levels.<\/p>\n <p>The bumper code wasn&#8217;t hard to write.\u00a0 Just simple state transitions, a quick five minute title\/won-the-game screen.\u00a0 But this is when the subtle bug reared its ugly head.\u00a0 I had less than 15 minutes to the deadline, but when you switched levels, the AI pulled a brilliant move of randomly flinging fireballs instead of aiming at the player-controlled islands!\u00a0 Argh!<\/p>\n <p>I went ahead and submitted the game as-is, not realizing that we are given a chance to fix such game-breaking bugs after the deadline.<\/p>\n <p>I managed to find the cause of the bug a mere five minutes after I hit submit;\u00a0 When changing level states, I wasn&#8217;t clearing the AI targeting parameters.\u00a0 As simple as the AI was, it just targeted the same (now non-existent) island location as before.<\/p>\n <p>This was due to oversight caused by my rushing.\u00a0 Instead of taking the sane route of simply switching game-states between levels (and storing persistent info elsewhere), I tried to cram everything into the same state and just cleared the commonly data structures between levels.\u00a0 I mean, the game isn&#8217;t that complicated, right?\u00a0 This is where having no working runtime inspector\/debugger really hurt me.<\/p>\n <p><strong>In Closing<\/strong><\/p>\n <p>All-in-all I had a blast!\u00a0 And the resultant game is, IMHO, worthy of pursuing as its own complete project entirely outside of LD48 even if it doesn&#8217;t come close to winning.\u00a0 I couldn&#8217;t ask for more!<\/p>\n <p>See all of you next time. <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\/ld17\/\" rel=\"tag\">LD17<\/a>, <a href=\"http:\/\/ludumdare.com\/compo\/tag\/postmortem\/\" rel=\"tag\">postmortem<\/a><\/p>","time":"April 27th, 2010 3:50 am","title":"Jealous Gods: Postmortem"}