See also oubliette.
In games, dungeons represent a dangerous area with many hidden secrets to explore. For instance, in role-playing games like Dungeons & Dragons, castles will have dungeons with dozens of levels going hundreds of meters down, with deeper levels having progressively greater dangers and rewards. This metaphor has become so common that games built around this design are known (somewhat pejoratively) as dungeon crawls. The confined and constrained nature of the dungeon also simplifies the programming of computer role-playing games.