A little experiment: a program that generates "dungeon" maps for games, in the style of "The Legend of Zelda".
Map 1 shows the general idea. Squares are dungeon rooms, colored by the level of key needed to reach them: none (blue), bronze, silver, gold or boss (red). "S" is the starting room, "B" the boss' room. Each "K" is the key of its color. So if this map were in a game you'd collect the bronze K first, then the silver &c.
This map shows treasure rooms labeled "$", and the idea of higher-level regions being split up so as to create "closets". In a game like "Metroid", there are small areas that're linked to an easy-to-reach area, that require some late-game tool to reach. That's what these "closets" are.
Done as a devil's-advocate reaction to the interesting procedurally-generated content (PCG) ideas of Squidi. I like his idea of using purposes for rooms (throne room, dining hall &c.) to specify a vaguely realistic random dungeon layout, but wanted to try my lament that you can get nearly the same result of a fancy system from a dumb system. Here's the dumb system: "grow" rooms onto the edges of the map, with semi-random exits and treasure placement. In contrast, Squidi had written about (
link) the idea of planning such a key-and-door layout with a more complex "environment tree".
(Oh, code's available for the asking.)