[portfolio] [portfolio-entry] [portfolio-attrs image=”http://miromannino.com/wp-content/uploads/ur2009-main-mage.png”] [portfolio-attr label=”Category”]PC Car Racing Game[/portfolio-attr] [portfolio-attr label=”Release Date”]01/2009[/portfolio-attr] [portfolio-attr label=”Technologies”]Java, Java2D[/portfolio-attr] [portfolio-attr label=”Download”] Windows | Ubuntu | Mac OS X [/portfolio-attr] [/portfolio-attrs] [/portfolio-entry] [/portfolio]

An hard game. Discover how much better you are to drive, with a with a crazy, that will entertain you with. Beat your lap records running faster, and measure your drifting abilities. Win the challenges, going fast also through the pit lane to refuel the car.

Game Modes

The game has different game modes.

Free Game

Drive fast and do the best lap times! With the free game you have only to run fast to do the best lap time, and to beat your records. Furthermore, there is a concept of drift points: you must turn with the car without decrease the speed, the faster you go and the more points you earn.


In this type of game you have to complete some number of laps as fast as possible.
You have a limited quantity of fuel, you need to stop your car into the pit lane to recharge your fuel.

How it works

I made this game to understand the limitation of Java in 2D rendering, without using some game engine, starting from the basics, enjoying to make fast algorithms and components.


The bigger problem making this game was the collision detection.

The first test was do it with a collection of rectangles, but this solution needs a lot of computation to know if the car is colliding with an object. Furthermore, this solution needs a lot of rectangles to respect the object shapes.

The last test was to build a map with two images: the first image to show the game to the user, the second image to compute the collisions.

The collision image is a gif with only five possible colors:

  • #808080 for the street
  • #FF0000 for collision
  • #00FF00 for the grass (decreases the speed of the car)
  • #0000FF for the box

Despite this solution requires more memory, in this way, check if a car is colliding is very fast: O(1). Furthermore the quality of the collision detection is very high.

The map has got other files too: a file that describes the checkpoints coordinates and a file that describes the times and the initial fuel for the challenge mode. All these files is zipped, and the archive is renamed with the extension “.map” and placed into the game folder. You can unzip those existing maps to learn how to make your own maps.