We are pleased to announce the release of version 0.9 of Mercuna. This is a significant move forward from version 0.8, with two new major features and wide ranging refactor. We had intended for 0.9 to be a modest step forward, but we soon realised that with a bit more work we could pack in a lot more. We have laid the foundations of runtime octree regeneration, made steering much smoother and more natural looking, and cleaned up and refactored a lot of code. We are very happy with the result and hope you all enjoy Mercuna v0.9.
The big new features in v0.9 are:
- Triggered octree runtime regeneration – added the ability to regenerate parts of the navigation octree at runtime. The octree is a simplified representation of the game world which is used to find routes through levels. If the world/level changes at runtime, usually in response to a player action, then the octree also needs to be updated. This can be quite computationally expensive, so needs to happen on a background thread, while simultaneously allowing agents to query the octree for paths. Managing this access resulted in some multithreading fun that took a while to get right and more than one deadlock that had to be solved. The new system is suitable for small changes such as doors opening and closing, but may have issues with large level changes, as path queries that are made while regeneration is occurring currently may fail.
- Spline based steering – a more sophisticated steering method based on fitting smooth splines through paths. Agents will now closely follow the smooth curves, rather than just moving from path-point to path-point with no understanding of the available space around the path. This results in more natural looking motion and ensures that agents don’t fall off paths and collide with level geometry. Our previous steering method was quite simple and agents tended to enter turns too quickly, so slide into nearby walls.. This is a first iteration of a new approach and it is a massive improvement, though not quite perfect yet. We already have plans for making it even better for v1.0. Read more about it in our spline steering.
- Quicker octree generation speed – as part of the work required for runtime regeneration, we have been able to considerably reduce the time it takes for the octree to be built. Part of the improvement came by making the process more parallel in order to take advance of spare CPU cores, and the other part came by changing and optimising some of the algorithms we use.
- General refactor – much of the core Mercuna code has been refactored and rewritten as part of an overall code cleanup. This will help to ensure maintainability of Mercuna going forward. We still have a bit more we want to do here that we weren’t able to quite finish for v0.9, but the majority of the work has been completed.
The size of this release, with two big new features and refactoring of much of the original implementation, means that this is the largest change to Mercuna since it was first released. When refactoring code the aim is to improve the structure and clean up the code without changing external behavior. However, inevitably there is always a chance that some edge cases that the old code handled (whether by design or accident) no longer work.
Therefore, we recognise that this release brings the potential for new bugs to crop up. To mitigate this we’ve performed extensive testing, but Unreal has so many different configurations and ways it can be used, a strength and a curse, that covering all use cases is nearly impossible. However, rest assured that any bugs that might have escaped, will be squashed quickly and we expect that the stability our users have come to expect will be maintained.
Version 0.9 is the final step before we reach what we will consider to be v1.0. At that point, we will see Mercuna as being a complete 3D navigation middleware. We are already very close to it, and all the major features are in place, it is now only small improvements that are remaining.