This prototype is a project I started but never finished, but still showcases some skill - in this case procedural generation.
As you can see in the screenshots it is able to create a bunch of different dungeons - they are all created on a grid. The amount of rooms in the dungeon, as well as the max room width and length can be changed to create different types of dungeons. And it also spawns placeholders for chests, monsters and a boss, and a working portal to the next floor which will transport you to a new generated dungeon. The code snippet for the generation is at the bottom of this page. It is a bit weird, as it first generates the map in a 2-dimensional array, and only then spawns it in unity, but it was created a couple years ago and it was the only way I knew how to do it at the time. The code basically walls the whole map up, then digs out a starting room in the center, and then digs X rooms that have to touch at least one of the rooms already dug. Then it removes all unnecessary walls and only then spawns it into unity. |
Procedural Generation