Fix (most) duplicate doors

Discuss coding questions, pull requests, and implementation details.
Post Reply
User avatar
pango
Posts: 799
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: 4020
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: 799
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: 4020
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: 1184
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow
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 :)

Post Reply