I’ve been spending the last week working on randomly generated levels, for a game I’m making with my brother. I started with an approach where it would make a bunch of rooms, in a grid, and then create paths through the grid to the end, like so.
However, after a lot of thinking and tweaking (and rendering the levels out into an actual tileset (hit M for mini-map)), I decided that wasn’t really what I wanted to go for at all. So, I then spent the next 3 or 4 days reading about how to generate roguelike levels, but couldn’t really find anything I liked, until I stumbled upon this, which actually explains, step by step, how to code a roguelike in Python. I didn’t actually read any of the code, but I used the method he describes there, which generally seemed like it should work for what I was trying to accomplish.
However, it still didn’t seem quite right. I had some cool stuff being generated, but it was really blocky and square looking.

So I decided to try to make the rooms anything but rectangles, to give it a more natural feel. That’s when I found this, which explains a method that worked really well for what I wanted.
Finally, I decided to make it so the individual rooms could overlap, to create this really interesting, natural feeling, underground caverns/dungeons.

My end result is this. I’m pretty pleased with it, generally.
(hit R to create a new map)

Hey Noel !
Cool work.
That end result is pretty awesome
Sweet! Randomly generated stuff always gets me really excited. Looks great.
Cool! I’m not a huge fan of the 1 pixel hallways connecting things though. Maybe try using a procedural technique to widen them out so they looked like natural tunnels?
Anyway, you’d better make a super hardcore roguelike now.
Thanks guys!
@Ninjutsu: Yes, I definitely agree. I’ll work on that now, and see if I can make them a little more natural and interesting.
Also, the game is going to be a bit of a mix between a roguelike, and Zelda (hopefully). So, I can’t really say it’s gonna be hardcore roguelike (though I hope to make one of those eventually!)
Hey, great work here! Would you mind releasing some source for the dungeon with the square rooms? I’m working on a game that could use something like that.
Nevermind. Just ported the python code myself.