I've been trying to figure out how to implement something like the pathfinding in Starcraft 2. I'm not looking for all the sophisticated features like flocking, queueing, etc. In fact I like how in Starcraft 1 the units would interfere with each other. But I do want a path finder better than that used in Starcraft 1.
From the Google searches I've done the various answers have something to do with A* over a navigation mesh and/or dealing with some kind of "visibility graph". But I've gotten somewhat conflicting or unclear answers on what I should do.
One thing I keep encountering has something to do with doing A* over a navmesh. And then use funnel to straighten out the path.
An older post http://www.gamedev.net/topic/597457-pathfinding-in-a-space-based-rts-game/ has an answer that says "Starcraft II uses a constrained Delaunay triangulation of the map terrain and buildings to produce a navmesh; A* with a funnel filter is used to path along this mesh, taking into account unit radii; then local steering and collision avoidance layers are added on top of that"
What exactly are the nodes of A* on navmesh? I don't see how any choice of nodes would allow A* on navmesh with a funnel filter to guarantee the path is optimal. But Starcraft II seems to not have the problem of A* going the "wrong way" around an obstacle because of a "shorter" pre-funnel filtered path.
How does Starcraft 2 pathfinding deal with the fact that the units are discs with a finite radius and not points when dealing with corners? And how does it deal with dynamic obstacles like idle units? Units are discs not polygons so treating them as part of the navmesh shouldn't make sense right? And how does pathfinding figure out that big units won't be able to fit through a far away narrow space. For a new buildings added does Starcraft 2 rebuild a new navmesh?
I'm looking for some gritty detailed explaination and not the generic super high level overviews that I've seen typical in search results. It sort of boggles my mind that there isn't a single source detailed explaination tutorial on the basics of the stuff. There is so much stuff out there I don't know what to look at and what to ignore.
If it matters I've already looked at Amit’s Notes about Path-Finding. I've heard of but not read Computational Geometry: Algorithms and Applications. And a blog post about a AI navigation presentation at GDC 2011 mentioned that Starcraft 2 uses a constrained delaunay triangulation for a navmesh. Although the blog post mentions Boids steering and "horizon analysis".
I really wish that guy ApochiPiQ who I quoted above knows the detailed answers to everything and obsessively answers this question.
Edited by ccherng, 01 October 2013 - 03:58 AM.