news.volyx.in

New pathfinding algorithm (factorio.com)

478 points by jsnell · 2554 days ago · 109 comments on HN

Article summary

The Factorio developers have implemented a new pathfinding algorithm to improve the game's performance, particularly in scenarios where many units need to navigate around obstacles. The new algorithm uses a hierarchical approach, simplifying the map into abstract nodes and using these nodes to provide a smarter heuristic function for the base pathfinder. This allows the game to find paths more efficiently, especially over long distances. The developers have also announced that one of their team members is leaving to start a new job.

Main themes

  • pathfinding algorithms
  • game development
  • software maintenance
  • game industry trends
  • hierarchical pathfinding
  • Factorio development

What commenters say

  • The game industry's focus on quick releases often leads to unmaintainable code, but some games like Factorio prioritize maintainability and long-term updates.
  • Investing in code health is only worthwhile when a game is expected to have a long lifespan and receive regular updates.
  • Games are becoming less disposable, with players expecting updates and expansions, which changes the economics of game development and maintenance.
  • The use of hierarchical pathfinding can significantly improve performance in certain scenarios, but may not be necessary for all games or applications.
  • Some games, like Factorio, allow players to disable or modify certain features, such as enemies, to focus on other aspects of the game.
  • The game industry's trend towards early access and continuous updates is changing the way developers approach game development and maintenance.
  • A well-designed heuristic function is crucial for efficient pathfinding, and can be achieved through various techniques such as hierarchical pathfinding or precalculating distances.
  • The choice of pathfinding algorithm depends on the specific requirements and constraints of the game or application, and there is no one-size-fits-all solution.