March 24, 2023

8 Min Read

mario rabbids sparks of hope

GDC 2023: How Mario + Rabbids Sparks of Hope Improved Procedural Generation with Layered Battles

While Mario + Rabbids Kingdom Battle’s battle system was well-received at launch, the dev teams at Ubisoft Paris and Ubisoft Milan weren’t content to sit on their laurels for the next game in the series. Mario + Rabbids Sparks of Hope, which won the award for Best Strategy Game at The Game Awards 2022, removed its predecessor’s grid and cursor, offering players more movement options and direct control of their team of Heroes. The team also moved away from Kingdom Battle’s world design – which connected battlefields and exploration paths in linear corridors – by separating exploration areas and battlefields entirely in Sparks of Hope.

The most significant change, however, stemmed from the team’s ability to create an infinite number of unique tactical levels by moving battles to the Darkmess dimension, the manifestation of villain Cursa’s dark influence across the galaxy. Handcrafting that many arenas would take far too much time, so a system was created to procedurally generate a variety of tactical battles with specific battle intentions in mind.

Before creating the system, the team needed to define their goals, explained Level Designer Frédéric Giraud during a presentation of the tech at the Game Developers Conference 2023 (GDC). In terms of creative direction, they wanted the levels to maintain a high quality, look handmade, and be as fun to play as carefully handcrafted levels. They wanted players to be able to express any type of tactical playstyle, and they wanted the battle experience to be replayable. “As much as possible, we want to avoid the repetitiveness,” Giraud says. “We want the experience to stay fresh.”

[UN][MRSH] GDC 2023 - Mario + Rabbids Sparks of Hope Layered Battles - IMG 1

Step 1: Build Levels and Tag Layers

To begin with, the level design team built 10 levels by hand and tagged the different layers that compose those levels, creating a library of assets to generate from. The first layer is the topography; the team created one level per environment, with around 10 environments in the game total. Six different free-shaped grounds, or pieces of the battle area that could be connected to form an arena, were built for each level, resulting in 63 possible ground combinations, each tagged with specific keywords for size, shape, and elevation.

On these topographies, three navigation layers were created: the first uses navigation tools like pipes and jump pads; the second includes natural connectors like bridges and slopes; and the third mixes both tools and natural connectors. Next, nine cover layers were created for each level with different densities, distribution, and props. Finally, the team created a layer of volumes and zoning, used for spawning Heroes and enemies.

The process was repeated for all 10 levels for each environment. “We only had 10 levels to dress once, which resulted in the correct level art workload,” says Giraud. “Thanks to this, we were able to generate levels. We can combine different grounds, we can apply a cover layer, we can apply a navigation layer, and this way we can create and achieve a certain variety of levels and topographies.”

Step 2: Improve Hero and Enemy Spawning

When first testing the levels that were generated, Heroes spawned in locations that did not initially make sense for the battles. This led to the second step of development for the Layered Battle system: improving Hero and enemy spawning. Rules were created for three different spawning routines for the Heroes: grouped in a central position for “survive” objectives; grouped in an off-centered position for a “defeat” objective; and ungrouped for more difficult late-game battles.

Similar rules were created for enemies, with spawning rules set for each archetype. Some archetypes preferred to have cover or a specific distance to the Heroes. Support enemies needed to spawn in already-populated volumes, while lone archetypes could spawn solo. Each enemy was also tagged for their preferred topography, such as open fields and elevations.

Thanks to these spawning rules, the team was able to create multiple “Defeat All” battles, in which the Heroes need to defeat every enemy on the map.

[UN][MRSH] GDC 2023 - Mario + Rabbids Sparks of Hope Layered Battles - IMG 2

Step 3: Adapt a Variety of Objectives

The team next needed to address the lack of variety in battle objectives within the generated levels, by creating a series of new objectives. An objective list was created, with six different objectives available in the game: defeat all; defeat x (a certain number of enemies); defeat a specific archetype or boss; survive a set number of turns; destroy targets (such as Darkmess eyes); and reach a specific area. Rules needed to be set for each objective. For example, with the ‘reach’ objective, a specific area needs to spawn, furthest from the Heroes’ spawning position.

