RTS pathfinding gridlock, world coordinates vs. path node coordinates

Started by
1 comment, last by LorenzoGatti 9 years, 4 months ago

What happens when you use a finer-grained coordinate system for unit movement and collision detection than what you use for pathing? How do you solve when two units occupy shared nodes but there's a way out for a certain unit?

gridlock.png

Do you use the path nodes for collision as well, resulting in a lot less places the unit can be at, or do you shift the path grid to the unit's world position?

Advertisement

One option would be to ignore shared spaces for pathfinding, and rely on steering to get you through congested grid nodes. You might even make this only an option for small units over the larger ones.

The other option is to use a finer-grained nav system =) Company of Heroes, if I recall correctly, uses a pretty small grid, compared to say, the size of their tanks.

If the pathfinding graph is small, maybe you can afford to maintain, for each place on the map, a list of which units are going to pass through that location and when (computed as a byproduct of shortest path search). This would allow low-priority units to treat higher priority units as obstacles, avoiding congestion preemptively.

Omae Wa Mou Shindeiru

This topic is closed to new replies.

Advertisement