I proposed this feature during the game development, but I think it was a bit premature

The Dungeon Hack model seems a good starting point to me - it would be interesting to know the algorithm used (layout and placing of doors, keys, stairs and special areas).