In addition to the objective list, enemy lists were created, with limited groups of different enemy archetypes. With up to 15 enemies in the game, the team wanted to encourage enemy synergies. “Some enemies work much better with each other than others,” Giraud says. “Archetypes were given specific keywords that are linked to their overall strategy; do they prefer to go to cover? Are they using AOE attacks? What would be their attack range? What kind of Hero gameplay do they leverage?”

These lists added a great deal of variety in the generated battles, and kept each one feeling fresh and unique.

Step 4: Apply and Narrow Down Your Intention System

In order to keep a sense of variety from one generated battle to another, the team created intention lists, which are sets of keywords used to filter specific generations and enforce specific results. 50 battle intentions were created for Mario + Rabbids Sparks of Hope. “Every field in those intentions can be either left random or set by the level designer,” Giraud explains. “This way, we can decide if each generation should have more or less freedom.”

For example, the intention list for a sniper battle would include keywords for a large topography for long-range archetypes to function correctly; polarized covers with more densities on the side and less in the center; bridges for navigation; and for Heroes and enemies to spawn in defensive positions. In contrast, an explosive battle would call for a small and condensed topography, destructible covers, pipes and jump pads for faster navigation, and lots of Bob-ombs.

One last component was needed to complete the Layered Battle system: the Layered Battle configuration file, which assembles all the assets, keywords, and information together to create the Layered Battles. “It refers to every selected library – the enemy list, level list, intention list, objectives, and so on,” says Giraud. “And we had to create one layered battle configuration file per battle instance in the game, and this way we could generate battles that result in the controlled qualitative yet open generation for all of these battles in the main game.”


Mario + Rabbids Sparks of Hope contains 30 handcrafted battles and 50 Layered Battle instances. All of the side content in the game relies on the Layered Battle system. On top of that, the first DLC, The Tower of Doooom, is a roguelite game mode based on replayability, in which players go through 10 successive battles, with the choice between multiple portals for each one. This meant an infinite number of possibilities for each Tower of Doooom run. “This entire system is based on the Layered Battle configuration file generation, so it uses our system and we had to adapt the system to be more in-depth here and there for the downloadable content requirements,” Giraud explains.

Giraud says the biggest advantage to the Layered Battle system is that they have virtually endless content, while keeping some specific control of the experience. He concluded his GDC presentation with a few key takeaways for fellow developers: Define what “procedural” means for your specific project; don’t be afraid of trial and error; test, assess, redefine, and question the overall system constantly; and onboard people and communicate about the process to your entire development team. “You need to communicate the development steps to reassure everyone on the production,” Giraud says.

Mario + Rabbids Sparks of Hope is available exclusively on Nintendo Switch. Read more about the first DLC, The Tower of Doooom, and all of the upcoming DLC.

More From Ubisoft

June 12, 202310 Min Read

Star Wars Outlaws™ Revealed, New Assassin’s Creed Mirage and Prince of Persia: The Lost Crown Gameplay

Star Wars Outlaws™ revealed, release dates for Avatar: Frontiers of Pandora and The Crew Motorfest, new Assassin’s Creed Mirage and Prince of Persia: The Lost Crown gameplay, and more - here’s everything revealed during Ubisoft Forward 2023.

Read More
June 12, 20239 Min Read

Prince of Persia: The Lost Crown Will Put Your Combat, Platforming, and Puzzle-Solving Skills to the Test

Hands-on with the first hour of gameplay from the Metroidvania-inspired platformer.

Read More
June 12, 20233 Min Read

Avatar: Frontiers of Pandora - Release Date Announced, New Gameplay Revealed

As a Na’vi, protect Pandora against the RDA threat in a stunning yet dangerous open world, coming December 7.

Read More
June 12, 20232 Min Read

Assassin’s Creed Mirage Shows Off New Stealth Assassination Tools and Abilities

Creative Director Stéphane Boudon and Art Director Jean-Luc Sala break down eight minutes of brand-new gameplay.

Read More