JavaScript EditorFree JavaScript Editor     Ajax Editor 

Main Page
  Previous Section Next Section


This chapter covered the specification of interfaces to allow shooting behaviors:

  • The standard approach to aiming involves omniscient control, deciding when to hit or miss, and which point to target.

  • There are many ways to define an interface to expose such data to NPCs, allowing them to shoot (for instance, high level, or implicit model of projectile).

  • An interface in chosen to match the human controls, allowing animats to be realistic while maximizing their capabilities.

  • Most importantly, the visual capabilities of the system are extended to deal with projectile traces and gathering visible entities.

  • The weapons are made autonomous with automatic reloading. The weapon selection too is left aside until later.

In the next chapter, a "standard" approach based on physics predicts the trajectory of enemies. There are two approaches presented, either using simulation or equation solvers.

Practical Demo

There's an animat called Salty demonstrating the use of the new interfaces, downloadable in binary and source formats from Salty selects the closest player as its enemy, and points directly toward that location. Projectiles are fired during combat only.

      Previous Section Next Section

    JavaScript EditorAjax Editor     JavaScript Editor