r/dftfu • • Dec 18 '16

Daggerfall Dungeon Implementation

Hi, i would like to ask how does daggerfall generate its corridors.

According to http://www.uesp.net/wiki/Daggerfall:Dungeons

it says dungeon generation uses only a 2d layout, isnt this a paradox? how do the blocks end up in different height in 3d space, if they are created with 2d layout, with only x and z coordinates and no y.

if i understand right, we have 32 room types, each with 4x2 connections (exits). How does the algorithm decide :

a) Which rooms to connect.

b) What if the corridor that connects these 2 rooms, intersects with another corridor in 3d space.

c) How is the corridor path created?

c1) By spamming "static block" prefabs [created by artists]? or

c2) is it a procedural generated mesh to connect those rooms? if so, how does it avoid intersections?

d) So do the artists decide the height (c1 implementation) or the programmers (c2 implementation)?

thank you, i tried to create an account on your forum, but the activation mail was never sent.

8 Upvotes

2 comments sorted by

View all comments

Show parent comment

3

u/maxthebestmega Dec 19 '16 edited Dec 19 '16

thank you, your help is invaluable, i finally figured it out !!! At last. It always budged me how it really works and now it totally makes sense.

Therefore for those who are new: a RDB block is a subdungeon that will be linked with other subdungeons in the 2d layout connection. These subdungeons are huge size (x2-5 times an oblivion dungeons size), with tons of walls, doors, at different heights, secret triggers, loot containers, static enemies. Therefore artists designed these subdungeons (3d models), with all their connections explicitly. (Nothing in RDB block is done by a programmer).

All RDB blocks have the same constraint "8 doors at the exact same 3d position". These RDB blocks connect with other adjacent RDB with 2 doors at each side (the doors are always at the same space). Total 8 doors (2x4sides). When they want the dungeon generation to end, in the 2d layout, they connect it with Border blocks, to seal the 8 doors and create deadends.

I opened first dungeon: Privateer's Hold and it had only 5 RDB blocks. 4 of those were "Borders". So you can say the starting dungeon was a "center" prefab dungeon with 4 "deadend" prefabs. So i guess the "center" prefab block is unique and is only used by Privateer's Hold.

The whole game has only 187 RDB blocks. Perhaps a daggerfall mod could expand it with new RDB blocks, to make even more crazy combinations, more secrets, and make it even more unique.

Why did the designers choose 2 doors per side? a) With 1 door per side, the flow of the generation would be predictable. The player would only have to find the a door, place a mark / memorize the door so he doesn't return back to same spot, eventually he would move to the next RDB = win. b) With 2 doors per side, the player will end back to the previous RDB he started = Evil. On the second door there is no mark, the player never crossed it, sees it for the first time, and cant memorize it. Therefore he takes the wrong path and returns back. Evil endless cyclic loops form to show their endless love to you. Did you spend 8 hours in a daggerfall dungeon when in other games it took only 8 minutes to finish?

for the forum, the mail arrived after 6 hours, so the issue with the account is resolved. thank you.