using the renovated NavMesh+ReCast is great and all, but I was wondering what kind of pathfinding should be used for an RTS (I’m actually working on the basics of one - thinking of releasing it as a StarterKit! )
Right now my units move smartly across the level thanks to NavMesh, but are utterly dumb when it comes to going around their colleague units.
I’d say making the units/buildings be NavMesh obstacles and calling ReCast every time a unit moves or a structure is built would be overkill (might be good for structures, but probably not units). but having to code an own custom pathfinding system suited for an RTS isn’t too friendly either
so what should be the general approach for pathfinding when it comes to an RTS in Rocket?
The problem you describe is usually solved by using some kind of steering behaviors that run on top of path following code. In a nut shell AI is still following a regular path (expressed as “navigation corridor”, a sequence of navmesh polygons) but there’s a runtime bit that makes sure it doesn’t hit other registered navigation agents (steer around them).
The goal is to have our own steering (using DetourCrowds) in the engine before Rocket ships