As part of the pathfinding, we need an obstruction manager.
It is for keeping track of not-so-often changing parts in the world.
What should that thing do:
Provide nav-mesh that allows inter-chunk-navigation
Update the nav-mesh when buildings are placed, trees fall, etc
Keeps a density grid by terrain slope, terrain type and other obstructions that just slow things down
The obstruction manager ignores moving units.
The nav-mesh is used by the long-range pathfinder ("where is a possible way to the goal 40 chunks away"). The long range search is probably done by A*, maybe with JPS, but it doesn't matter.
The density grid is used by the flow field pathfinding, so it can integrate that density grid so units can then do gradient descent on it.
As part of the pathfinding, we need an obstruction manager. It is for keeping track of not-so-often changing parts in the world.
What should that thing do:
The obstruction manager ignores moving units.
The nav-mesh is used by the long-range pathfinder ("where is a possible way to the goal 40 chunks away"). The long range search is probably done by
A*
, maybe withJPS
, but it doesn't matter. The density grid is used by the flow field pathfinding, so it can integrate that density grid so units can then do gradient descent on it.