DE

procedural Dungeon Generation

January 2017

Dungeon Generator Cover

In the course of my studies, each student was given time to work on a project in a field of one'S choice. Goal of my project was to create a game from the dungeon crawler genre in Unity 5. The focus was on the procedural generation of a dungeon in 3-dimensional space.

the procedural generator in action

The generation of the level happens in several steps:

  1. A certain number of rooms is distributed on a 2-dimensional level
  2. The positions of the rooms are connected by means of Delaunay's triangulation method in order to determine all neighbours of a room and mark possible connections (yellow lines)
  3. From the resulting graph a minimal spanning tree is calculated to determine the shortest connections between all rooms
  4. Rooms are connected with paths of the spanning tree, then some additional rooms are randomly connected to allow loops (red lines)
  5. With this information a base mesh is calculated
  6. The floor mesh is used to distribute walls, torches and dungeon objects (e.g. boxes).

Back to the overview