So, I found this page which talks about how maps in the game Berzerk were generated. They look like this:
Basically, you start with an open map, with 8 pillars (O=pillar, X=wall)
Code:
Then for each pillar, we pick a random direction to extend a wall toward:
Code:
I thought this was neat and wanted to make my own program to do so, and so I did:
I made it pretty general, so you can change the dimensions of the map and the wall to get something like this:
or this:
Though the drawing part and the actual maze generation part are all separated out. You can download it from:
http://merthsoft.com/Maze.exe (code)
Maze.cs has the actual room generation code. It's as simple as one might expect: pass in a seed, use that to seed the random generator, for each pillar generate a random direction. When creating the Maze object you specify the width and the height (there's no reason this couldn't be per-room, I guess), as well as the number of possible directions. In Main.cs I do the bulk of the work for rendering the map. Direction.cs is just a simple enum for keeping me sane.
Which rooms lead where I decided to leave out of the Maze object in favor of putting it in the implementation. I guess it could make sense in either place, but that's how I decided to do it.
Play around with it if you want. The code is free to do whatever you want with it, I don't care.
Here's a big maze:

Basically, you start with an open map, with 8 pillars (O=pillar, X=wall)
Code:
XXXXXXXXX XXXXXXXXX
X X
X X
X O O O O X
X O O O O X
X X
X X
XXXXXXXXX XXXXXXXXX
Then for each pillar, we pick a random direction to extend a wall toward:
Code:
XXXXXXXXX XXXXXXXXX
X ^ ^ X
X | | X
X O<--O O-->O X
^ ^
| |
X O O O O X
X | | X
X v v X
XXXXXXXXX XXXXXXXXX
I thought this was neat and wanted to make my own program to do so, and so I did:

I made it pretty general, so you can change the dimensions of the map and the wall to get something like this:

or this:

Though the drawing part and the actual maze generation part are all separated out. You can download it from:
http://merthsoft.com/Maze.exe (code)
Maze.cs has the actual room generation code. It's as simple as one might expect: pass in a seed, use that to seed the random generator, for each pillar generate a random direction. When creating the Maze object you specify the width and the height (there's no reason this couldn't be per-room, I guess), as well as the number of possible directions. In Main.cs I do the bulk of the work for rendering the map. Direction.cs is just a simple enum for keeping me sane.
Which rooms lead where I decided to leave out of the Maze object in favor of putting it in the implementation. I guess it could make sense in either place, but that's how I decided to do it.
Play around with it if you want. The code is free to do whatever you want with it, I don't care.
Here's a big maze:
