Fix (most) duplicate doors

Discuss coding questions, pull requests, and implementation details.
User avatar
pango
Posts: 1334
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Fix (most) duplicate doors

Post by pango » Sat Jan 12, 2019 4:52 pm

Hi,
I tried to make a dungeons fixup patch to remove (most) duplicate doors. I'm sure you're all familiar with this issue.
I think it mostly happens where two dungeon modules connect, when each one provides a door; I'm not sure it can be fixed cleanly by modifying modules data; Hence loading time fixup.
I did nothing specially efficient, doors have colliders already so I'm just checking if doors collide, O(N^2) style (no space partitioning or anything). It seems fast enough with the ~ 100 doors of your average dungeon though.

Problem is, it's currently removing too many doors, and I don't get why...
https://github.com/Interkarma/daggerfal ... cate-doors

Should I only consider a subset of active doors models or something?
(Just came across DDR "double doors"... what's that?)
Last edited by pango on Sun Jan 13, 2019 2:40 am, edited 1 time in total.
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

User avatar
Interkarma
Posts: 4729
Joined: Sun Mar 22, 2015 1:51 am

Re: Fix (most) double doors

Post by Interkarma » Sat Jan 12, 2019 9:10 pm

DDR is an action door tag, examples are the large double set of doors in Wayrest court. It's probably best to call this issue something different like "duplicate doors" instead to avoid confusion.

I've been meaning to drill into this a bit more. The layout classes are just placing doors as enumerated from game data, but I'm fairly sure DFU places duplicates in cases where classic does not. This is the first thing I wanted to confirm - how the behaviours diverge.

User avatar
pango
Posts: 1334
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: Fix (most) double doors

Post by pango » Sun Jan 13, 2019 2:56 am

Interkarma wrote:
Sat Jan 12, 2019 9:10 pm
DDR is an action door tag, examples are the large double set of doors in Wayrest court. It's probably best to call this issue something different like "duplicate doors" instead to avoid confusion.
Got it!
Interkarma wrote:
Sat Jan 12, 2019 9:10 pm
I've been meaning to drill into this a bit more. The layout classes are just placing doors as enumerated from game data, but I'm fairly sure DFU places duplicates in cases where classic does not. This is the first thing I wanted to confirm - how the behaviours diverge.
Okay. I'm not sure the problem happens less often in classic, but it's hard to tell. If my memory serves, the problem happens a lot more often with some modules/regions than others, maybe because of more testing, or more experience with that issue when the dungeon modules were designed, I don't know. So one has to compare the exact same dungeons in both games to tell, something I haven't done.
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

User avatar
Interkarma
Posts: 4729
Joined: Sun Mar 22, 2015 1:51 am

Re: Fix (most) duplicate doors

Post by Interkarma » Sun Jan 13, 2019 3:20 am

One example I know for sure is the entry door to King of Worms' lair in Scourg Barrow. This only has a single door in classic but presents a duplicate door in DFU.

My hope is that classic might have some other data on the duplicate door that allows it to be filtered out. Failing that, there might be a better method than checking collisions. One idea I had was checking door transforms to ensure no two are almost on top of each other. That presents some other problems of course (inefficient, which door wins, etc.).

This is one of those items on my internal list I have pushed all the way to the end of queue close to 1.0 as a polishing task.

User avatar
King of Worms
Posts: 2064
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

Re: Fix (most) double doors

Post by King of Worms » Sun Jan 13, 2019 5:06 pm

Just a small note about the doors. I think it might be good idea if the doors always opened in the direction FROM you. Its a minor thing, but if they open towards you, it causes colisions sometimes, and also if you have casted a light, it messes up with the candle :)

User avatar
SlainByWoodborne
Posts: 67
Joined: Fri Apr 12, 2019 4:24 am

Win_x64_0.7.91: Double door in Orsinium

Post by SlainByWoodborne » Fri Apr 19, 2019 1:35 pm

I found this double door in the Orsinium. I found a thread in the dev area but thought this would be more appropriate here.

Also, I'm not sure if it's a bug or not but the area on the opposite side of this door (resembling a pyramid) has been appearing in most of the dungeons that I've explored with each character I've made with DFU. Sometimes, it's presented immediately when entering a dungeon and other times it's buried at the end of a maze of tunnels. I don't recall having ever seen it in classic but I've seen it enough in DFU to recognize and remember it.
Attachments
Double_Door_Orsinium_SAVE42.7z
(213.35 KiB) Downloaded 14 times

User avatar
SlainByWoodborne
Posts: 67
Joined: Fri Apr 12, 2019 4:24 am

Re: Win_x64_0.7.91: Double door in Orsinium

Post by SlainByWoodborne » Fri Apr 19, 2019 1:48 pm

Found another.
Attachments
Double_Door_Orsinium_02_SAVE44.7z
(213.86 KiB) Downloaded 14 times

User avatar
SlainByWoodborne
Posts: 67
Joined: Fri Apr 12, 2019 4:24 am

Re: Win_x64_0.7.91: Double door in Orsinium

Post by SlainByWoodborne » Fri Apr 19, 2019 1:52 pm

And another.
Attachments
Double_Door_Orsinium_03_SAVE46.7z
(215.54 KiB) Downloaded 14 times

User avatar
SlainByWoodborne
Posts: 67
Joined: Fri Apr 12, 2019 4:24 am

Re: Win_x64_0.7.91: Double door in Orsinium

Post by SlainByWoodborne » Fri Apr 19, 2019 1:55 pm

Number 4.
Attachments
Double_Door_Orsinium_04_SAVE47.7z
(206.41 KiB) Downloaded 14 times

User avatar
pango
Posts: 1334
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: Win_x64_0.7.91: Double door in Orsinium

Post by pango » Fri Apr 19, 2019 2:00 pm

There's a discussion about this issue here: viewtopic.php?f=23&t=1719
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

Post Reply