Jump to content
  • Advertisement
Sign in to follow this  
polyfrag

RTS pathfinding gridlock, world coordinates vs. path node coordinates

This topic is 1416 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
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.

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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!