Chris Johnson - Game Designer

Procedural Dungeon Generation


This program, originally created as a personal study on procedural generation, creates tile-based 2D dungeons of any size at runtime. The program uses an “agent digger” algorithm that runs for a fixed number of iterations to create the dungeon. Each dungeon is radically different in layout, and the number of possible dungeon layouts is effectively infinite.


Though not a complete game, this program has gone through three iterations: the first as a personal study on 2D procedural generation, the second as an assignment focused on creating tile based environments and a camera to navigate them, and the third as an assignment focused on taking a previously created program and “refactoring” it to optimize it and make it more modular and object oriented.

The first iteration did not have a specific set of goals, and was more experimental and exploratory than anything else. I simply wanted to see what I could do and gradually push the program to create better and better results.

pcg01A generated dungeon from the first iteration of the program

The second iteration involved me utilizing this project as a base to prototype a camera and minimap system. To make the finished dungeons prettier, I made a simple tile set, and a function to place the correct tiles in the correct places (corner tiles, edge tiles, ect.). I also implemented a camera that could pan and zoom, and a minimap that included a representation of the current viewport (shown below).

pcgscreenshot001A screenshot of the second iteration, showing a small portion of dungeon (full dungeon is seen on the minimap)

The third iteration did not change the program visually, but instead optimized it and made it more modular for implementation in future projects. A more detailed explanation of these changes is available on my blog post.

Game Design Portfolio of Chris Johnson