Randomly Generated Dungeon
I really enjoy writing algorithms that can endlessly generate content for my games. While there are quite a few algorithms out there for procedural dungeon generation, I decided to give writing one myself a shot to gain a better understanding of the difficulties of writing one.
Extendable Spell System
Adding content should be quick and easy, so I designed an extendable spell system to allow for the easy creation of a wide range of different spells. Below shows how spells can be customized with either a "Damage over Time" or "Freezing" trait.
Wave Function Collapse Algorithm
I researched and implemented the Wave Function Collapse algorithm to randomly decorate the floors and walls of the dungeon. While I could have achieved very similar results by using a much more basic algorithm, I used this as a practice opportunity to get familiar with the basics of a popular algorithm.
Optimized Code via Profiler
Initial dungeon generation was taking a while and slightly laggy. I used the built-in Unity profiler to identify the poorly performing code and managed to reduce dungeon generation from ~3.2 seconds to ~0.9 seconds/
Slow dungeon generation at ~3 seconds
Fast dungeon generation at ~0.9 seconds
Optimized Code
Random Everything
To make the game as replayable as possible, everything in a run is randomized. Enemies, Items and Spells!