Ultra Race 2009
A single player car racing game. 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 the fastest you can doing the best lap times!
In this modality you need to complete a certain number of laps as fast as possible.
There is a limited quantity of fuel, and 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 any game engine, starting from the scratch, enjoying the creation of fast algorithms and components.
The biggest problem making this game was the collision detection.
The first test was to do it with a collection of rectangles, but this solution needs a lot of computation in order to work. Furthermore, this solution needs the map creator to manually draw many rectangles too.
So in this game the map is split in two images: the first image to show the map to the user, the second image is created by copying that image, making it simple enough to be used by the collision detector.
The collision detection image is a simple gif with only five possible colors:
#808080for the street
#00FF00for the grass (decreases the speed of the car)
#0000FFfor the box
Despite this solution requires more memory, checking if a car is colliding is very fast:
O(1), and the quality of the collision detection is very high.
The map has 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 are archived in a zip file, which is renamed with the extension “.map”. You can unzip the existing maps in the game to make your own maps.