My complicated issue with doors

Tue Jan 11, 2022 10:36 pm

EDIT for clarity:
What I'm trying to do is create a swinging door that is 32 wide, and has a door frame of 16 on either side. So the total width of the door when closed is 64. When open, the door and the frame should be non-blocking for movement, but still block sound and projectiles and monster line-of-sight and everything else. When closed, the door and frame should block movement, and also block the automap from seeing the other side.

---- orignal post below ---
I'm working on converting maps from another game (Ultima Underworld) to UDMF. One of the things I'm struggling to design is the doors. In UW, a swinging door exists in a space that is 64x64 and 64 or more high. The door itself is only 32 wide, so there is a 16 wide door frame on either side, and also above the door going to the ceiling. Doomguy can't fit through a 32-wide space, so that's a problem. It was suggested that I can change the width of the player class and monsters and whatever else I want to get through that door. That's one approach, but for now I'm trying to replicate the way the doors in UW worked - The doors and frames would simply go non-blocking as soon as they open. So it didn't have to deal with collisions with the door or the frame, everything could just pass through.
So I'm starting with the frame, trying to find a good way to make a non-blocking frame. I tried making a normal frame with one-sided lines and void, then clearing the impassible flag and even setting the double-sided flag, but still I can't walk through them. Not sure why not.
Next I tried using mid textures with most of the linedef blocking turned on. That works, but 2-sided mid-textures can't take decals, so that's a drawback.
Next I tried using 3d floors. They can take decals and I didn't find any other issues with them.
One issue is that the automap can see through both of them. If you're standing in front of either of these frames and a poly object door, the automap draws stuff on the other side, even if you haven't opened it yet. So I get the idea to have a small sector inside the door and the frame, closed when the door is closed, and insta-opens before the door opens. this will block the automap and also blocks sound which the mid-textures and 3d-floors don't seem to do on their own. This is going to take a script to open the door, but I'm sure I can figure that out.
So my first question is - Is this the best way to do it? Is there any other way I haven't considered?

Next thing to do is get a door in there. Would Poly object be best or a real 3d object? Can either of those be made non-blocking by script and blocking again when they close?

Any other ideas?

I'm including a map to demonstrate the door frame ideas.

https://drive.google.com/file/d/1WtQ2SA-QZfuOy8zMTX6d64Rw23OLMuh6/view?usp=sharing
Last edited by Sir Robin on Wed Jan 12, 2022 6:58 am, edited 1 time in total.

Re: My complicated issue with doors

Wed Jan 12, 2022 1:06 am

Polyobjects are answer if you want swinging doors. No, due to the nature of gzdoom, there is no other way of doing swinging doors.

The acs solution is just dirty hack destined to fail. Please, don't use such hacks, as it would break gameplay in the future.

Just accept the fact that many things are still limited due to gzdoom's nature. Like swinging doors. Limited, but doable.

Re: My complicated issue with doors

Wed Jan 12, 2022 6:51 am

So you're saying that polyobjs are the way to do the swinging doors, and not a 3d model, correct? And how do I set them to non-blocking? And how do I block the automap?

Re: My complicated issue with doors

Wed Jan 12, 2022 8:27 am

Is the information in this thread of use to you? viewtopic.php?f=105&t=69999

Re: My complicated issue with doors

Wed Jan 12, 2022 10:05 am

Enjay - Yes! That looks super useful. I'll dive into that when I get more time. Thanks for posting!

Re: My complicated issue with doors

Wed Jan 12, 2022 11:11 am

For what it's worth, 3D models can be used for a door's visual appearance, they just aren't good for actually behaving like we expect doors in Doom to do, so some trickery is needed.

Nash used a technique where the door model sits on a line set to block sight, sound, and movement. When the player uses the door, a script sets the line to unblock everything, pushes the player backwards a little, and swings the door model open. The doorframes are actors to prevent the player from shooting or walking through when the door is open

Has limitations, but when used in the proper setting, it works pretty well.



Unfortunately I can't share the map as this is an unreleased beta project, but I wanted to show that the OP's idea is theoretically viable without the use of polyobjects (which have their own quirks)

8-)

Re: My complicated issue with doors

Wed Jan 12, 2022 7:54 pm

Caligari87 wrote:For what it's worth, 3D models can be used for a door's visual appearance, they just aren't good for actually behaving like we expect doors in Doom to do, so some trickery is needed.

Yeah that's fine, that's kinda what I was thinking I'd have to do anyway. Use a polyobject or 3d model for a visual of a door, but do other stuff behind the scenes to get the actual functionality.

Caligari87 wrote:Nash used a technique where the door model sits on a line set to block sight, sound, and movement. When the player uses the door, a script sets the line to unblock everything, pushes the player backwards a little, and swings the door model open. The doorframes are actors to prevent the player from shooting or walking through when the door is open

Has limitations, but when used in the proper setting, it works pretty well.

I thought about doing something like that, but I also want to block the automap from seeing past the door when it is closed. So my idea is actually to make a sector inside the door, slightly thinner, have it insta-close when the door closes and then insta-open when the door begins to open, so the player never actually sees that working sector. that sector being closed across the doorframe would automatically block sound and monster sights and automap, so I wouldn't even have to mess with the linedefs. See my example, door #4. It's not scripted but the pieces are there. the bloodfall sector would not be seen by the player. The other thing is that I want the door frame to also become non-blocking when the door is open. I can put another working sector inside those, I just need to know what is the best structure to build the visual door frame. Mid-textures are out since they don't take decals. So should it be a 3d floor or poly object or 3d model or something else? That's what this thread was trying to ask.

Caligari87 wrote:Unfortunately I can't share the map as this is an unreleased beta project, but I wanted to show that the OP's idea is theoretically viable without the use of polyobjects (which have their own quirks)

8-)

I tried to PM him but he has it disabled on this forum. I understand the map is still private but does he have a tutorial out or anything that shows these techniques?