Development

Automatic Dungeon Logic – From Room Placement to Door Detection

Current development status

How Veildelve is learning to build its dungeons step by step: automatic room placement, corridor connections, door detection and the first movement through the generated dungeon.

A dungeon is more than a collection of rooms. For a procedurally assembled structure to actually feel like a connected dungeon, rooms need to be positioned correctly, corridors need to follow the underlying connections, and transitions between different areas have to appear in the right places.

That is what we have been working on during the latest development steps. What started as a relatively simple dungeon representation is gradually becoming a system that understands its own spatial structure and can turn it into an explorable environment.

Highlight: Moving Through the Dungeon

The current development version already allows us to move through the generated dungeon directly.

The video shows the different systems working together from the player’s perspective for the first time: positioned rooms, the corridors connecting them and the transitions between the individual areas.

This turns the dungeon from a structural preview into something that can actually be explored as one connected game space.

Step 1 – Putting Rooms in the Right Place

Automatically positioned rooms in a Veildelve dungeon

The first major step was getting the spatial placement of dungeon rooms right.

Instead of simply displaying rooms or stacking them on top of each other, the system has to interpret the dungeon structure and determine where every room actually belongs. Each room therefore receives a distinct position within the dungeon layout.

This becomes the foundation for everything that follows. Only once the rooms are positioned correctly can their connections be calculated and represented in a meaningful way.

Step 2 – Automatic Corridor Logic

Automatically generated corridor connections between dungeon rooms

The next step was building the connections between those rooms.

The system determines which rooms are connected and uses that information to create the required corridor sections. Depending on the layout, this can involve different configurations, from straight connections to turns and more complex junctions.

The important part is that corridors are not simply visual elements placed somewhere between two rooms. They need to become part of the same connected dungeon structure and meet the intended entrances precisely.

At this point, the dungeon begins to function as an actual interconnected network of rooms and corridors.

Step 3 – Automatically Detecting Door Positions

Automatically detected door positions between rooms and corridors

The next development step focuses on the transition between rooms and corridors.

Instead of manually defining door positions for every room, the goal is for the system to determine which wall actually connects to a corridor.

Using the room geometry and connection data, the dungeon can automatically identify where an opening needs to exist and where a door should be placed.

This is another important step towards a more automated workflow. Rooms no longer need individually authored door positions when those positions can be derived directly from their actual place within the dungeon.

From a Layout to an Explorable Dungeon

Each of these steps may sound relatively technical on its own. Together, however, they form an important part of Veildelve’s dungeon generation.

Abstract information about rooms and connections is gradually transformed into an actual game environment:

Dungeon structure → Room placement → Corridor connections → Door detection → Explorable dungeon

This brings us closer to the goal of creating dungeons whose spatial structure is generated from the underlying dungeon data instead of relying entirely on pre-built maps.

These systems are still in development. Visual refinement, additional room and corridor variants and further dungeon elements will continue to expand in future iterations.

But the technical foundation is increasingly taking shape: the dungeon no longer only knows which rooms are connected – it also knows where they are and how the player can travel from one to another.