Dungeons Generator

cover

2 min read

Intro

The Desolation was a cooperative looter-shooter designed for both mobile and consoles. The game featured a variety of environments, with a primary focus on underground, dungeon-like levels.

game demo

Level Description and Generation

For this game, I collaborated with artists and engineers to develop a level generation system capable of reproducing handcrafted levels and at the same time procedurally generate levels using preassembled tiles. This work involved designing shared data structures, integration with the deterministic multiplayer engine1, and the creation of tools to aid the construction of the tileable assets. At the heart of this system was a customized Wave Function Collapse (WFC) solver2, providing precise control over the constraints used by the level generator.

Modes

In level generation, it is often desirable for game designers and level designers to have control over paths, hubs, and areas. To achieve this, the level solver was designed to operate in two modes: one where specific areas were entirely dictated by the designer and treated as immovable constraints, and another more flexible mode. In the latter, the solver could explore, make permutations, and bypass constraints that obstructed the creation of a viable level. The output of this process was a common level description that was reproduced in every client and the server.

features development with erosion

Technical Bits

As this was a multiplayer game utilizing a deterministic engine, it was essential for the client and server to produce identical results during the level generation process. To ensure this, I developed several tools that integrated seamlessly with Quantum’s navmesh data model. These tools included debugging utilities to visualize errors in the generation process and address garbage collection issues inherent to the creation of runtime geometry. Additionally, I created validation tools to ensure the navigation mesh’s generated areas were navigable and reachable.

features development with erosion

A tile design helper was implemented to check the boundaries of all the tiles and save the result to a collection/set. This tool provided asset validation and checked for errors for in the precalculated navmesh

features development with erosion

Acknowledgments and Credits

The content used by the level generator was developed by the art team, with the tile creation tools designed to align with their feedback and requirements. Critical aspects such as data serialization and server integration were handled by the engineering team. Their contributions were indispensable in making this system a reality.


Footnotes

Footnotes

  1. Quantum by Exit Games

  2. WFC Reference Implementation

Published: Aug 04 2024
Updated: Apr 15 2024