{"author_name":"doos","cat":"LD #26","comments":[],"epoch":1367344440,"likes":0,"metadata":{"p_key":"42953","p_author":"doos","p_authorkey":"19350","p_urlkey":"78588","p_title":"Feng Shooey postmortem","p_cat":"LD #26","p_event":"LD26","p_time":"1367344440","p_likes":"0","p_comments":"0","p_status":"UPD5","us_key":"19350","us_name":"doos","us_username":"doos","event_start":"1366934400","event_key":"16","event_name":"LD26"},"text":"<p><span id=\"more-252512\"><\/span><\/p>\n <p><strong>What went right?<\/strong><\/p>\n <p>Animation works! I integrated an animation system which uses image references based on an animation state.<\/p>\n <p>Mostly consistent style! I used less colours and also added a slight orange tint to the final scene. I used a lot of real pictures such as the background. I also made the levels (replaced pngs doodled in a tray of salt). The wall graphic works really well as a texture (minus the tiling), though the garden itself was a bit of a hassle, and I spent a few hours finding an appropriate texture for that before resorting to basics (the salt has a slight grey tint). Building a concept image really helped this.<\/p>\n <p>Basic gameplay: The shooing mechanism wasn&#8217;t what I first intended, the original idea was that the cat and dog were messing up the level and you were sorting it out (cough, Fix it felix, cough).<\/p>\n <p>Ideas: I generated a few then picked what I considered to be a rare idea. My first ideas were all like mondrial crazy painter, so I wanted to get away from that. It was good coming back to my ideas later to appraise them critically, rather than being swept up near the start.<\/p>\n <p>&nbsp;<\/p>\n <p><strong>What went wrong?<\/strong><\/p>\n <p>Timing: I had a few ideas for themes at about 5am, but I started at about 3pm on Saturday, 12 hours after the start. I then lost some supplies so didn&#8217;t really do much on Saturday apart from draw some resources and build the concept image.<\/p>\n <p>Art: My import process was sloppy as I was taking photographs of faint coloured pencil drawings. I should have been using my scanner from the start. Also, I decided to learn animation on the fly, and didn&#8217;t have a workflow to help me do that. It would have been handy to have my multiple layers within a single frame object in Gimp, rather than having layers everywhere.<\/p>\n <p>Swing: I had an issue with my double buffering. Turns out I was using 2 backbuffers so when i flipped from the backbuffer for the first frame, that was blank and nothing showed. Similarly, I had problems with only certain objects using double buffering too, which all meant it took me a while to get anything of note on the screen. Even with referencing my working projects.<\/p>\n <p>Perfectionism: Although I could have probably submitted for the 48 hours on Sunday, I was sleepy after a late lunch and it just wasn\u2019t polished enough to submit.. I&#8217;ve done 72 successfully.. The 48 hours is the next goal to break!<\/p>\n <p><b>Things of note:<\/b><\/p>\n <p>I put poop into the game at 5 hours to because my sister mentioned it. The code is awesome:<\/p>\n <p><b>if<\/b> (&#8220;TURDING&#8221;.equals(animationSequence)){<\/p>\n <p>Long currentPoopStart = GameState.<i>getAsLong<\/i>(key, GameState.<i>POOPOFFSET<\/i>);<\/p>\n <p><b>long<\/b> poopDuration = startTime-currentPoopStart.longValue();<\/p>\n <p>\/\/\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 System.out.println(poopDuration);<\/p>\n <p>MyBoolean pooped = GameState.<i>getAsMyBoolean<\/i>(key, GameState.<i>POOPED<\/i>);<\/p>\n <p><b>if<\/b> (poopDuration &gt; 2000 &amp;&amp; pooped == <b>null<\/b>){<\/p>\n <p>\/\/ thats a long enough <span style=\"text-decoration: underline\">poop<\/span>.<\/p>\n <p><b>int<\/b> <span style=\"text-decoration: underline\">turd<\/span> = GameState.<i>add<\/i>(&#8220;turd&#8221;, <b>new<\/b> MyXY(location.x, location.y+3));<\/p>\n <p>GameState.<i>addField<\/i>(key, GameState.<i>POOPED<\/i>, <b>new<\/b> MyBoolean(<b>true<\/b>));<\/p>\n <p>}<\/p>\n <p><b>if<\/b> (poopDuration &gt; 3200){<\/p>\n <p>\/\/ figure out where to go<\/p>\n <p><b>int<\/b> returnX = -150;<\/p>\n <p><b>if<\/b> (!rand.nextBoolean()){<\/p>\n <p>returnX = 1150;<\/p>\n <p>}<\/p>\n <p>&nbsp;<\/p>\n <p>\/\/ run along now<\/p>\n <p>MyXY targetDestination = <b>new<\/b> MyXY(returnX, location.y);<\/p>\n <p>GameState.<i>addField<\/i>(key, GameState.<i>TARGET<\/i>, targetDestination);<\/p>\n <p>}<\/p>\n <p><b>else<\/b> {<\/p>\n <p>\/\/ keep doing what you&#8217;re doing, kitty!<\/p>\n <p><b>continue<\/b>;<\/p>\n <p>}<\/p>\n <p>}<\/p>\n <p>&nbsp;<\/p>\n <p>I also made this really weird data structure to save any parameter to any integer key. It isn\u2019t normal, but it meant that instead of adding a hundred parameters to every object, I could add new parameters whenever I needed and not have really unwieldy objects with a hundred unused getters and setters. I\u2019m not sure if it is a side effect, but I didn\u2019t notice any garbage collection or slowdown either. It\u2019s quite bizarre, as I was really lazy and left my objects in the hash rather than removing anything.<\/p>\n <p>&nbsp;<\/p>\n <p><b>public<\/b> <b>static<\/b> HashMap&lt;Integer, HashMap&lt;Integer, Object&gt;&gt; <i>objects<\/i> = <b>new<\/b> HashMap&lt;Integer, HashMap&lt;Integer,Object&gt;&gt;();<\/p>\n <p><b>public<\/b> <b>static<\/b> <b>int<\/b> add(String type, MyXY location){<\/p>\n <p><b>int<\/b> newKey = <i>objectsPresent<\/i>++;<\/p>\n <p><i>objects<\/i>.put(newKey, <b>new<\/b> HashMap&lt;Integer, Object&gt;());<\/p>\n <p><i>addField<\/i>(newKey, <i>TYPE<\/i>, type);<\/p>\n <p><i>addField<\/i>(newKey, <i>LOCATION<\/i>, location);<\/p>\n <p><b>return<\/b> newKey;<\/p>\n <p>}<\/p>\n <p>&nbsp;<\/p>\n <p>To finish, I think this was a very successful Jam, and while the game looks and acts like a real game.. It doesn\u2019t really have the fun factor (and its a matter of time until catmoggeddon). I would typically start from a basic programming concept, make it work, make it interesting, and then try to fit some art into that and make it challenging afterwards. Though if I had done that, I would have likely built a completely different game and focused on the cleaning up mechanic rather than chasing cats.<\/p>\n <p>&nbsp;<\/p>","time":"April 30th, 2013 12:54 pm","title":"Feng Shooey postmortem"}