Hello,
I wonder if Recast could be used to manage many "moving dynamic
obstacles" efficiently.
What I mean by "moving dynamic obstacles" is for example a unit in a
game like Starcraft.
A unit occupies a small space in the map and usually it cannot be passed
through.
Since Recast is based on a navmesh, entities do not occupy a space inside the
navmesh.
The
attached image describes the different behaviour I need.
I do not have a lot of verticality. My world
is mainly flat.
Do you think Recast could still be used for those needs or a grid based pathfind would be more adapted?
I read Mikko's blog and I know he’s working on dynamic avoidance. The last post about that suggested the use of a local grid around the character, which makes me think a grid base pathfind may be more suited.
Thanks !
Your problem sounds like it could be better solved using grids. Detour
Tile cache allows you to change the topology of the navmesh pretty
quickly, but you may get better results using coarser grids.
You may find Chris Jurney's presentations from GDC inspiring:
http://www.chrisjurney.com/
--mikko
If you can prune down the navigation problem to 2D, then I suggest to
go for it! Layers add a lot of complexity. Grid is the easiest data
structure if you are dealing with dynamic obstacles. Check out this
blog, on how to speed up pathfinding on grids:
http://harablog.wordpress.com/
I also recommend into trying to find path for a whole ground and then
resolve paths for individuals based on that.
You may find Roland's work inspiring: http://people.cs.uu.nl/roland/
If you have hundreds of units, then global avoidance methods like
continuum crowds or aggregate dynamics
(http://gamma.cs.unc.edu/DenseCrowds/) are cheaper than trying to
resolve the collisions individually (like RVO). It is hard to say
where the sweet spot is, though.
Always remember that multi-agent navigation is untractable problem.
Whether the agents will reach the goal is just statistics unless you
allow them to pass through each other.
--mikko