This is a Random “Dungeon” Generator Script I created using python and the pygame library.
It was intended to demonstrate the possibility that a dungeon could be randomly generated using math where each “room” is aware of where another room is relative to its position. The feature isn’t really shown , but the source reveals that each room is aware of what room number is above, below, to the right and left of it.
The rooms are also Generated outward in a spiral pattern.Technically the Script works for any size, up to infinity, only I’ve capped it for performance reasons.
The dungeon also contains “walls”(black lines) and “doors”(brown lines).
The “player”(black dot) can move around the dungeon using the arrow keys.
The player will collide with the walls, and “open” the doors(they disappear).
The Dungeon will vary from small to very large each time, but the code is smart enough to place walls around the outer edge no matter what size it is.
Press the R key to make a new maze.
Press Esc to quit.
There is no win condition. Numbers are the location and name of each “room”.

This script requires that you have python 2.7 and pyGame installed to run it.