A Game AI Case Study Greg Alt Surreal Software
The Suffering: Prison is Hell Surreal Software, 2004 Hierarchical Behavior System Movement Graph and Pathfinding Movement and Animation Demo
Hostility KillEnemies KillObject KillMelee MeleeCombatReposition MoveTo FollowPath SimpleMoveTo MovementAnim ArriveSteer FlankingSteer Hierarchical Behavior System Each NPC has a tree of current behaviors Each behavior is a C++ class Behaviors share common interface
Behavior Variation Designer-specified constants Alternate behaviors for different NPC-types BehaviorChangers to change root behavior dynamically Mixture of scripted and autonomous behavior
It’s All Fine Until You Get Shot External interruptions complicate things Hit-Reaction must restore high-level state Solution: push whole tree onto stack Push member function handles invalidated behaviors
Movement Graph and Pathfinding Nodes – 3D squares with scale and rotation Edge Regions – convex hull of 2 nodes Pathfinding – A* between 2 edge regions
Paths Aren’t Just for Moving From A to B Fast pathfinding allowed multiple uses: Accurate distance check Evasion paths Burrower flyby behavior NPCs leading player X X X
Movement and Animation “Intelligent Movement Animation for NPCs” in AI Game Programming Wisdom 2 Steering behaviors are children of SimpleMoveTo behavior Weighted average of steering accelerations Velocity determines translation and animation
Conclusion Hierarchical Behavior System Movement Graph and Pathfinding Movement and Animation
The Suffering: a Game AI Case Study Greg Alt Surreal Software