Chapter 16. Physics for Prediction

Key Topics

  • Foundations

  • The Perfect Intersection

  • Predicting Behavior

  • Simulation Algorithm

  • Experimentation

  • Evaluation

Accurate shooting can be understood as a combination of many skills. One of these is the ability to predict what's going to happen in the near future. This involves anticipating player movement, as well as understanding the ballistics of the projectile. We'll focus on this aspect of shooting in this chapter.

Throughout the explanations, we'll assume that the aiming can be done satisfactorily by just turning toward the estimated target. (Matching pitch and yaw angles is often good enough.) The weapon is fired whenever it's ready with an enemy present of course! The target selection itself is done implicitly as part of the prediction; the predicted outcome becomes the target.

In the quest to find the best place to launch a projectile at an enemy, this chapter covers the following topics:

  • Theory from Newtonian physics such as integration, used to simulate movement

  • A solution purely based on physics that solves an equation to find the target

  • A more practical approach to predicting movement using an iterative approach

  • The conditions for experimentation with predicting movement of other players

  • An analysis of the quality of the behaviors in the game, as well as the development process

By the end of the chapter, we'll have an animat capable of firing a weapon (with slow projectiles) to intercept a moving enemy.



AI Game Development. Synthetic Creatures with Learning and Reactive Behaviors
AI Game Development: Synthetic Creatures with Learning and Reactive Behaviors
ISBN: 1592730043
EAN: 2147483647
Year: 2003
Pages: 399

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net