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 generation of the level happens in several steps:
- A certain number of rooms is distributed on a 2-dimensional level
- 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)
- From the resulting graph a minimal spanning tree is calculated to determine the shortest connections between all rooms
- Rooms are connected with paths of the spanning tree, then some additional rooms are randomly connected to allow loops (red lines)
- With this information a base mesh is calculated
- The floor mesh is used to distribute walls, torches and dungeon objects (e.g. boxes).