#Dungeon creation

29 messages · Page 1 of 1 (latest)

zinc stirrup
#

Hello!
I want to implement dungeon creation in C. The dungeon should feature rooms connected by corridors, ensuring that corridors do not intersect. Additionally, all rooms must be accessible.

Do you have any ideas on how I might achieve this? Every algorithm I have seen so far does not ensure that corridors do not intersect.

mint rivetBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.

alpine sonnet
#

You could probably take inspiration from maze generation algorithms

zinc stirrup
#

i want it to be sth like this

#

even though corridors intersect in this picture.

alpine sonnet
#

Where do the corridors intersect

zinc stirrup
alpine sonnet
#

Ok, so you don’t want branching

zinc stirrup
#

yeh but its not a huge problem

#

like even if that happens its just fine and acceptable

#

i found these algos

alpine sonnet
#

There are lots of ways you could go about this

zinc stirrup
#

but they do not include a way to draw the corridor

zinc stirrup
alpine sonnet
#

A super simple approach: Place a room somewhere, start walking randomly without intersecting anything, at some point place a room and start another corridor from there

#

Try to have fun with this, be creative

#

There are tons of ways to do this

#

Another thing you could do is take the “Binary Space Partition (BSP) Rooms” idea from that blog post and then just make the connections without intersecting

zinc stirrup
#

mhm

zinc stirrup
#

oh i forgot to mention that corridors cant intersect with rooms

#

so, I can't just draw them from the center of one room to the center of another.

#

but thanks for you help !

alpine sonnet
mint rivetBOT
#

@zinc stirrup Has your question been resolved? If so, type !solved :)