Sponsored By

An overview of the development and application of Kythera AI in indie ARPG Wolcen: Lords of Mayhem (2020), including innovations in contextual steering and navigation.

Robin Johnson, Blogger

May 26, 2021

5 Min Read

This post, written by Robin Johnson & Joy Thurston, originally appeared on Kythera AI's website on 14 February 2020.

One of our longest standing clients, Wolcen Studios, have publicly released their epic fantasy ARPG Wolcen: Lords of Mayhem, the culmination of five years’ collaboration between Wolcen Studio and Kythera AI.

Wolcen, built with CryEngine, was the first game to use a Kythera AI integration, and as such many of our core features have been developed in close communication with the Wolcen team. In this post, we’d like to give you a little insight into the technical aspects of what Kythera AI is being used for in Wolcen.

Not all AI techniques focus on NPCs. For example, Wolcen’s point-and-click player movement means that AI navigation is at the core of your experience as a player – every click creates an AI task for the player character that has to be resolved smoothly in a way that maintains the feel of the game. The hero is essentially an AI agent being  commanded to follow directions, a task that becomes more complicated when interacting with crowds of other AIs. 

Similarly, our dynamic navmesh generation has been a huge enabler for the Wolcen developers. Procedural dungeon levels can be created without having to worry about navmesh markup as Kythera will create the mesh at runtime, even going on to create and destroy tiles if the terrain changes during gameplay. Our spatial query system finds appropriate points to spawn monsters and treasure, and will stop monsters getting stuck. This automation of what would traditionally have been manual markup tasks for level designers has given the Wolcen team more scope to experiment and develop their game's unique system of dungeon generation.

Contextual steering allows groups of characters to move fluidly around complex terrain with seamless collision avoidance. Using a system inspired by the classic ‘boids’ mechanism, individuals consider the movement of all of their neighbours, moving as a flock and preserving overall momentum. This is actually more difficult for ground-based movement than it is for flight – without the freedom of 3D movement, characters will tend to pile up against walls. Kythera’s handling of this gives control back to the designers, allowing them to create fast, agile hordes of enemies like the demonic Svriir:

As the game involves a variety of friendly NPCs, we’ve had to optimise our AI both for these supporting characters and for the enemies they face – targeting, for example, is a very different problem when the enemies are fighting multiple friendlies. In many cases we’ve used modular features that can be configured both for enemies and friendlies.

One of the most technically interesting and challenging features we’ve developed in association with Wolcen is formations. Wolcen’s large-scale battles require groups of NPCs – in numbers ranging from small squads to army units of 50+ troops – to move together, maneuver intelligently around terrain, split up and reform when necessary. Done properly, this will add visual and narrative flair to any game. A military battalion arrives, marching in an intimidating rank-and-file formation that communicates their strength and discipline. A miniboss charges you, neatly flanked by their henchmen in a linear or V-shaped arrangement. To be effective, all of this has to flow smoothly and naturally without looking stilted or scripted. 


Kythera AI solves this by assigning groups of characters to formations. The characters attempt to maintain fixed positions relative to each other, subject to all their usual physical constraints, navigation and collision avoidance. The formation may or may not have a ‘leader’ by which the other characters define their positions – this does not necessarily correspond to an in-universe command structure, and if a leader is incapacitated, another character can step into their place. Characters can be arbitrarily added, removed and reassigned between formations, and formations can be merged and split. All this is visible to our web-based Behavior Tree editor, so designers can author complex behaviors that use formations without the need to meddle in code. 

The result of these various uses of our Kythera AI is a complex and diverse collection of unscripted real time AI that helps both developers – who are free to focus on deeper themes and content – and players, adding to the gameplay in that immersive way that’s hard to identify, but you certainly notice when it’s missing.

Despite some initial server problems, Wolcen soon generated overwhelmingly positive reviews from players and critics, with praise for its replayability, versatility in character building, and crisp graphics and environments. We like to think that the choice to use Kythera AI was crucial in making this possible for a relatively small development team.

If you’d like to know more about Kythera’s features, please check out our key features page or get in touch with us. We also like to hear your feedback! What do you like about the AI in Wolcen: Lords of Mayhem? How could we improve it? Send us a tweet with your answer.

The AI in Wolcen: Lords of Mayhem will be the subject of a GDC 2021 talk, "Steering, Formations and a Trail of Blood" by James Hancox of Kythera AI and Daniel Dolui of Wolcen Studio.

Read more about:

Daily news, dev blogs, and stories from Game Developer straight to your inbox

You May Also Like