Game Development Reference
Figure 11.17 The completed
tunnel shooter example.
Part Two: Physics
The correct name for this half of the chapter really should be two-
dimensional, algebraic physics, since that
re going to dis-
cuss for our purposes. Physics is, among other definitions, the
science of the behavior and interaction of objects in the universe
around us. It includes concepts such as forces, mass, and energy.
The field of physics is a vast area of study, and this chapter focuses
on one specific branch of it, known as mechanics . Even more speci-
fically, we will be looking at classical mechanics ,which,among
other things, deals with the interactions between objects in our
visible, physical world. In the upcoming section, we will discuss the
concepts behind basic mechanics and how to apply them in games.
To start out, we need to establish some standardized vocabulary.
A scalar is simply a number in traditional mathematical terms. In
physics applications, it can represent a magnitude such as speed,
four miles per hour (4 mph), for instance. There is no information
about the direction or orientation of an object traveling at that speed.
In contrast to a scalar, a vector contains information about both the
magnitude of a physical element and its direction. The direction