

This dungeon generator was created as a part of a solo project for a dungeon crawler, which is currently in development.
Initially the dungeon was created using simple premade rooms, which would be generated in a random connecting sequence.
This allowed for testing of other mechanics and gameplay, while providing similar functionality to the more complex dungeon generator I intended to create.
To create the dungeon generator for this game, each room would have to be somewhat unique and more open than the initial simple generator.
The first step for this was creating a single modular room.
The walls were made to scale and move with the ‘room size’ to create a seamless singular wall. Randomised features were then added to each wall, allowing them to possess doorways or windows to other rooms.
After creating four walls that border the room’s centre, and a floor which scales accordingly all that is left is to decorate it.
The floor of each room will generate various decorations depending on the size of the room, ensuring they are placed and rotated randomly within the room using a grid.

To create the dungeon a grid-based algorithm was developed, which creates rectangular rooms of varying sizes, which are then stored in lists after ensuring there are no collisions.
New rooms are created from the doors generated by the old rooms, while ensuring that walls shared between rooms are not created twice by utilising the room grid.
Following the dungeon’s creation in memory, each room is initialised using the modular room script, before baking the navmesh for NPC movement.

Future Work
To complete the dungeon rooms, objects will be placed on walls for further decoration and other interactables will be added to the decoration item pool as development progresses.
I am currently working on the enemy AI mechanics and the player’s inventory system, updates will be posted to my socials and eventually here.


