Sign in to follow this  

RTS pathfinding gridlock, world coordinates vs. path node coordinates

This topic is 1107 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites

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.

Edited by ferrous

Share this post


Link to post
Share on other sites

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.

Edited by LorenzoGatti

Share this post


Link to post
Share on other sites

This topic is 1107 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this