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
- Serialization
- 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.)
Such a rapid evolution, I think the ogre community would love to see all of it! A lot of them would like to use it im sure ^^.
ReplyDeleteThats amazing. I actually started creating high level interfaces for the crowd manager for Unity. I´m glad that this piece now has a stable place :-)
ReplyDeleteMirko - have you implemented recast in Unity - if so I would be very interested!
ReplyDeletea* pathfinding project pro uses c# recast in unity..
ReplyDelete