Skip to content

shtoa/PDG_Funhouse

Repository files navigation

*\◅(•-•)▻ 🧱 PDG_Funhouse 🧱 ◅(•-•)▻/*


Final Funhouse, is a procedural dungeon generator implementation based on the binary space partitioning algorithm. At the core of the generation are these three steps:

  1. Room Connection
  2. Space Partitioning
  3. Corridor Generation

Here is a small demo of the current state of the project:

PDG Funhouse Demo

Contents

  1. Acknowledgements
  2. Project Installation
  3. Setting Up Generator
  4. Using the Generator
  5. Play Mode


✒️ Acknowledgements ✒️

1. Acknowledgements

The following projects have contributed in large to the development of the prototype:

  • Third Person Character Controller - developed from tutorial by spaderdabomb

Spaderdabomb (2024). FinalCharacterController. URL: https://github.com/spaderdabomb/FinalCharacterController

  • BSP Dungeon Generation Architecture - adapted from SunnyValleyStudio [MIT Licence]

SunnyValleyStudio (2020). Unity_Procedural_Dungeon_binary_space_partitioning. URL: https://github.com/SunnyValleyStudio/Unity_Procedural_Dungeon_binary_space_partitioning



📥 Project Installation 📥

2. Project Installation

⚠️ Project Dependencies

To run the project please install the above version of Unity. Then proceed to clone the project to create a local repository using the following commands:

HTTPS

git clone https://gitlab.doc.gold.ac.uk/miliy001/PDG_Funhouse.git 

SSH

git clone git@gitlab.doc.gold.ac.uk:miliy001/PDG_Funhouse.git

⚠️ Loading LFS Files

As larger assets such as the models and textures are stored using Git Larger File Storage the following command need to be run with Git-LFS installed:

git lfs install

After cloning the repo and loading lfs files, open the folder via Unity Hub:

  1. Navigate to the Projects tab on the left hand menu.
  2. Select the Add dropdown on the right and add project from disk.

[hubNavigation]

⚠️ make sure to select the correct Unity version (Unity 2022.3.28f1) in the editor version dropdown.

  1. Then double click the file in the projects menu to open.



⚙️ Setting Up Generator ⚙️

3. Setting Up Generator

Opening up the Unity file you will be greeted with an untitled scene:

hierarchyLocation

To setup the dungeon generator scene, navigate to:

./Assets/Scenes

double click the Dungeon file to open the scene.




🧱 Using the Generator 🧱

4. Using the Generator

DungeonGen GameObject

The generator will be found on the left-hand side in the hierarchy labeled DungeonGen:

hierarchyLocation

It is possible to manipulate various properties of the dungeon such as the Dungeon Properties and Room Properties by clicking on the DungeonGen game object:

  1. For the DungeonCalculator:

hierarchyLocation

⚠️ Door Thickness has not yet been implemented

  1. For the DungeonDecorator:

hierarchyLocation

The gizmo on the dungeon generator can be moved and edited within the editor or in play mode:

hierarchyLocation



🕹️ Play Mode 🕹️

5. Play Mode

You can demo the generated dungeon using a simple third person character controller in playmode. To enter play mode in the editor press ctrl-p

Use the following controlls to navigate around the dungeon:

hierarchyLocation



About

3D Dungeon Generator in Unity

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published