Title: Jumping, Climbing, and Tactical Reasoning Section 2.5
1Jumping, Climbing, and Tactical ReasoningSection
2.5
- Tom Schaible
- CSE 497 AI Game Programming
2Jumping, Climbing, and Tactical Reasoning
- Christopher Reed
- Benjamic Geisler
- Raven Software/Activison
- Soldier of Fortune II Double Helix
3Standard 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
4Finding Cover using Teams
- Embed appropriate cover information in points
- Teammate waits, Leader chooses cover and advances
- Leader waits, Leader chooses cover and advances
- Repeat
5Finding Cover Using Teams
6Finding Cover Using Teams
- Additional Information Needed at Edges
- Obstacle Information
- Visibility Information
- More on this later
7Throwing 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
8Throwing Grenades
9Throwing Grenades
10Throwing 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)
11How 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()
12Non-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
13How 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
14Obstacle Visibility - Point
15Object Visibility Side to Side
16Other 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
17Putting it all together
Flying Edge
Rappelling Edge
Flying Edge
Door Edge
Vault Edge
Jump Edge
18Soldier of Fortune II
19Hunting Down the Player in a Convincing Manner
20Hunting Down the Player in a Convincing Manner
- Alex McLean
- Pivotal Game Ltd.
- Conflict Desert Storm
21Hunting 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
22Parameterizing 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
23Destination
- 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
24States
- 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
25The Player is Visible
- Simplest Case
- Start the attacking behavior
- May be a direct route
- May look for cover
26The 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
27The Player Was Recently Seen
28The 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
?
29Algorithm 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
30How it Works
31Extensions
- 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
32Team Based Tactics
33Conflict Dessert Storm
34Conclusion
- 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