Make A 3d Racing Game

Converting a 2-D game to 3-D is another way to make games.

Three-dimensional racing games apply operations of 3-D geometry to allow gaming algorithms to manage virtual vehicles. One way of making a 3-D racing game is to program one from scratch, including writing a detailed description of gameplay and reading tutorials on programming in a particular language. A less time-consuming way to make 3-D racing games involves emulating and then modifying existing ones. Making your own 3-D racing game makes it possible for you to use custom vehicles found in no other game. You can race dinosaurs against spaceships, for example.


1. Play several open source 3-D racing games, then download the source code archive for the game you want to model your game after. This archive is available from the same site as the one containing the game’s executable. Example 3-D racing games include TORCS and TuxRacer.

2. Get a software development system for the language the racing game was written with. The documentation in the archive you downloaded mentions this language. Java systems are available from Oracle’s JDK site, and C systems are available from the GNU Compiler Collection web pages.

3. Compile the source code for the racing game by following the detailed instructions in your development system’s documentation.

4. Open in a word processor each source file from the archive. Read all coding statements in these files, and write on paper a list of all variables for the program. You can generally identify variables by finding words written next to the following keywords, among others: “int,” “integer,” “string,” and “var.” Read details about identifying variables for Java on Oracle’s “Java variables” page. Read about C variables from a free PowerPoint presentation on the University of Maryland, Baltimore County site.

READ  What Is The File Extension 3dmf

5. Execute the program’s statements one at a time using your development system’s debugging utility. This type of execution is called tracing or stepping through code. As you trace, write on the list from the previous step the new values that each variable takes on. By understanding how a program’s variables change, you will understand the game’s source code. For example, while tracing through a boat racing game, you notice that the variable “ship1.rudder” changes whenever you drag a steering wheel icon during gameplay. You may guess that “ship1.rudder” represents the naval device that makes the virtual boat turn.

6. Write comments in the code for each statement you understand. The more you trace, the more statements will have your comments attached to them. When you can write an explanatory comment for every line of the code, you’ll understand the code well enough to make changes to it.

7. Change some of the source’s numeric or string literals, recompile the source, then write your observations on the effect of your changes on gameplay. For example, observe the effect of changing the “20” to “40” in the hypothetical statement “hull_length=20.” These small changes provide a gentle introduction to programming the 3-D racing game.

8. Write code that implements broader changes until the original game becomes unrecognizable. One example of a broad change is moving the game’s setting from the Atlantic Ocean to another planet. After making a few such changes, the game will be your own creation.