Clearance-based or Multi-Grid pathfinding for RTS games

Hello,

I am trying to achieve a pathfinding that respects the size of a unit, so that large units will ignore small passages when they plan the routes.

This is typically achieved in two ways:

I would like to use the second method, but I could not find a simple way to mark what graphs a unit should use. I saw that it’s possible to assign a tag to some nodes, but my understanding is that it meant for portions of a graph.

Moreover, I could not find a way to assign a tag to an entire graph, because the the process explained here (http://arongranberg.com/astar/docs/tags.php) implies that graphs do not overlap, which is actually my case.

Any suggestion?

Ideally I would like just to be able to manually set the tag for all nodes of a graph, but looking at the code it seems this is not trivial to do without understanding the details of the current implementation.

Thank you!

For 1. Try Grid Graph -> Erosion = 5 (or something). Set Erosion Uses Tags. That will fill in tags based on how much clearance the node has from the wall. Then on the agents you can use tags to specify how close it should be able to walk to a wall.

E.g
Erosion = 5, Use Tags. First Tag = 1

Agent 1: Enabled Tags = Basic Ground, 3, 4, 5
Agent 2: Enabled Tags = Basic Ground, 1, 2, 3, 4, 5
Agent 2 will be able to walk closer to walls than agent 1.

See http://arongranberg.com/astar/docs/class_pathfinding_1_1_grid_graph.php#af156f09628f08d32091ea67e48e42b71