Original Description:
A favourite of many games-players are racing games. These can be of the form of realistic games or futuristic ones. Of these a simple one is of the latter variety - games-writers need not stick to reality. A noteable example of this is the Wipeout franchise.
Many people wish to create a game like this. One of the many problems is generating a track, and I present one solution here, using splines (see my spline tutorial for details on how this code works).
It features several points of interest:
- Track shape generation via splines
- Ability to scale the track resolution on the fly
- Creating and using meshes
- A simple control mechanism
Note that using this to create the track is only the first step in creating a game like this - collision detection etc will all pose significant problems, especially if you wish to use this method's easy ability of creating mad looking hills, dips, jumps curves etc (all not shown in this demo precisely because I don't have collision detection in!). To see the track with hills, give some of the vectors in the track creation object a Y value (currently they are all set to zero, hence it's flat).