This article is a turn, the original http://blianchen.blog.163.com/blog/static/13105629920103211052958/
Waypoint Road Search
is a typical road-point pathfinding
Another approach is to use polygons to record path information, which can provide more information for use by AI characters. is a navigation mesh.
The following are some of the deficiencies of waypoint:
- Some complex game maps require too many waypoint.
- Sometimes the character goes "Z" path
such as the path between point A and point B
Nav seeking road such as
is a road-point pathfinding, such as a yellow line, that produces a "Z" glyph.
For the comparison of the map shown at the beginning of the article, the Red line is waypoint, and the Blue Line is NAV.
3. Dynamic correction is not possible, and it can be difficult to handle if there are dynamic obstacles in the map.
For a real-time strategy game, a tank that walks on the road will block your army's way, and the moving tank is a dynamic obstacle.
4. Cannot change path based on character's characteristics (width, height, etc.)
such as a narrow passage, ordinary people can pass, and a carriage width over the channel width, should not pass.
5. Cannot save additional information on terrain, such as surface height, ground characteristics (water surface, sand, etc.)
A character in a game, for example, will slow down when he goes to the sand, or the character will tilt when walking on a ramp.
Nav nav grid pathfinding (1)--Introduction