Toward More Realistic Pathfinding. Authored by: Marco Pinter Presentation Date: 11/17/03 Presented by: Ricky Uy. Background – A*. Commonly used in video games Finds a path from start to goal, if one exists
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
Authored by: Marco Pinter
Presentation Date: 11/17/03
Presented by: Ricky Uy
Demo – taken from an article by Bryan Stout in Game Programming Gems
Can just associate a cost with each turn, but that does not solve the problem entirely. A better smoothing process is to remove as many waypoints as possible.
checkPoint = starting point of pathcurrentPoint = next point in pathwhile (currentPoint->next != NULL) if Walkable(checkPoint, currentPoint->next) // Make a straight path between those points: temp = currentPoint currentPoint = currentPoint->next delete temp from the path else checkPoint = currentPoint currentPoint = currentPoint->next
Checks path from waypoint to waypoint. If the path traveled intersects a blocked location, the waypoint is not removed. Otherwise, remove the waypoint.
Leaves “impossible” sections as is.
Want to be aware of a unit’s turning radius and choose shortest route to destination, in this case the right turn will lead to the shortest route.
Several Postprocess Solutions (cheats)
Sometimes the only legal path that does not violate the turning radius constraints is completely different from the path that the standard A* algorithm produces. To get around this, Pinter proposes a modification known as Directional A*.
First things first
Directional A* does not go directly from a to c because it sees that an abrupt right turn would cause the unit to hit blocked tiles. Thus, waypoint b is found as the shortest legal path.
Problem: adding an end orientation
Example of a case where Directional-8 fails, but Directional-24 finds a valid path