Sorry if I'm stating the obvious, but maybe this could serve as a starting point for those who are unfamiliar with maze generation. Here are some widely used, basic techniques to create mazes:
- Rogue style: horizontally and vertically divide a map in sections to guarantee there's no overlap, build a room in each section, then dig tunnels between the rooms. (This is the technique used in e.g. Rogue and Biskup's QHack)
- Recursive subdivision: start by dividing a clear map in two halves, or four quarters, using walls. Then subdivide each room in the same manner, and continue until all rooms are small enough. (This is the technique used in e.g. Alphaman and DoomRL)
- Overlapping shapes: fill a map with rock tiles, then dig out shapes (circles, crosses, or L-shapes) at random locations, making sure that at least a single tile overlaps with a previously dug out tile. (This technique produces results similar to e.g. Dungeon Crawl's Lair branch)
- Prim's/Kruskal's algorithms: fill a map with rock tiles, then dig out 1x3 sections, making sure each section overlaps with a single previously dug out tile. This creates a perfect maze, i.e. one that has a single path from one point to another. (Doesn't occur in any RLs that I know of)
These are just basic approaches, and each requires some postprocessing to create a playable Roguelike map. By themselves, none of them will produce nice NetHack or Angband style maps. Recursive subdivision doesn't create twisty tunnels, Prim and Kruskal don't make rooms at all, and the 'overlapping shapes' technique doesn't create very nice rooms or tunnels, just a roughly hewn cave. The advantage of all techniques is that they can be used to guarantee connected mazes (i.e. with no unreachable segments).
I've always liked perfect mazes as a starting point, but they involve lots of postprocessing. Creating loops in tunnels, filling up dead ends to free up space for rooms, inserting doors at appropriate places, etc.
Here's a couple of references I'd recommend:
I'd be very interested if anyone knows more techniques or references.