Pathfinding on large map

前端 未结 7 1102
我在风中等你
我在风中等你 2021-02-02 12:34

I\'m creating a game with a 10,000 by 10,000 map.
I would like for a user to be able to set a location and have the computer instantly find the best path.
However, since

7条回答
  •  暖寄归人
    2021-02-02 13:02

    1. Make sure all the graph data is in memory
    2. Use bidirectional Dijkstra - assuming you have multi-core
    3. Look into using contraction hierarchies, this will greatly improve the performance.
    4. Pre-calculate everything that you can such as path weights.

提交回复
热议问题