So what is this thing?
I wanted to make a Zelda clone, but with endless random dungeons, and far more cool stuff than the original game. What I have so far is a game that creates a random maze of rooms, each room with a random lay out, and random treasures.
Random maze generation
I'm still working out the finer points of the system, but currently here is how it works. The game starts by choosing a random maximum width and height for the level, and then places the entrance randomly. The door through which you enter always faces away from the edge of the level. It then starts creating a random corridor, crawling through the level room by room, until it reaches its limit, and then it places the exit room. It also turns the second to last room into a boss room, and seals it with a boss door.
It then starts picking random empty rooms that are part of the main chain, and uses them to create side-tunnels. When it reaches the end of a tunnel, it tries to place a random treasure there. Treasures are determined randomly at the start of the game. But each dungeon will always contain: 1 boss key, 1 map, 1 compass, 1 crystal ball, 1 random weapon, relic or legendary item, and a random number of keys.
It also creates a couple of random bonus rooms, which may contain chests filled with money. At the end of the creation process, it places traps, buttons, and picks random room templates for each empty room. Rooms can also have variations, so not every entrance has to look the same. But this is merely a matter of adding more room files for the game to choose from. Currently I'm fine with 1 version for each room.

Image link
So lets go through the features that I've implemented so far.
Treasure chests
Chests spawn randomly throughout the dungeon, and if a chest contains a special weapon, a treasure room is created with a big chest. Upon using the chest, it opens, and the item is given to the player. None of the items have been implemented yet, but they do have a visual representation upon acquiring them. Different music is played depending on the kind of item.

Image link
Keys and locked doors
When ever the game places a key in a room, it tries to find a suitable place for a matching door. The rules for this are simple. When ever the game makes side corridors, it remembers the depth at which it started the new tunnel (this is called the origin). So it knows that the door must:
1> Be placed in a different chain, in a room with a higher depth. Because first you find the key, and then you encounter the door.
2> Or, in the same chain, but a higher depth.
It also gives priority to rooms that are considered 'special'. Any room that contains a special item, the boss key, or is the room outside the boss room, is considered a special room. So those are checked first, and you'll often find them locked with color-coded doors.
Right now there are 6 keys. The boss key, which only fits on the boss door. The red, green, blue and yellow key, which fit their respective doors. And lastly, the skeleton key, which fits any color door (but not the boss door).
Keys you've collected are currently shown at the top right of the screen.

Image link
Buttons and switches
Switches are among the random objects that the dungeon can place in a room. Their positions are predefined, but the game has several spots to choose from. Switches toggle the blocks up or down that come out of the floor. They can also be toggled with ranged attacks, and by traps.
Buttons are similarly randomly placed, and can reveal hidden chests, or open a trapdoor.
Dungeon items, map, compass, crystal ball
The dungeon items always spawn in any dungeon, and they are all working. The map instantly reveals all the rooms in the dungeon on your mini map, but not their connections. The compass shows a yellow dot where the exit is on your mini map(this is how the compass worked in Zelda 1). The crystal ball reveals secret rooms, and plays a warning signal when you enter a room that contains a chest (hidden or otherwise). In combination with the map this is even better, because the crystal ball also highlights rooms that you have not visited yet, if you have a map. The red dot on the map is the player. Currently the mini map is working perfectly, and I'm very happy with it.

Image link
Trapdoors
Trapdoors are placed randomly, and can be triggered to open when certain conditions are met. This varies, but sometimes you need to press a button (shown in the picture), push a block, find a hidden switch, or kill all the enemies. These last three have not been implemented yet.

Image link
Traps
This took a lot of work to implement, but it is now working perfectly. During dungeon-creation, the game places a random number of traps in the dungeon (more for bigger dungeons). The locations for pressure plates are predefined, but the game randomly picks one of the possible locations (usually near doors). It then searches for shooter-locations, that are in a direct line with the pressure plate. Shooters are invisible, but can fire a variety of projectiles at the player from the wall. These projectiles can also destroy vases, and toggle switches. These projectiles can be blocked with the shield, and can harm enemies too (once I implement them).
Vases
Vases can currently be destroyed by hitting them with the sword. They do not drop anything yet, and cannot be picked up and thrown yet (but I will add this feature eventually). As with a lot of other objects, vases come in sets that are predefined, but the game chooses randomly which locations to use, -and IF it wants to place them.
Health display
The game currently has a working health display, that can show half-hearts, quarter-hearts and empty hearts, as well as full ones. It also starts beeping if you are down to 1 heart.
Getting hurt
The player flashes red if he gets hurt.
What are the challenges up ahead?
The next big thing I want to implement, is additional room types. Currently the game places single rooms, but I'd like to have rooms that stretch over multiple screens. This means that the game has to match up multiple rooms. I'd also like to fine tune the algorithm, and get some more interesting dungeons. Maybe height differences, and warp zones would be cool to have. Pushing blocks, and picking up items would also be nice. And of course effects, and items that drop, which you can then collect. I'll be looking at these things next.
There's some other room types that haven't been implemented yet. I'd like the game to also place very specific types of rooms, such as hubs, single corridors, and long hallways.