Soldier of Fortune 2: Double Helix Paris York CIS 588.
-
date post
20-Dec-2015 -
Category
Documents
-
view
225 -
download
0
Transcript of Soldier of Fortune 2: Double Helix Paris York CIS 588.
![Page 1: Soldier of Fortune 2: Double Helix Paris York CIS 588.](https://reader036.fdocuments.net/reader036/viewer/2022062320/56649d4b5503460f94a2852b/html5/thumbnails/1.jpg)
Soldier of Fortune 2:Double Helix
Paris YorkCIS 588
![Page 2: Soldier of Fortune 2: Double Helix Paris York CIS 588.](https://reader036.fdocuments.net/reader036/viewer/2022062320/56649d4b5503460f94a2852b/html5/thumbnails/2.jpg)
Jumping, Climbing, and Tactical Reasoning: How to
Get More Out of a Navigation System
• Christopher Reed and Benjamin GeislerRaven Software/Activision
“using navigation to give AI more than just routes from one place to another.”
Image Sources: https://zerowing.idsoftware.com/svn/radiant/Sof2Pack/trunk/docs/Nav%20Point%20System.htm
![Page 3: Soldier of Fortune 2: Double Helix Paris York CIS 588.](https://reader036.fdocuments.net/reader036/viewer/2022062320/56649d4b5503460f94a2852b/html5/thumbnails/3.jpg)
• Navigation system is graph-based– Points - represent locations– Edges - represent safe routes
![Page 4: Soldier of Fortune 2: Double Helix Paris York CIS 588.](https://reader036.fdocuments.net/reader036/viewer/2022062320/56649d4b5503460f94a2852b/html5/thumbnails/4.jpg)
Enhanced Navigation Data
• Points and edges have static attributes attached to them, these are available to the AI in a look up table
• The data allows the appearance of more intelligent NPCs, and allows the system to be less resource intensive
• The path is selected by at a higher level, traversing points and edges is handled separately
![Page 5: Soldier of Fortune 2: Double Helix Paris York CIS 588.](https://reader036.fdocuments.net/reader036/viewer/2022062320/56649d4b5503460f94a2852b/html5/thumbnails/5.jpg)
Example: Bounding Overwatch– NPCs act in tandem, one covers while the
other advances; roles then switch until the goal is reached
– Points are marked as safe cover, the path selection is then biased towards these safe points.
![Page 6: Soldier of Fortune 2: Double Helix Paris York CIS 588.](https://reader036.fdocuments.net/reader036/viewer/2022062320/56649d4b5503460f94a2852b/html5/thumbnails/6.jpg)
• Example: Throwing Grenades– Problem -- How do we get the AI to know the best
place to throw a grenade?– Answer -- Compute all possible grenade throws in
advance and encode results in navigation system
Obstacle
Closest Point to Player
Closest Point to Agent
Standard Edge
Throw Edge over Obstacle
Agent
Player
![Page 7: Soldier of Fortune 2: Double Helix Paris York CIS 588.](https://reader036.fdocuments.net/reader036/viewer/2022062320/56649d4b5503460f94a2852b/html5/thumbnails/7.jpg)
• Biasing Edge Cost– Bias edge cost to prevent NPCs from
taking undesirable routes simply by increasing edge cost.
– Edges can also be biased for unique behaviour, such as flying
ParentPoint = OpenList.GetFromOpenList()
For each edge from ParentPoint
Switch Edge.type()
Case FLY_EDGE:
If (actor.CanFly() )
Edge.cost = actor.FlyBiasCost()
OpenList.AddToOpenList(Edge)
![Page 8: Soldier of Fortune 2: Double Helix Paris York CIS 588.](https://reader036.fdocuments.net/reader036/viewer/2022062320/56649d4b5503460f94a2852b/html5/thumbnails/8.jpg)
• Dynamic Movement: Opening a Door– The path is already generated, so
encountering a door is a simple matter.– The edge has the door attribute, the AI
automatically selects the appropriate animation, then continues on the path
– This also applies to using ladders, special doors, etc.
![Page 9: Soldier of Fortune 2: Double Helix Paris York CIS 588.](https://reader036.fdocuments.net/reader036/viewer/2022062320/56649d4b5503460f94a2852b/html5/thumbnails/9.jpg)
The Navigation Point
• Points provide discrete locations in space where agents can move to and from
• Can be any shape, sphere is easier to store -- point, radius
• Shape covers navigable area around point -- no obstacles, holes, etc
![Page 10: Soldier of Fortune 2: Double Helix Paris York CIS 588.](https://reader036.fdocuments.net/reader036/viewer/2022062320/56649d4b5503460f94a2852b/html5/thumbnails/10.jpg)
• Obstacle Visibility -- Side to Side and Vertical – If an obstacle is detected close to a
navigation point, information about this obstacle, such as height and width, can be pre-computed and stored in the nav system
• A low wall is good cover, so is the side of a building
![Page 11: Soldier of Fortune 2: Double Helix Paris York CIS 588.](https://reader036.fdocuments.net/reader036/viewer/2022062320/56649d4b5503460f94a2852b/html5/thumbnails/11.jpg)
The Navigation Edge
• Edges connect points to tell the nav system how to safely move between points
• Certain characters may not be able to traverse an edge, or may require a special action to do so
![Page 12: Soldier of Fortune 2: Double Helix Paris York CIS 588.](https://reader036.fdocuments.net/reader036/viewer/2022062320/56649d4b5503460f94a2852b/html5/thumbnails/12.jpg)
Examples of Edge Data
• Size– Sometimes characters are big, really big
and can’t fit down some paths.– Using collision detection, the maximum
size of a character that could travel a path can be determined and encoded in the nav system
![Page 13: Soldier of Fortune 2: Double Helix Paris York CIS 588.](https://reader036.fdocuments.net/reader036/viewer/2022062320/56649d4b5503460f94a2852b/html5/thumbnails/13.jpg)
• Jumping or Flying– If points in the air and the ground are
connected, they need to be encoded so that only flying characters attempt to follow
– If points connect over a hole, the edge can be encoded as a jump edge, restricted by game animation and physics
![Page 14: Soldier of Fortune 2: Double Helix Paris York CIS 588.](https://reader036.fdocuments.net/reader036/viewer/2022062320/56649d4b5503460f94a2852b/html5/thumbnails/14.jpg)
• Through Moveable Obstacles– Actions necessary to remove the obstacle
are encoded into the edge• Opening a door• Destroying a crate