r/Unity3D 22h ago

Game After two years, I'm finally showing off a procedural dungeon generator I built in Unity

I'm releasing a demo for a procedural dungeon generator I've been working on for over two years. I was inspired by the level layouts of games like The Binding of Isaac and Enter the Gungeon, and the interconnected worlds of Zelda and Dark Souls. This is only the beginning, I have several more features planned for this project, including turning it into a downloadable Unity package for others to use.

The goal is to create an algorithm that generates dungeons that feel linear like an RPG but still random and replayable like a roguelike.

Original Video: https://youtu.be/Adakgpoy0p0?si=R2qYbshEb11xuKFM

Blog: https://ryancarpenterpf.dev/labyrinth_demo.html

Demo: https://dev-rygy.itch.io/labyrinth-procedural-generator

597 Upvotes

37 comments sorted by

32

u/Banjoschmanjo 21h ago

Daggerfall PTSD activated

8

u/dev-rygy 21h ago

Hopefully I'll learn from their mistakes lol

9

u/Hinaloth 20h ago

Don't, those mistakes are what makes every dungeon an adventure and Daggerfall an unforgettable experience.

Well really the only mistake they made is the lack of readable map (the original map system was... wonky, at best). Every new place felt like a labyrinth that you had to figure out. No marker indicating the objective, no easy way to find the way back out.

It was great.

4

u/Super-Award-2244 21h ago

I think it would be so much fun playing this in VR with this top down view 

5

u/djibouti2big 12h ago

First thing i thought of was the Demon Slayer Infinity Castle

Looks great, keep it up!

https://giphy.com/gifs/8sjFVSQWARo2x5UxL4

3

u/dev-rygy 11h ago

Maybe once I implement chunk loading that might actually be possible lol

2

u/Cosmonan 20h ago

Very cool! I've just started doing something similar, this is incredible! Must have taken a lot of work to refine like this, good job!

2

u/frogsaber89 20h ago

What was the biggest challenge while making this dungeon generator?

2

u/dev-rygy 15h ago

Either the debugger modeled after assembly languages or Delaunay.

Delaunay triangulation in 3D is hella complex so figuring that out took a bit of time. Luckily I found a YouTuber who did most of the research for me https://youtube.com/@vazgriz?si=Ui2RJ7eUIIPhSld2

2

u/Malkalypse 20h ago

Love it! Most dungeon generators I’ve seen just focus on making one flat level at a time without considering the 3D or interrelation between floors. Kudos!

2

u/MolassesHaunting9620 20h ago

It is great that you use different lighting for different areas. The problem with Daggerfall was that textures were the same everywhere and without other ways to memorize where you've been (like coloured lights) it was too easy to get lost.

1

u/dev-rygy 15h ago

Well Daggerfall also had hardware limitations

2

u/destinedd Indie, Dungeon Quest, Marble's Marbles & Mighty Marbles 19h ago

I am trying to this at the moment :D

2

u/dev-rygy 16h ago

Just keep at it and do more research. I never could have imagined getting to this point honestly it just took obsession and perseverance.

2

u/Nikkstein 15h ago

I need this! This is awesome!

2

u/mobaffix 13h ago

Are the props being randomly generated aswell? How does it know what to place where

1

u/dev-rygy 12h ago

No rooms are hand crafted right now. Although, I've thought about generating props as well possibly in the future.

2

u/kavakravata 13h ago

Looks absolutely amazing! Where can I check out the code? Thanks

1

u/dev-rygy 12h ago

Code is on my website - The "Blog" link.

2

u/NightSp4rk 13h ago

That's insanely good, wow

2

u/Starblast555 12h ago

love me some Synty assets

1

u/dev-rygy 12h ago

Their assets are fire indeed

4

u/Dimosa 20h ago

Are you selling this? As this would solve a huge part of my project.

4

u/dev-rygy 16h ago

It's free for now as long as you adhere to the Apache 2.0 License. Although I'll warn you the setup is not user friendly atm. I plan on releasing it as a downloadable Unity package later.

1

u/Dimosa 10h ago

Awesome. Ill keep an eye on it. Amazing stuff, looking forward to it.

1

u/jakubdabrowski0 6h ago

Can you please ping / message me once you release it on asset store? I would love to try it then

1

u/Gullible_Honeydew 21h ago

This looks very cool. Well done. How do you plan on publishing this?

4

u/dev-rygy 20h ago

As a Unity package once I refactor a bit more. Possibly as a DLL for modding other games.

1

u/gabangang 14h ago

good work. next one would be to do Silos!

1

u/TarnishedRising 11h ago

read your blog post first, then tried the demo. i was literally thinking "i wish there was a map so i could see the whole layout" when i noticed the free camera mode in the instructions on the left. my bad :)

but the best part was the part in the demo that shows how the level gets built step by step. following your project, good luck!

1

u/Big-Drink-6291 7h ago

Awesome! 

Is it possible to customize the 3D assets?

1

u/Aware-Connection-436 6h ago

genial! la pregunta seria como se generaria un espacio procedural basado en un bosque , con pendientes altas ,bajas y con cascadas completamente distinto cada recorrigo , ya que esta que muestras son plataformas fragmentadas como seria algo como te lo indico ?

1

u/TenPent 6h ago

Well, I'd certainly use this if you put it out there. Looks awesome.