18,700
edits
(continuing rewrite) |
m (→Pathfinding and movement: link fix) |
||
Line 17: | Line 17: | ||
:*running to weapons in order to pick them up, see [[#Combat behavior part 2|Combat behavior part 2]] | :*running to weapons in order to pick them up, see [[#Combat behavior part 2|Combat behavior part 2]] | ||
:Pathfinding utilizes an [[wikipedia:A*_search_algorithm|A* (A-star)] algorithm to design routes for AI within the game world. | :Pathfinding utilizes an [[wikipedia:A*_search_algorithm|A* (A-star)]] algorithm to design routes for AI within the game world. | ||
:Human players see walls and obstacles placed between their current location and their desired location, thus they can plan their route thanks to the best computer so far known to man -- the human brain. The AI, on the other hand, has to be told where it can go and where it cannot (a wall, a pit, an obstacle, etc.). Since the A* is a chart-searching algorithm, there is a need to have some sort of chart, conveniently mapping the environment for AI purposes. And that is a '''pathfinding grid''', which can be seen in-game by entering '''ai2_showgrids = 1''' (see picture on right). | :Human players see walls and obstacles placed between their current location and their desired location, thus they can plan their route thanks to the best computer so far known to man -- the human brain. The AI, on the other hand, has to be told where it can go and where it cannot (a wall, a pit, an obstacle, etc.). Since the A* is a chart-searching algorithm, there is a need to have some sort of chart, conveniently mapping the environment for AI purposes. And that is a '''pathfinding grid''', which can be seen in-game by entering '''ai2_showgrids = 1''' (see picture on right). |