Build A 3d Car Game

Use a free integrated development environment to speed car game coding.

Building a 3-D car game is a computer programming project. A key task in this project is using a computer language like C++, Java or Fortran to call on 3-D graphics functions in pre-built code libraries. Basic examples of these functions include routines for moving, rotating and sizing a virtual object. Combining car game logic with these routines forms the basis of a 3-D car game. Building your own 3-D car game lets you add features that no other game has. It also teaches you marketable programming skills especially useful for other graphics-oriented projects.


1. Download the source code for a 3-D car game like CarDriving or 3D Multiplayer Car Racing Game.

2. Get (download) a software development kit — otherwise known as an SDK — or compiler for the computer language the car game was written in. Learn what this language is by reading the documentation that comes with the source code you downloaded in step 1. You can get a Java SDK from Oracle’s Java site, and a Fortran compiler from GCC Fortran site.

3. Read, at the bottom pane of Windows Explorer, the sizes of each of the source files from step 1. Right-click the file with the smallest size, select “Open with,” then select a word processor to open the file with.

4. Read the source file completely, including all its code and comments. Even without knowing a bit of computer programming, you’ll be able to understand much of the code.

5. Write, when you do understand a line you’ve read, a new comment in the source that reflects that understanding. For example, you might read the statement “void DisplayCarBoard1(CarClass *car)” and write next to it “This is a function that shows the main game environment on the screen.”

READ  Build Virtual 3d Screen Software

6. Make changes to string and numeric constants, for those statements you understand. For example, you might change the 20 to a 5 in a line like “If (currentPoints == 20) then startNextLevel();”

7. Memorize the game’s source code, one file at a time, using whatever memorization technique you’ve previously found effective. For example, you might begin by writing the filename for each source file on one side of a 3×5 index card, then list just the function names of that file on the back. This forms the basis of a flashcard game: recite each card’s back after reading its front.

Memorizing code reveals the algorithmic and data structures the developers wrote the program with. According to Dr. Bill Klemm, neuroscience professor at Texas A&M University, memorization requires thought. Human minds constantly seek ways to simplify complex and confusing stimuli–which computer code is an example of. In memorizing code, your mind will search for patterns, structures, order, and meaning it can use to organize the code. Every computer program is bursting with such order, because all programs are made by people with the same order-seeking minds. In short, memorization requires thought, which yields understanding.

8. Clarify all the source code’s confusing statements by replacing unclear words and numbers with those that make sense to you. This doesn’t change the game’s code, but makes it easier to read. For example, you might clarify the statement “play1.Units = 10” by replacing it with “EnemyCar.GasUnits = TEN_LITERS.”

9. Write (on paper) a list of bigger changes like “I’ll set this game on the streets of Paris instead of a raceway in Daytona, Florida.” Make each item in this list as specific as you can because this makes coding the item easier.

READ  Use A Simplink On An Lg Tv

10. Write the code for each item in your list, then compile the modified source code. Refer to your SDK’s instructions for detailed instructions on compilation.