Navigating Uncharted Waters with Moving NavMesh

If your studio or development team has ever tried to make a level that includes moving platforms, then you’ll know the barriers developers come up against when trying to create a usable navigation mesh on a moving component, despite how often it’s desired as a design choice.

Game development has long grappled with the challenge of creating usable navigation meshes on moving platforms like elevators, ships, and floating islands. You don’t have to look far to find forums and dev communities filled with frustrated developers who have resorted to ‘dirty hacks’ or workarounds to emulate this function. Unfortunately, it’s still a struggle that plagues even the most experienced developers using market-leading engines. The team at Kythera AI is excited to now be able to offer a solution - the new Moving NavMesh feature.

Watch our feature showcase; The Pirates of Kythera Cove.


A Game Development Odyssey

Traditionally, NavMeshes have always been static, so if you move the occupied ground, the NavMesh is left behind. Two main workarounds can be used to create the appearance of navmesh in motion;

  • by regenerating the navmesh each time the platform or supporting ground area is moved, or
  • by moving the surrounding world whilst keeping the platform stationary

But like sailing between Scylla and Charybdis, both of these paths have substantial drawbacks. Constant regeneration significantly slows down performance and reduces the fluidity of NPC navigation, making this approach an unviable solution. Opting to move the entire game world limits design by restricting the usability of navmesh beyond the moving platform. While preferable to constant regeneration, this approach complicates developer workflow and has the potential to lead to considerable physics and performance issues.

The struggles echo across Unity and Unreal Engine forums. Current workarounds suggested in the message boards often involve cumbersome processes and, in some cases, sacrificing core dynamics of the game world. The countless posts on the subject - almost all bearing the label ‘unresolved’ - reflect the frustration and demand for a solution. Unfortunately, even major engines don’t have a solution for this surprisingly complex functionality.

A collage of forum posts on the topic of moving navmesh in Unity and Unreal Engine

Games AI blogger Tommy Thompson breaks down the issue in an article published by Game Developer.

“We typically use a system called a navigation mesh for characters to walk across 3D environments… However, navigation meshes are typically built or baked into the level in advance or calculated at runtime based on changes by rocks, or other small items being moved around on the surface of the nav mesh. So yes they can adapt to changes in objects and characters being moved around on the nav mesh itself, but the navigation mesh itself isn't moving."

"If the surface itself was moving, it would have to recalculate not just the nav mesh but also the paths of all characters standing on it every time it moves by even the smallest amount. That's simply far too much CPU and memory resource to consume. It's a massive bottleneck.”


A Creative Solution in Rare's Sea of Thieves

The highly rated and award-winning game Sea of Thieves, developed by Rare, offers a glimpse into the complexities of AI navigation on moving platforms. Here, Tom Berry and Andrew Preston, Senior Software Engineer and Senior Designer at Rare, discuss how technically difficult it was to address the navigation of NPC skeletons on moving bases when creating the game’s ‘Skeleton Ships’.

The AI of Sea of Thieves is so complex that Thompson covers it in a four part series on AI and Games, recalling his feelings of disbelief when he first came across the game’s AI.

“But here in Sea of Thieves, the surfaces of the hull and deck aren't just moving in line with the waves of the ocean always moving, but they're on a moving ship! At first I thought it's faked: that the skeletons simply move from one point on the ship to another, but if you look at how they move on galleons, they're running around as they wish, all the while adhering to the topography of standing on a moving ship with respect to the physics of the ocean.”

The series reveals that, despite appearances, the navigation mesh for the ship is not actually moving as the ship does - instead, it's baked deep into the ocean floor. Each skeleton’s movement is then plotted on this stationary navigation mesh and must take into account factors like the ship's orientation with respect to the ocean's surface and the movement caused by shifting waves.

Though not flawless, this is an innovative approach. However, it only serves to further highlight the creativity, expertise, and resources required to successfully pull off even the illusion of Moving NavMesh.

From Stormy Seas to Smooth Sailing

The kinds of workarounds often used to emulate Moving NavMesh in Unity and Unreal Engine are constraining and manually intensive for designers, so the team at Kythera AI set out to create a solution - Kythera AI Moving NavMesh.

Unlike the typical approaches, with Moving Navigation Mesh, it’s not necessary to constantly regenerate the navigation mesh, nor does it require tricks of perspective, and has no negative impact on performance or accuracy of character movement. The feature is easy to set up, compatible with major engines, developer and designer-friendly, and can be introduced into a game at any stage of development. While large studios, like Rare, may be able to develop custom solutions, these remain specific to their game. Instead, Kythera AI offers a powerful generic solution that can be used in all game types and scenarios.

The feature's versatility is enhanced by visual scripting, allowing designers to effortlessly merge and separate areas of NavMesh, whether it’s other Moving NavMesh or traditional stationary navmesh. When it comes time for the ship to dock on land, NPCs can move back and forth between the ship and shore with no special handling, and without expensive regeneration.

Moving NavMesh works in tandem with Kythera AI's existing capabilities, including automatic cover markup, automatic navigation links for jumps and climbs, and even dynamic changes to the navmesh. This allows developers to effortlessly create an AI framework for rich gameplay on moving platforms - no design constraints and no sacrifice of key game mechanics.

Kythera AI Moving Navigation Mesh provides a transformative shift in how we approach movable platforms in game creation. Game developers are no longer bound by the limitations of static navigation meshes, opening up new realms of creativity and innovation and widening the possibilities for advanced gameplay and navigation. Studios of all sizes can now explore game design options that were previously out of reach, like creating AI-powered combat on moving ships or characters lithely navigating across the shoulders of staggering giants. The new Moving Navigation Mesh feature for Kythera AI offers an exciting and streamlined solution for these longstanding challenges.

Keep an eye out for our upcoming deep dive into the feature in the coming days. Reach out here if you'd like to get in touch to dicuss using Kythera AI Moving NavMesh in your game!



By: Rebecca Waghorn
Published: Jan 2024

How to create dynamic gameplay on moving platforms