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, Chapter 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 ...

Get Physics for Game Developers, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.