[quote]Would be interesting to see if this method can handle unit on unit collision
[/quote]
Updating the collision map is very cheap and short paths are very cheap too, i might just try recalculating part of the path on collision or wait depending on what the unit is colliding with.
I could also merge paths if they overlap and then separate them again, but thatās potentially complex.
I could take into account when paths are blocked and use that information in the pathfinder when polling for obstacles, the pathfinder can approximate the time it takes to get to a certain point so it can ask for obstacles in cell X at time T and pathfind with that, but thatās again interfering with path optimization a bit, i would have to optimize paths simultaneously while pathfinding to get accurate times for that, but even then itāll still be neither 100% accurate nor easy to implementā¦
A good thing is that this game isnāt supposed to have infantry moving together with multiple tanks in a compact blob at full speed like in Star Craft, that would be suicidal, itāll be more like an hierarchy of who makes place / stalls for whom. Vehicles will usually not move in a blob but in a line anyway and infantry can slip through the cracks and get shoved around, they donāt even need to be positioned accurately. The server doesnāt need to know where exactly they are getting drawn, they are behaving consistently as long as they are displayed to the player somewhere within X meters of their simulated position.
I donāt know a good solution right now ??? itās a very hard problem to solve efficiently.
[quote]How many times will you recalculate pathing?
[/quote]
Often but i might use hierarchical pathfinding so i donāt spend so much time when recalculating is needed.