The HD2002 stunt car simulation project

(Programmed by Filippo Di Natale )

 

The good old times when I was 16 y.o., a very funny and realistic arcade game caught my attention: its name was Hard Drivin'.
Its graphics was minimalist (almost no textures, very low poly count models) but the physics model, the steering wheel with force feedback, the fact that it was the first racing game using true 3d polygonal graphics and, expecially, the crazy track made me love it.
I always dreamed to be able to program a game like that, but only now the internet made this possible with the plethora of free libraries and tools that allow an amateur to write very interesting stuff in a matter of weeks.

Some screenshots (click to enlarge): 

 

HD2-1.JPG
 (36,5k)

HD2-2.JPG
 (34,9k)

HD2-3.JPG
 (34,2k)

HD2-4.JPG
 (32,9k)

 

Last update has been on: 26/02/2003

Lately I don't have time to work on the project.

Please drop me a mail (remove NOSPAM_) if you're interested in enhancing the progam.

If I receive enough requests, I'll release the sources and maybe we can set up a source forge project so people more skilled than me can enhance this little proggy.

 

Download alpha version 0.6 here.

 

The executable is compiled in release mode.
On some systems I've noted a strange behaviour: if the executable is compiled in release mode the game starts freezed and you have to press ESC to exit.
I tried it on a Athlon 1GHz GeForceMX400, release mode: it works.
K6-2 350MHz TNT: release mode doesn't work, debug mode goes smooth as silk.
Video settings can be modified editing the config.cfg file (have to add it in the docs) so you can adjust the game for your computer speed.
If you can provide me your results, please write me (delete NOSPAM...).
I still need to improve camera code.
The car is made of a body (its inertia matrix is made by a composition of primitives like boxes, spheres and cylinders, this can be specified in a configuration file - right now I use a simple box as this gives good results already) and a number of wheels (typically 4). In the ".car" file it's possible to specify how many wheels the car have, which model file they are drawn from, their position with respect to the center of the body, which are steering wheels, which are motor wheels. In other words, it's very simple to model your car in Blender and add it to the game, customizing the physical behaviour and visual appearence editing the text configuration files.
Making new tracks is also very simple, right now there is one track that resembles the original HD one.
Only I made a huge loop (HD's one was much smaller) because it's more fun to see all the ground turning through its translucent surface and it's height makes you feel like in a flight sim : ) - not recommended if you fear great heights.
The car is a model I quickly put together in Blender, it's the first car I had when I turned 18, a FIAT 127 (now it has been demolished, so this is my tribute to it - I had many funny moments with it ; ) I plan to add reflections on it (env map) and better textures (this one sucks a bit). Other problems are: the geometric model of the wheels (the one used for collision detections) is a sphere, this makes the car extremely simple to turn upside down if you steer too quickly - this is also fun because you can make acrobatic 2 wheels runs carefully steering, but sometimes this makes the control very difficult (expecially on the "lifted curve", I don't know how to call it - see the screenshots!). When Erwin's code will support cylinder-mesh collision detection it will be possible to solve the problem. Due to the use of ODE, the simulation is very convincing: when you jump off the "opened bridge", if you're too fast the car will fall with its front wheels first, making you eventually turn upside down. I plan to add a "replay" feature because of of the fun of reviewing your incidents/stunts.
Adding artificial opponents is very difficult since they should know how to handle the car with respect to physics - I envise a possible multiplayer scenario instead. First thing first, I have to add a timer that measures your lap performance and the infamous timer that let you stay off track 10 seconds, after which you are resetted to the previous waypoint (side task: define waypoints for tracks).

Libraries and tools used for the project:

 

 

After a lot of struggle in order to find the correct tools, I finally found what suited me:


I could not make anything without the help of: