news.volyx.in

A* tricks for videogame path finding (timmastny.com)

478 points by azhenley · 962 days ago · 103 comments on HN

Article summary

The article discusses pathfinding techniques for videogames, specifically A* search algorithm, and shares tricks for implementing it. It also covers linear pathing and Dijkstra's algorithm, highlighting their limitations. The author shares their experience with implementing A* in a game and provides examples of how it can be optimized. The article aims to provide a practical guide for game developers to improve their pathfinding implementations.

Main themes

  • pathfinding algorithms
  • A* search algorithm
  • game development
  • optimization techniques
  • game AI
  • reinforcement learning
  • decision trees

What commenters say

  • Using A* with a low-resolution map as a heuristic for a full-resolution map can be an efficient approach.
  • A* can be challenging to implement for large-scale games with many units, and alternative approaches like flowfield pathfinding may be more suitable.
  • Some argue that using A* for every unit in a large formation is wasteful and unrealistic, while others suggest using it for a single unit and having others follow.
  • The limitations of A* can actually contribute to the realism and challenge of a game, as seen in the example of StarCraft.
  • Preprocessing the map and using hierarchical graphs can significantly improve the performance of A*.
  • Alternative approaches like reinforcement learning and decision trees can be used for pathfinding, but may have their own set of challenges and limitations.
  • The choice of pathfinding algorithm depends on the specific requirements and constraints of the game, including the size of the map, the number of units, and the desired level of realism.