{"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. \u00a0But somehow i got something working. \u00a0I decided to create a game where you have to escape the cops on the freeway. \u00a0I tried to make it not to complicated, \u00a0so i could finish it in the limited time i had. \u00a0I 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, \u00a0a thread with frame limiter to progress the logic, \u00a0a 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. \u00a0It was a stupid mistake. \u00a0I called thread.run \u00a0(which doesn&#8217;t start a new thread) \u00a0instead of thread.start \u00a0(which does start a new thread).<\/p>\n <p>The graphics took me most of the day. \u00a0I spend around 3 hours drawing the cars and the road, \u00a0and another half hour for the lights sprites. \u00a0Regionally i wanted to add different road tiles, \u00a0so the road wouldn&#8217;t be boringly repeating itself, \u00a0but there was not enough time. \u00a0After 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, \u00a0unsure if i had enough time left. \u00a0First i got the player car driving, \u00a0which was actually quite easy. \u00a0After that i worked on the other cars. \u00a0After an hour or 2 i got a &#8220;<em>working<\/em>&#8221; game. \u00a0But it was still quite boring, \u00a0because you could drive through everything. \u00a0So Time for collision detecting.<\/p>\n <p>After the collision detection and writing code for the sprites. \u00a0I had to create the title and game over screen. \u00a0Which got finished just in time. \u00a0After 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; \u00a0disaster strikes. \u00a0All my images where gone&#8230; \u00a0I think eclipse throw them away, \u00a0but i&#8217;m not sure about that. \u00a0I tried a recovery tool, \u00a0but no luck there. Luckily i had posted an screenshot on twitter from where i could recover a lot of the graphics. \u00a0It 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. \u00a0So i hadn&#8217;t much time to tweak the behavior. \u00a0Especially the detection if it can go left or right is a bit broken, \u00a0so it can happen that police cars overlap each other a bit, \u00a0or drive full speed into an other car.<\/p>\n <p>I haven&#8217;t had any time to include sounds, \u00a0so the game is a bit silent. \u00a0On 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, \u00a012 hours is really tight.<\/li>\n <li>BACKUP!!! It could save me an hour.<\/li>\n <li>Basic code, \u00a0so 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":""}