Game Development Reference
S TABILITY AND
there are two criticisms that can be leveled:
Occasionally strange effects are visible—for example, objects may appear
squashed or skewed, objects may slide down hills despite gravity, or fast-
moving objects may not behave believably.
For very large numbers of objects, the simulation can be slow.
We can address these problems to arrive at our final physics engine implementa-
tion, one that is powerful and robust enough to be used in a wide range of games. The
remaining chapters in the topic look at ways of applying or extending the engine, but
in this chapter we'll aim to polish our implementation into a stable and fast system.
The physics engine we've built so far is perfectly usable. As it stands, however,
Stability problems in our engine, as in all game software, arise from several directions:
Unpleasant interactions among different bits of the software that individually
Inaccuracies of the equations used or adverse effects of assumptions we've
The inherent inaccuracy of the mathematics performed by the computer.
These stability problems can become evident through visually odd behavior, algo-
rithms occasionally not working, or even sudden crashes.