I am currently trying to make a room based procedural level generation system and I am quite stuck at the moment. I’ve made two different iterations of something I thought would work but both systems weren’t flexible enough or had weird issues.
The game is in 3D but all on the same plane, so effectively this only needs to be a 2D level generator.
This is what I had in mind:
(I apologise for my lack of artistic talent)
The idea is to have multiple room prefabs (some with different sizes) based on a standardised room size and then have the procedural room generator place them all in random orientations.
I’d also like to have the option to decide where the doorways are allowed to be placed (so I can have a room where one wall is covered in some sort of decoration for example) but this isn’t necessary.
There should obviously not be any isolated rooms with no doors either.
Lastly I’d like the system to be based off of a seed, so I can regenerate the same level multiple times.
At this point I have made two different systems, both with major flaws I couldn’t figure out how to solve.
In my first system I was placing the rooms as actors on an auxiliary actor (the doorway marker). This caused an issue with odd shaped rooms and obviously made a sort of diamond shape, as it was moving outwards from a single spot. furthermore I thought it wasn’t very good that the room actor’s root was sort of offset (so on the point where the entrance would be)
My second system had similar flaws, except for the fact that it is a lot more complex and has unexplainable, seemingly random overlapping rooms.
I have already seen these two threads, but couldn’t get something out of them that worked for me:
Thank you for any help!