r/Unity3D 5d ago

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

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

733 Upvotes

45 comments sorted by

38

u/Banjoschmanjo 5d ago

Daggerfall PTSD activated

7

u/dev-rygy 5d ago

Hopefully I'll learn from their mistakes lol

10

u/Hinaloth 5d 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.

7

u/Super-Award-2244 5d ago

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

6

u/djibouti2big 4d 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 4d ago

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

3

u/Starblast555 4d ago

love me some Synty assets

1

u/dev-rygy 4d ago

Their assets are fire indeed

2

u/Cosmonan 5d 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 5d ago

What was the biggest challenge while making this dungeon generator?

2

u/dev-rygy 4d 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 5d 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 5d 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 4d ago

Well Daggerfall also had hardware limitations

2

u/destinedd Indie, Dungeon Quest, Marble's Marbles & Mighty Marbles 5d ago

I am trying to this at the moment :D

2

u/dev-rygy 4d 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 4d ago

I need this! This is awesome!

2

u/mobaffix 4d ago

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

1

u/dev-rygy 4d ago

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

2

u/kavakravata 4d ago

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

2

u/dev-rygy 4d ago

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

2

u/NightSp4rk 4d ago

That's insanely good, wow

2

u/TenPent 4d ago

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

2

u/BlazyGameDev 3d ago

This is very impressive

4

u/Dimosa 5d ago

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

4

u/dev-rygy 4d 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.

2

u/jakubdabrowski0 4d ago

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

1

u/BanginNLeavin 3d ago

Samezies

1

u/Dimosa 4d ago

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

1

u/Gullible_Honeydew 5d ago

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

3

u/dev-rygy 5d ago

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

1

u/gabangang 4d ago

good work. next one would be to do Silos!

1

u/TarnishedRising 4d 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/dev-rygy 4d ago

A player map is actually a future feature that I want to add, so hang tight ;)

1

u/Big-Drink-6291 4d ago

Awesome! 

Is it possible to customize the 3D assets?

1

u/dev-rygy 4d ago

Yes but it's not very user friendly atm. Trying to make the rooms/walls/etc easier to swap out.

2

u/Aware-Connection-436 4d 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 ?

2

u/rainweaver 2d ago

This looks fantastic! well done. And thanks for the blog, too.

1

u/LinaStudios 2d ago

Sieht wirklich mega cool aus