Press <Space> to Generate a new Dungeon. Hover over the top part of the screen to change stats. Loops: Adds more loops so it'll seem less linear Main Rooms: The number of Green Rooms Size: Size of the Selection Big Dungeon: 13 Main Rooms, Size: 35 Regular Dungeon: 7 Main Rooms, Size: 21 Small Dungeon: 4 Main Rooms, Size: 13 The Full Algorithm from Firebelley: 1. Place Rooms - Place cells randomly dispersed in the middle so that they all overlap 2. Separate Rooms - Use the Separation Steering behavior to make sure no cells overlap while keeping them close 3. Identify Main Rooms - Find the main rooms (I chose the biggest ones) 4. Delaunay Triangulation - Make a path with no overlaps that moves throughout the dungeon (used @Ricky-Jan 's code) 5. Minimum Spanning Tree - Creates only ONE valid pathway for any 2 nodes 6. Add Loops - This is to make the dungeon less linear with fewer dead-ends. 7. Create Hallway Segments - Creates 90 degree hallways that use the nodes found in the MST 8. Add Hallway Rooms along Hallway Segments (HS) - Adds any unused rooms that intersect with the HSs 9. Trace Hallway Segments - Ensures all Main Rooms have a valid path
If you do use this (lol i doubt it) Please do credit me and everybody I mentioned below This is the 2nd part of the previous project I made! This is just me following Firebelley's instructions on his video: "Dungeon Generation in Gun Game" This is NOT a Walker Algorithm. Instead this is named the "Tinykeep" Algorithm. For more info, here is the video link, where he talks more in-depth about how the Algorithm works: https://www.youtube.com/watch?v=sr6xgWhl08A SONG: Three Year Shmee - ONE Original Soundtrack Made by Cheesy Hfj CREDITS: @-Rex- for the rectangle filler: https://scratch.mit.edu/projects/236128688/ for the Delaunay Triangulation Code for the Line-to-line collision code (me!) This is what I did (for those curious): - Separation Steering Behavior - Prim's Minimal Spanning Tree (MST) - Line-to-Rectangle Collision Detection - Selection Sort (ik its simple it sounds cool ok?)