FastCar main page ]


"As a rule physical simulation by itself is not a big source of interest in a game. It is only a means to get a short path to acceptance by player."

Introduction

FastCar has been initially designed to provide a set of tools for simulation in a racer game or a vehicle simulation application. The idea of the FastCar package was to cover aspects of work on dynamics common to different vehicle simulation application. It grew to the package with a set of complete collision detection solution and a multi-body engine.

With FastCar library you will be able to have cars driving on roads or terrain and colliding with walls, trees, posts. Cars rolling and hitting each other. You will be able to have objects like stones, balls, boxes or of any other shape interacting with ground, trees, walls, cars and each other. You'll be able to simulate systems of jointed bodies.

Car simulation features:

Multi-body features:

Collision detection features:

Other features:

 

Both single bodies and cars have virtually all possible get/set requests for positions, orientations, velocities, accelerations, forces; tools for saving/loading.

 

 

Structure of the complete package is the following:

Will all application using FastCar be the same? Not at all. They all will have common quality of good car physics and the behavior that is very easy to learn or adapt to. But different parameters will make all the FastCar instances substantially different.

You build a car by defining a number of physical and geometrical parameters such as mass and dimensions. You also set more involved parameters such as suspension stiffness and suspension damping. We have provided methods to automatically guess good values for all parameters that can cause difficulty.

To define the car you need to specify static parameters: 1) masses and moments of inertia of wheels and chassis, 2) positions and radii of wheels, 3) gravity, 4) suspension strength (there is a method to suggest a good value), 5) suspension damping factor (there is also a method to get good value and you will probably use it). These static parameters can be changed in run-time if necessary, for example, as the car gets damaged. Dynamic parameters such as position and velocity are continually changing in run-time. In run-time you have access to all quantities and can control everything.

For driving the vehicle your task is to provide collision detection information between the wheels and the ground. In particular, for every contact between a wheel and the ground you must supply three quantities: normal vector to the ground, position vector of contact point and penetration distance. This is quite standard among physics packages.

Some form of collision detection is present in most games, since interaction of objects based on distance is not uncommon in games. It is quite commonly accepted and in agreement with our experience that collision detection (CD) and collision culling or at least substantial parts of them are often specific to applications.

We provide many low-level CD routines and one "far field" implementation which you can use in your application.

The car library provides you with a simple interface to:

See also Overview of functionality.

If you have multiple cars or objects in a game they are completely independent: e.g. they can be integrated with different rates; some can be frozen; they can each have their own simulation options. At the same time you can do interactions between them such as collisions or joints. The library is versatile, yet at the same time very simple.


FastCar main page ]