Game Development Reference
In-Depth Information
the math of continuous things is a lot less unwieldy than the math of dis-
crete things. That's why the people who were thinking about how the world
works in the 15th century were happy to invent a mathematics for a contin-
uous universe; experimentally, it was a good approximation to reality, and
theoretically the math worked out nicely. Sir Isaac Newton was thus able to
discover a lot of fundamental results about continuous mathematics, which
we call “calculus,” and its application to the exploration of a continuous
universe, which we call “physics.”
Now, we're mostly doing this so that we can model a game world in-
side a computer, which is inherently discrete. There's a certain amount of
cognitive dissonance involved with programming a discrete simulation of a
continuous model of a discrete universe, but we'll try not to let it bother
us. Su ce it to say that we are in complete control of the discrete universe
inside our game, and that means that we can choose the kind of physics
that applies inside that universe. All we really need is for the physical laws
to be su ciently like the ones we're used to for the player to experience
willing suspension of disbelief, and hopefully say, “Wow! Cool!” and want
to spend more money. For almost all games that means a cozy Newtonian
universe without the nasty details of quantum mechanics or relativity. Un-
fortunately, that means also that there are a pair of nasty trolls lurking
under the bridge, going by the names of chaos and instability, but we will
do our best to appease them.
For the moment, we are concerned about the motion of a small ob-
ject called a “particle.” At any given moment, we know its position and
velocity. 1 The particle has mass. We do not concern ourselves with the ori-
entation of the particle (for now), and thus we don't think of the particle as
spinning. The particle does not have any size, either. We will defer adding
those elements until later, when we shift from particles to rigid bodies.
We are studying classical mechanics, also known as Newtonian mechan-
ics, which has several simplifying assumptions that are incorrect in general
but true in everyday life in most ways that really matter to us. So we can
darn well make sure they are true inside our computer world, if we please.
These assumptions are:
Time is absolute.
Space is Euclidian.
Precise measurements are possible.
The universe exhibits causality and complete predictability.
1 Thanks to Heisenberg, we know that's not possible on the atomic level, but when
we said “small” we didn't mean that small.
Search WWH ::




Custom Search