The code is now located in DetourCrowd folder. My idea is to keep Detour a clean low level library and build DetourCrowd on top of that. While is was organizing things, I also moved the velocity planning code to DetourCrowd folder.
The crowd manager now allocates its' own dtNavMeshQuery, so there is no need to pass one to all the update functions anymore.
I also implemented timesliced pathfinder. The slicing is controlled using a constant called MAX_ITERS_PER_UPDATE. You can probably crank it up to 500 or so on real games. Try different values and see how it affects the performance graph (i.e. should not peek too much). I have currently set it very low for fuzz testing.
There are still some things missing:
- Off-mesh link handling
- Better handling of navmesh changes (i.e. how paths respond to temporary obstacles)
- Off-mesh links with custom callbacks
- Better handling of magic constants
- Custom movement styles
I will work on the items roughly in that order. I have a couple of other big things queued up for this spring, so no guarantees when things will be implemented.
Any feedback on the change or the crowd manager in general are welcome!
(Sorry again Windows peeps, I will try to find a PC to fix the VC project.)