Devin Üner

Dungeon Generation

This is a procedural generation algorithm that creates a near-infinite dungeon (so large, no player could ever see all of it). It uses a psuedo-random number generator to pick where the various rooms are, and uses some basic logic to ensure that every section of the dungeon connects to every adjacent section. I created the algorithm a while ago, and implemented it with a friend of mine during our senior year of high school. We learned a lot about developing iOS apps, Swift, and procedural generation. There were lots of very interesting algorithms and equations involved. Some of them were complex enough that Swift complained and wouldn’t let us run them in one line - we had to break them up. Most of the more complex math was just us playing around with ways to make the game more random and fun though, there isn’t anything too insane in the core algorithm. The steps are explained and visualized below.

>