Dungeon Layout Generator
A generator based on this cart by @johanp. It uses a similar idea to place rooms, but is much more simplistic (I prefer to try and figure things out on my own before I dig into other people's code.) This particular version continuously generates new dungeons while running. Feel free to reuse this if you like.
+Added some statistics about generators.
+Fixed some issues with rooms becoming isolated (I think)
+Randomized the variables rooms are generated with every loop to better showcase the generator.
@johanp: Right now it increments a counter for each room every frame and when that reaches 30, it shrinks the room in either x or y dimension by 1 and resets. If either reaches 0, the room is deleted, but it should probably shrink to 1-1 size before deleting instead.
Love it! Though I did witness one generated dungeon where a room was placed in the top right corner and not connected to any other room.
Seems like a very rare event, only happened once and I watched it a while.
I'm like you, I don't like to use too much of other people's code, it's fun to try by yourself and you learn something.
If I ever make a roguelike I might try this method.
[Please log in to post a comment]