50 likes | 142 Views
Simple Techniques for Coordinated Behavior. Presentation by Jonathan Martin Based on Chapter 3.2 of AI Game Programming Wisdom 2, by Jeff Orkin. Tactical Espionage Action. Let’s continue the example from the last section Our agents use a simple pathfinding scheme (most likely A*)
E N D
Simple Techniques for Coordinated Behavior Presentation by Jonathan Martin Based on Chapter 3.2 of AI Game Programming Wisdom 2, by Jeff Orkin
Tactical Espionage Action • Let’s continue the example from the last section • Our agents use a simple pathfinding scheme (most likely A*) • We do not have enough resources for a group behavior layer
Let’s see what happens 1 1 • To avoid this, we can let agents “reserve” a path node • When a node is reserved, set its cost to something very high, so other agents will have to find another way 1 1 1
Let’s see what happens • Now we have the illusion of group behavior without a separate layer! 1 1 1 RESERVED 1 50 1
Get Out of My Way! • Now that we’ve surrounded the player, we want to shoot him without shooting each other • This can be done very simply on (fire) { if we have line of sight, fire! else if obstructing object is an ally, ask him to move! if ally is busy, or obstruction is not an ally, move! } • Adding audio cues adds to realism