Jumping, Climbing, and Tactical Reasoning Section 2.5 - PowerPoint PPT Presentation

About This Presentation
Title:

Jumping, Climbing, and Tactical Reasoning Section 2.5

Description:

Jumping, Climbing, and Tactical Reasoning Section 2.5 Tom Schaible CSE 497 AI & Game Programming Jumping, Climbing, and Tactical Reasoning Christopher Reed ... – PowerPoint PPT presentation

Number of Views:110
Avg rating:3.0/5.0
Slides: 35
Provided by: Tom418
Category:

less

Transcript and Presenter's Notes

Title: Jumping, Climbing, and Tactical Reasoning Section 2.5


1
Jumping, Climbing, and Tactical ReasoningSection
2.5
  • Tom Schaible
  • CSE 497 AI Game Programming

2
Jumping, Climbing, and Tactical Reasoning
  • Christopher Reed
  • Benjamic Geisler
  • Raven Software/Activison
  • Soldier of Fortune II Double Helix

3
Standard Navigation System Recap
  • Graph Theory
  • Point A location
  • Edge A route to get from location to location
  • Use A to efficiently navigate through the graph
    in game
  • This can be extended to
  • Climbing
  • Jumping
  • Throwing Grenades

4
Finding Cover using Teams
  • Embed appropriate cover information in points
  • Teammate waits, Leader chooses cover and advances
  • Leader waits, Leader chooses cover and advances
  • Repeat

5
Finding Cover Using Teams
6
Finding Cover Using Teams
  • Additional Information Needed at Edges
  • Obstacle Information
  • Visibility Information
  • More on this later

7
Throwing Grenades
  • Choice of scripting behavior or encoding data
    into decision system
  • Compute edges to points in grenade throwing
    radius
  • If it is possible to throw a grenade (encode
    trajectory) add a grenade throwing edge

8
Throwing Grenades
9
Throwing Grenades
10
Throwing Grenades
  • Things to keep in mind
  • Is throwing a grenade feasible?
  • Uncommon situation, grenades are scarce
  • Reserved more as a last resort, when obstacles
    prohibit attacking
  • What position is best to throw a grenade from?
  • It may be impossible to use a grenade effectively
  • What trajectory is necessary? (through windows,
    around corners)
  • .05 to .1 seconds per trajectory to calculate
  • Store in memory instead (store only attacker and
    trajectory pair)

11
How to Bias Edges
  • Data you are adding to points needs to show up in
    the edges
  • ParentPoint OpenList.GetFromOpenList()
  • For each edge from ParentPoint
  • Switch edge.type()
  • Case GRENADE_EDGE
  • If ( point.trajectoryGood() )
  • edge.cost actor.GrenadeBiasCost()
  • Case FLY_EDGE
  • If ( actor.CanFly() )
  • edge.cost actor.FlyBiasCost()

12
Non-Standard Movement Edges
  • Instead of scripting behavior, embed type of
    behavior in edge
  • Engine will automatically perform movement
    including animation and set up
  • Can be used for
  • Jumping
  • Flying
  • Opening Doors

13
How to Embed Information in Points
  • Store point size information for each point
  • Use a sphere to define the size
  • Can Detect obstacles and obstacle features
  • Obstacle Visibility Vertical
  • Obstacle Visibility Side to Side

14
Obstacle Visibility - Point
15
Object Visibility Side to Side
16
Other Embedded Information
  • Safe Size
  • Use collision detection to determine how big of
    an actor can use the path
  • Jumping
  • Embed invisible geometry in game (preferred) or
    use extensive collision detection
  • Vaulting
  • Same as jumping but geometry is not invisible
  • Requires specific constraints for animation
  • Movable Objects and Doors
  • Collision detection will find tagged object
  • Retry collision detection after object is moved
    to test validity of edge (store movement info in
    the edge)
  • Stairs, Slopes, Ladders, and Ropes
  • Checking angle between points vertically can
    cause edges to be labeled with certain actions

17
Putting it all together
Flying Edge
Rappelling Edge
Flying Edge
Door Edge
Vault Edge
Jump Edge
18
Soldier of Fortune II
19
Hunting Down the Player in a Convincing Manner
  • Section 2.6

20
Hunting Down the Player in a Convincing Manner
  • Alex McLean
  • Pivotal Game Ltd.
  • Conflict Desert Storm

21
Hunting Down a Player in a Convincing Manner
  • Intelligent hunting is a good thing
  • The game needs to be somewhat challenging
  • Allows for strategy
  • Perfect hunting is a bad thing
  • Takes away from gameplay
  • Really isnt realistic
  • It should be apparent that the hunter is
    exploring and cannot see the target when it is
    not visible

22
Parameterizing the Process
  • A parameter based process will work best
  • Controls the hunter to do different thigns at
    different times
  • Two major parameters we want control over
  • Speed How quickly you are found
  • Directness How direct is the path from hunter
    to target

23
Destination
  • Path finding will be used to direct the hunter
  • A destination is needed
  • Simplest solution is to move directly to the
    destination where the hunter is
  • This makes the AI too good
  • Destination must be more variable and robust

24
States
  • Break the decision of destination up into
    different states
  • The player is visible
  • The player was recently seen
  • The player has never been seen
  • Allows for more realistic destinations
  • Results in more realistic behaviors

25
The Player is Visible
  • Simplest Case
  • Start the attacking behavior
  • May be a direct route
  • May look for cover

26
The Player Was Recently Seen
  • Another simple case
  • Move to the last point where the character was
    seen
  • Provides for much more interesting game play to
    the player

27
The Player Was Recently Seen
28
The Player Was Not Recently Seen
  • Must start searching intelligently
  • Must generate a location
  • Direction within an angle ? of the player
  • Distance Some multiple of the exact direction
    to the target in an interval Smin,Smax (i.e.
    .5,1.5)

x
Smax
Smin
?
29
Algorithm Detail
  • Smin, Smax, and ? control the parameters of
    hunting
  • Closeness of Smin, Smax to 1.0 and decreasing ?
  • Increase Speed
  • Increase Directness
  • Making ? gt 180 can make the NPC somewhat dumb

30
How it Works
31
Extensions
  • Three-Dimensions
  • Simply use a 3-D cone to pick destination
  • Moving Players
  • Need to update player destination along the way
  • In case NPC and player run into each other
  • Make sure you are moving towards the player and
    not to where the player was
  • Sounds
  • Hearing sounds can act as a new location that the
    player has been seen
  • Target Priority
  • If a more interesting target is seen, go after it
  • Team based Tactics

32
Team Based Tactics
33
Conflict Dessert Storm
34
Conclusion
  • A and similar path finding algorithms can be
    used to provide dynamic motion
  • Edges in graphs can be used to encode
    motion-specific information
  • Edges can be biased to modify the search
    algorithm
  • Realistic hunting is an important part of an AI
  • The hunting AI should react intelligently to a
    player
  • It should be smart but not too smart
Write a Comment
User Comments (0)
About PowerShow.com