My team is working on an RTS http://www.iron-harvest.com) where we’re combining A* pathfinding with local avoidance. Our current implementation uses a custom corner-graph based pathfinding and an opensource C# library called RVO2 (http://gamma.cs.unc.edu/RVO2/downloads/). RVO2 worked well to show that the general approach is feasable but it doesn’t meet all our requirements and so I’m currently evaluating your avoidance solution as a possible alternative. I like the code quality & comments but also the promise of using a matured library that has been used by countless of game developers. There are features that you have and RVO2 is missing: Especially the support for Collision Layers and Priorities.
But it seems that your implementation has it’s own set of weaknesses, too:
Obstacles are not avoided in a way that the agents radius is taken into account. Our use case has agents of many different sizes so we can’t just add a single “extruded version” of the obstacle. Instead we’d have to create and add multiple versions of the same obstacle, putting them on different Layers so they only affect units of the correct size. Considering how GenerateObstacleVOs() seems to generate VOs for all obstacles instead of only considering the local ones I fear that, even if I’d spend time to adapt your solution and calculate extrusions for the obstalces (not trivial) it still wouldn’t work for performance reasons. (Our level has a complexity of hundreds of obstacles!)
Another question I’ve had is wether there’s a reason you didn’t use ORCA lines over RVO? Are some of your features not possible to be implemented with the ORCA based solver? Because, from reading the papers this approach seems to be superior to RVO without any obvious disadvantages.
I don’t want to critisize you with my post. It’s just that I’m faced with the difficult choice which solution is more promising to adapt and transform into something that’s meeting all our requirements and all info that could help me make the right decision would be very much appreciated.