How to Build a Car Game to Play
Racing games, automobile simulations and other car games make up a popular subset of genres in video entertainment. Car enthusiasts love to push automobiles to their limit, but real life rarely allows the luxury of unrestrained driving. Video games can fulfill this desire with varying degrees of realism. Whether a car game is a faithful simulation to real-life machines or a caricature that only copies the most obvious features of cars, their designers have to adhere to the specific conventions and physics of the genres.
Things You'll Need
- Sketchpad
- Notepad
- Computer
- Graphics engine
- Map editor
- Programming code compiler
- 3D modeling program
Instructions
-
-
1
Select a genre for the game. If it's a racing game, consider whether races will take place on a track, in urban settings or off-road. If driving is part of a larger simulation, like in "Grand Theft Auto," consider how cars serve a function in the context of the larger game. Compile a roster of vehicles that will be featured in the game on paper. Make vehicles with different features to account for different driving styles. Strive for balance: if one car is very fast, make turning difficult or acceleration slow (and vice versa).
-
2
Translate the features of the car into physics code for the game. Remember that a computer simulation is not real life and no aspect of real-life physics can be taken for granted---everything must be consciously taken into account and incorporated. Set the constant of gravity to be applicable to all objects in the world at all times, in the form of constant downward movement unless the object is in contact with a surface below it. Incorporate the acceleration and deceleration of specific vehicles by setting a top speed for vehicles and writing the code for the vehicle to build speed gradually as long as a button is pressed. Conversely when the button is not pressed, set the vehicle to slow down gradually before it comes to a stop. Make turning conditional on forward movement of the vehicle.
-
-
3
Build 3D models of the vehicles in the modeling program by starting with basic 3D shapes and using other shape tools to subtract space much in the same way a sculptor would chisel away at marble. Make the wheels separate objects that are capable of rotating on their own. At least two of them should be capable of twisting left or right. Reopen the programming code for the vehicles and add instructions to cause the relevant wheel animations with the instructions (wheel-twisting to accompany turns, spinning to accompany acceleration/deceleration, etc.).
-
4
Build the game maps in the map editor. If this is a racing game that takes place on a closed track, don't bother to create anything where the player won't be able to go---it will just slow down the computer. Instead place a convincing facade just beyond the track rail. Apply this principle even to games where the player will be able to drive across the world more freely---if the player can't go there, don't build it.
-
1
Tips & Warnings
To make the car game's physics more realistic, give different surfaces properties that will affect the car's physics. If the car is on mud, program the surface to subtract from the car's acceleration, add to the deceleration and make turning unstable. On the opposite end of the spectrum, paved asphalt should cause little to no affect on the vehicle's physics attributes.
References
- Photo Credit fast car image by chrisharvey from Fotolia.com