Freeway Escape

This was my first time i entered Ludum Dare.

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.

Freeway Escape screenshot

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’t draw a thing.  It was a stupid mistake.  I called thread.run  (which doesn’t start a new thread)  instead of thread.start  (which does start a new thread).

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’t be boringly repeating itself,  but there was not enough time.  After this the Saturday was finished for me. I didn’t even had a single car driving yet.

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 “working” game.  But it was still quite boring,  because you could drive through everything.  So Time for collision detecting.

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.

After starting my computer back up…  disaster strikes.  All my images where gone…  I think eclipse throw them away,  but i’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.

I still had to code the police cars but the clock was running out.  So i hadn’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.

I haven’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.

Lessons learned:

  • Try to make more time free,  12 hours is really tight.
  • BACKUP!!! It could save me an hour.
  • Basic code,  so i can start on the game code directly.
  • Graphics are hard and cost a lot of time

You can find the game (including the source) here.

Comments

panzermancer
22. Aug 2011 · 18:30 UTC
This looks, sounds, and most likely plays almost exactly for the highway-driving example game released for GM6 and GM7…