{"author_name": "Bartje321", "cat": "LD #21", "comments": [{"author_name": "panzermancer", "time": "August 22, 2011 1:30 pm", "epoch": 1314037800, "text": "This looks, sounds, and most likely plays almost exactly for the highway-driving example game released for GM6 and GM7&#8230;", "spam": "N"}], "epoch": 1314037320, "likes": 0, "metadata": {"p_key": "63768", "p_author": "Bartje321", "p_authorkey": "5164", "p_urlkey": "99553", "p_title": "", "p_cat": "LD #21", "p_event": "LD21", "p_time": "1314037320", "p_likes": "0", "p_comments": "1", "p_status": "UPD5", "us_key": "5164", "us_name": "Bartje321", "us_username": "bartje321", "event_start": "1313712000", "event_key": "7", "event_name": "LD21"}, "text": "<p><img src=\"http://www.ludumdare.com/compo/wp-content/uploads/2011/08/ld21_small.png\" alt=\"Freeway Escape\" /></p>\n <p>This was my first time i entered Ludum Dare.</p>\n <p>I only had 12 in total to work on my project.  But somehow i got something working.  I decided to create a game where you have to escape the cops on the freeway.  I tried to make it not to complicated,  so i could finish it in the limited time i had.  I started by creating some of the base code and the graphics for the game.</p>\n <p><img style=\"border-style: initial;border-color: initial;margin-left: 5px\" src=\"http://www.ludumdare.com/compo/wp-content/uploads/2011/08/ld21-150x300.png\" alt=\"Freeway Escape screenshot\" width=\"200\" height=\"400\" align=\"right\" /></p>\n <p>The base code was nothing more than an applet with double buffering,  a thread with frame limiter to progress the logic,  a key-listner for user input and a loader class to easily load resources into the game. I lost almost a hour figuring out why my applet didn&#8217;t draw a thing.  It was a stupid mistake.  I called thread.run  (which doesn&#8217;t start a new thread)  instead of thread.start  (which does start a new thread).</p>\n <p>The graphics took me most of the day.  I spend around 3 hours drawing the cars and the road,  and another half hour for the lights sprites.  Regionally i wanted to add different road tiles,  so the road wouldn&#8217;t be boringly repeating itself,  but there was not enough time.  After this the Saturday was finished for me. I didn&#8217;t even had a single car driving yet.</p>\n <p>Sunday i started on the main code,  unsure if i had enough time left.  First i got the player car driving,  which was actually quite easy.  After that i worked on the other cars.  After an hour or 2 i got a &#8220;<em>working</em>&#8221; game.  But it was still quite boring,  because you could drive through everything.  So Time for collision detecting.</p>\n <p>After the collision detection and writing code for the sprites.  I had to create the title and game over screen.  Which got finished just in time.  After this i had to go away for a while so i shut down my computer.</p>\n <p>After starting my computer back up&#8230;  disaster strikes.  All my images where gone&#8230;  I think eclipse throw them away,  but i&#8217;m not sure about that.  I tried a recovery tool,  but no luck there. Luckily i had posted an screenshot on twitter from where i could recover a lot of the graphics.  It took me a pressures hour to restore the damage.</p>\n <p>I still had to code the police cars but the clock was running out.  So i hadn&#8217;t much time to tweak the behavior.  Especially the detection if it can go left or right is a bit broken,  so it can happen that police cars overlap each other a bit,  or drive full speed into an other car.</p>\n <p>I haven&#8217;t had any time to include sounds,  so the game is a bit silent.  On the other hand it saved me some time programming a mute button.</p>\n <p>Lessons learned:</p>\n <ul>\n <li>Try to make more time free,  12 hours is really tight.</li>\n <li>BACKUP!!! It could save me an hour.</li>\n <li>Basic code,  so i can start on the game code directly.</li>\n <li>Graphics are hard and cost a lot of time</li>\n </ul>\n <p>You can find the game (including the source) <a title=\"Freeway Escape\" href=\"http://bartje321.com/ld21/\" target=\"_blank\">here</a>.</p>", "time": "August 22nd, 2011 1:22 pm", "title": ""}