Dungeon floorplan merging


Author: Adam Stagg

To get the dungeon floorplans to feel more organic and unique, there should be a way for rooms to not just be boxes or squares. If all rooms are just the same shape, this can lead to dungeons feeling boring and the same. Having a unique shaped room will make the dungeons feel different, despite using the exact same algorithm. 



To solve this, when generating rooms it will check if a boolean "Merging" is on. If so, it will try to remove some space between the rooms This gives the illusion of rooms generating in unique shapes, as demonstrated above. The only other thing to note is that it will affect wall placements. When placing walls before, just encase the entire room with the corresponding wall piece, however now with merging there will need to be an iterative process that goes over every tile and determines which wall piece corresponds, then place it. This is to ensure no walls are placed randomly in the middle of a room that has been merged with other rooms. 

Leave a comment

Log in with itch.io to leave a comment.