Game Development Reference
In-Depth Information
CHAPTER 6
Projectiles
This chapter is the first in a series of chapters that discuss specific real-world phenomena
and systems, such as projectile motion and airplanes, with the goal of giving you a solid
understanding of their real-life behavior. This understanding will help you to model
these or similar systems accurately in your games. Instead of relying on purely idealized
formulas, we'll present a wide variety of practical formulas and data that you can use.
We've chosen the examples in this and later chapters to illustrate common forces and
phenomena that exists in many systems, not just the ones we'll be discussing here. For
example, while Chapter 16 , “Ships and Boats,” discusses buoyancy in detail, buoyancy
is not limited to ships; any object immersed in a fluid experiences buoyant forces. The
same applies for the topics discussed in this chapter and Chapter 15 , Chapter 17 , Chap‐
ter 18 , and Chapter 19 .
Once you understand what's supposed to happen with these and similar systems, you'll
be in a better position to interpret your simulation results to determine if they make
sense—that is, if they are realistic enough. You'll also be better educated on what factors
are most important for a given system such that you can make appropriate simplifying
assumptions to help ease your effort. Basically, when designing and optimizing your
code, you'll know where to cut things out without sacrificing realism. This gets into the
subject of parameter tuning .
Over the next few chapters, we want to give you enough of an understanding of certain
physical phenomenon such that you can tune your models for the desired behavior. If
you are modeling several similar objects in your simulation but want each one to behave
slightly differently, then you have to tune the forces that get applied to each object in
order to achieve the varying behavior. Since forces govern the behavior of objects in
your simulations, we'll be focusing on force calculations with the intent of showing you
how and why certain forces are what they are instead of simply using the idealized
formulas discussed in Chapter 3 . Parameter tuning isn't just limited to tuning your
model's behavior—it also involves dealing with numerical issues, such as numerical
 
Search Nedrilad ::




Custom Search