Dungeon Banner

Overview


This was my final project for my AI in Games class that I worked on alone. I later developed it into a Unity package by cleaning up some of the code, adding editor tools so it can be used potentially for designing and saving level layouts, and I added comprehensive documentation here on github that explains how the system works and contains information on classes and their members. The 3D Dungeon Generator:


1. Defines a grid

2. Places rooms in the grid randomly

3. Performs Delaunay Tetrahedralization to get a streamlined map that connects the rooms

4. Calculates the minimum spanning tree of the undirected graph of the edges from tetrahedralization

5. Adds random hallways back

6. Determines hall pathways using A*

7. and finally places rooms, pillars, walls, and other assets.


  In the demo build on the Itch page, there is an orbital camera that allows you to right-click and drag to view the entire dungeon and zoom in and out with the scroll wheel. By pressing Enter, you can switch to a first person perspective that uses WASD. The player camera can be frozen in place using F (and unfrozen in the same way).

Tools


Unity

C#

A* Pathfinding

Delaunay Tetrahedralization

Reflection


  Working on this project was really rewarding. I learned a lot about several different algorithms like A* and Delaunay Triangulation/Tetrahedralization. I learned what can be achieved by combining multiple algorithms into a single feature. Turning it into a package was very rewarding and educational as well as I considered what developers may want in order to use the project properly. I plan to continue developing this into a tool that others can hopefully make use of.