Project Type
Engine Used
Languages Used
Primary Roles
Main Skills Developed
|
Personal Project
Unity
C#
Everything - This was a solo project.
Technical Knowledge, Self Organisation, Research Skills
|
Binary Spatial Partitioning is a technique used to subdivide Euclidean space into several sections via the use of planes. In my project, I have used this to build a dungeon generator that creates dungeon rooms, connected by corridors, that contain enemies, traps and treasure chests! It does this by taking a full rectangle, splitting it into several different rooms and then connecting them with corridors. Afterwards, various environmental objects (which are customisable to a grid size, such as 2x2 or 7x4 for example) are spawned in according to this divided grid. All of this is controlled via parameters that I have exposed to the Unity Editor, and is easily expandable and customisable. Additionally, I have further constrained the algorithm by adding rules such as how each generated dungeon level must contain one, and only ever one, trapdoor (which provides the player a passage to the next level).
I have begun to expand this into a dungeon crawler game however this is a work in progress.
I have begun to expand this into a dungeon crawler game however this is a work in progress.
Example of dungeon generation
The above gif shows a quick overview of how my system uses the binary spatial partitioning algorithm to create dungeons. It firstly takes a whole space (a square in this case), then splits it up several times before applying borders to each room, removing some rooms, adding walls and then finally adding traps, enemies and treasure chests!
Generated Dungeon Examples
Gameplay Footage
The above video focuses on how my dungeon generator can be used as part of a game. I am currently in the process of adding more enemies and weapons to the game, and am then going to add a boss fight after five levels have been completed.
Source Code
Demo
A demo can be downloaded here: download