Death Race

Death Race

Death Race is a two player top-down racing game. In this game you drive around a track shooting at each other trying to win the race. There are two tracks to choose from, both going clockwise around the track.

Each player has keys to accelerate, reverse, turn left, turn right and to shoot a rocket. Rockets can be used to destroy other cars, and include sound effects for firing and exploding. The sounds took a bit of work to get right. The mechanism uses a lot of alarms to ensure they start and stop with the right timing.

The different surfaces of the map affect the acceleration of the player’s car. Driving on tarmac is the most efficient, as driving on a different surface such as grass or dirt will slow the car down. The ice area is especially fun, as it makes the car slip and slide around, and makes steering less precise.

Download the game

Start screen

Screenshot_092115_101257_PM

The start screen allows the user to select which track they would like to play. It also provides clear visual instructions for the player’s controls through the graphics on either side of the screen. The keyboard key clip art was retrieved from WPClipart, and assembled in GIMP. The text was generated with Cool Text.

Working with tiles

One major issue we ran into with this project was the track design. Originally, each 32×32 square of the track was an individual object instance (grass, tarmac, barriers, etc). However, this was causing the game to not only save and build slowly, but it also caused a long delay in loading the room. We were able to improve matters by replacing the non-obstacle objects with tiles. Tiles are added as background images, so you need to create a single image containing all of the sprites you wish to use as tiles. Then you need to add this image as a background in GameMaker, configuring it to act as a tile set. Once completed, you can add tiles to rooms using the tiles tab of the room settings.

Screenshot_092115_102345_PMtrack_tiles

However, now we were presented with another issue: it would take ages to manually individually remove each object and replace it with a tile. Fortunately, all items in GameMaker, from objects to rooms to projects are represented by a simple XML file. I was able to edit this file in a text editor and use regular expressions to replace all occurrences of a certain object with the correct syntax for tiles. It still took a while to rework the file to use the correct format, but it was still pretty fast and efficient.

This method worked so well that the track rooms were now loading instantly, and we could remove the loading screen altogether. We were able to further optimize the rooms by removing the grass tiles and simply setting the grass pattern as the global background for the entire room.

One bug I did notice when using tiles was that lines would appear on the screen in between the tiles while the player was moving. After some research, I found that this could be resolved by disabling the “Interpolate colors between pixels” option of the Windows Graphics settings in the Global Game Settings area.

Screenshot_092115_101827_PM

Created by Ashton, Shea, and Brock

One Reply to “Death Race”

  1. It was pretty fun to play considering you was able to race and shoot, I love the aspect of the rockets shooting out of the front of the cars, but I hated the fact you crashed on invisible pieces of grass.

Leave a Reply