Basic Steering of Game Agents Featuring Guest professors Stephen Sheneman & Michael Wilkens 1.

15
Basic Steering of Game Agents Featuring Guest professors Stephen Sheneman & Michael Wilkens 1

Transcript of Basic Steering of Game Agents Featuring Guest professors Stephen Sheneman & Michael Wilkens 1.

Page 1: Basic Steering of Game Agents Featuring Guest professors Stephen Sheneman & Michael Wilkens 1.

1

Basic Steering of Game Agents

Featuring Guest professorsStephen Sheneman

&Michael Wilkens

Page 2: Basic Steering of Game Agents Featuring Guest professors Stephen Sheneman & Michael Wilkens 1.

2

Topics Covered

• Kinematics• Facing and Alignment• Seek and Flee• Arrive• Pursuit• Evade• Wander• Path following

Page 3: Basic Steering of Game Agents Featuring Guest professors Stephen Sheneman & Michael Wilkens 1.

3

Kinematics

• Velocity• Vectors• Max speeds• Acceleration• Game world

Page 4: Basic Steering of Game Agents Featuring Guest professors Stephen Sheneman & Michael Wilkens 1.

4

Facing

• Help create illusion of intelligence• The character looks at its target• Changes its orientation so that it is facing its

target• http://www.youtube.com/watch?

v=i1SFm62Etyc

Page 5: Basic Steering of Game Agents Featuring Guest professors Stephen Sheneman & Michael Wilkens 1.

5

Align

• The character changes its orientation to that of its target

• Have to do special calculations because orientation wraps back around to 0

Page 6: Basic Steering of Game Agents Featuring Guest professors Stephen Sheneman & Michael Wilkens 1.

6

Seek

• Vectors• Target character• Velocity• Max speeds• Kinematics controlling to look like normal

behavior vector handling and velocity handling basics

Page 7: Basic Steering of Game Agents Featuring Guest professors Stephen Sheneman & Michael Wilkens 1.

7

Flee

• Opposite of seek• Desired velocity

aims for opposite vector

Page 8: Basic Steering of Game Agents Featuring Guest professors Stephen Sheneman & Michael Wilkens 1.

8

Arrive

• Using seek but with code changes to slow down once target gap is closing

• Opposite of arrive is leave but really it is just flee. Velocity remains the same

Page 9: Basic Steering of Game Agents Featuring Guest professors Stephen Sheneman & Michael Wilkens 1.

9

Pursue

• Similar to Seek• Uses predictions• Pursue that degree!

Page 10: Basic Steering of Game Agents Featuring Guest professors Stephen Sheneman & Michael Wilkens 1.

10

Evade

• Handle prediction but moving away• Evade is an amped up Flee

Page 11: Basic Steering of Game Agents Featuring Guest professors Stephen Sheneman & Michael Wilkens 1.

11

Wander

• Move from random target to random target• Focus on jitter• Facing in the right direction• Turn speed

Page 12: Basic Steering of Game Agents Featuring Guest professors Stephen Sheneman & Michael Wilkens 1.

12

Wandering

• The character moves forward, but changes direction so it appears to meander

• Alternatively, have a target on a circle, change the position of it randomly, and have the character seek that

Page 13: Basic Steering of Game Agents Featuring Guest professors Stephen Sheneman & Michael Wilkens 1.

13

Path Following

• Take a predefined path, and set its predicted points and have the character seek to those points as it goes along– Advantage– Disadvantage: character may take undesired short

cuts

Page 14: Basic Steering of Game Agents Featuring Guest professors Stephen Sheneman & Michael Wilkens 1.

14

Path following

• Patrolling “look out! here comes the pat!”• Line segments vs. splines• Coherence geometric algorithms• Performance of steering is generally O(1) with

path following getting into O(n)• http://www.youtube.com/watch?v=BTZqaAG-

Xjo

Page 15: Basic Steering of Game Agents Featuring Guest professors Stephen Sheneman & Michael Wilkens 1.

15

Thanks for watching!

• More bunnies