What Do PolyObjects Block?

Ask about mapping, UDMF, using DoomBuilder/editor of choice, etc, here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
User avatar
Enjay
 
 
Posts: 26403
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

What Do PolyObjects Block?

Post by Enjay »

Strange question, I know, and I've tried to figure it out but my results are inconclusive.

I'm just talking about "normal" PolyObjects - 1-sided walls with a void behind them that are moved to a PolyObject start spot when the map starts.

I know, obviously, that the PolyObject creates an impassible obstacle wherever it is placed. But what else does it block? i.e. if it is completely filling a doorway, how much information gets through that doorway before the PolyObject is moved out of the way?

Do PolyObjects, for example, block sound like a closed door would (or are sound blocking lines essential to block sound here)? What about monster sight? What about anything else that I might not have though of? (I don't think reverb environments are blocked.)
User avatar
nova++
Posts: 177
Joined: Sat Sep 04, 2021 3:13 am
Operating System: Other Linux 64-bit

Re: What Do PolyObjects Block?

Post by nova++ »

Sounds worth making a test map to try out, really. And making sure to write it down on the wiki after!
User avatar
Enjay
 
 
Posts: 26403
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: What Do PolyObjects Block?

Post by Enjay »

That's actually what I've been trying to do - hence the "my results are inconclusive". ;)

I think it's like this, but I'm really not sure:

Obviously movement is blocked.
I *think* monster sight probably is.
I don't *think* sound is blocked - this is the one that I am least sure about.
Pretty sure reverbs are not.

There maybe something else that I have forgotten.
User avatar
Enjay
 
 
Posts: 26403
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: What Do PolyObjects Block?

Post by Enjay »

OK, update. I'm now 99% certain that what I thought is correct:

They block movement (obviously).
They block monster sight.
They do not block sound.
They do not block reverb environments.

So the only thing above that is different to a regular door is the sound blocking. A closed regular door blocks sound, a closed PolyObject does not. So, if you want a PolyObject to block sound, you have to flag the lines either side of it as sound blocking. It needs to be on both sides because sound blocking lines work in pairs.

This does mean, however, that it would be possible to open a PolyObject door, step back and blast any bad guys you see without waking any other enemies in the next room who cannot actually see you - unless you script to remove the sound blocking flag when the poly opens (probably more effort than it's worth most of the time). So this does mean that opening a poly door can have a different game impact compared to a regular door.


Another interesting thing that I noticed with PolyObjects is what is needed to get a monster to activate them. I'm going to guess that this is intentional but I suppose it could even be a bug. With many line types, if you set it to be a player-use type and then also set the "monster activates" flag, that's usually enough. It certainly works with regular doors. Monsters can open the door just like a player can. Not so with PolyObjects it would seem.

If you want a monster to be able to walk up to a PolyObject door and open it, then you need to explicitly set the "Monster Bumps" activation type as well as player-use. Monster-use does not work and, like I said, the monster activates flag doesn't either.
User avatar
Sir Robin
Posts: 392
Joined: Wed Dec 22, 2021 7:02 pm
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: Intel (Modern GZDoom)
Location: Medellin, Colombia

Re: What Do PolyObjects Block?

Post by Sir Robin »

Just a while back I was also looking into poly objects as swinging/sliding doors. I was seeing the same issues you're concerned with. Another one was that the polyobjects don't block the automap from mapping through them. To solve these issues, I'm thinking of writing some kind of polyobject door handler, then where ever there is a poly door also put a slightly thinner sector inside it, so when the door is closed that sector closes and will block everything that a normal door would.

I haven't started working on that, it's back-burner while I'm working on other things, but that's what I plan to circle back to, unless I find some better way to handle it.
User avatar
Enjay
 
 
Posts: 26403
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: What Do PolyObjects Block?

Post by Enjay »

Sir Robin wrote:Another one was that the polyobjects don't block the automap from mapping through them.
That's interesting, but I just checked a few of my maps and I'm not getting that problem.
Spoiler:
All of the PolyObjects I tested are the simple type that I described - single-sided lines with void behind them. They are all sliding doors that fill the doorway entirely. Looking at the automap while facing them, nothing beyond is shown until I open the door - that's when stuff starts appearing.

I remember that you were experimenting with doors that have unusual heights and configurations. Perhaps that is a factor?

I have used the hiden-sector-inside-the-poly trick in one place though. This was for a door in a 3D building where the player needed to be able to shoot projectiles over the roof of the building at a flying enemy beyond. So I made the PolyObject out of explicit 2S lines. As far as appearance goes, it looked just like a regular PolyObject door but whatever blocking capabilities I gave the lines extended to the fill height of them map (unless it was the walkable mid-tex flag, but that allowed me to shoot through the door). So I used a hidden sector inside the PolyObject that lowers instantly just before the PolyObject starts to move.
User avatar
Sir Robin
Posts: 392
Joined: Wed Dec 22, 2021 7:02 pm
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: Intel (Modern GZDoom)
Location: Medellin, Colombia

Re: What Do PolyObjects Block?

Post by Sir Robin »

Enjay wrote:I remember that you were experimenting with doors that have unusual heights and configurations. Perhaps that is a factor?
Ah, yes, I remember now. When I was asking questions about polyobjects I was getting conflicting and confusing answers. It turns out there are at least 3 ways to define a polyobject, and each one results in an object that behaves slightly differently.

Here's a test map to demonstrate:
test_polyobj_doors.wad
User avatar
Enjay
 
 
Posts: 26403
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: What Do PolyObjects Block?

Post by Enjay »

Useful little test map. Thank you.
User avatar
Enjay
 
 
Posts: 26403
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: What Do PolyObjects Block?

Post by Enjay »

I discovered another little PolyObject oddity today that I wasn't previously aware of.

I had an area in a map where the play sectors are at quite a low value (floor at something like -800 units). I put a PolyObject in this area and although I put the initial containing sector quite near to where the door appears, I accidentally left it at the "normal" height with a floor value of 0. So the containing sector was several hundred units higher than the play sector.

I hadn't spotted that I had done this but the effect resulting from it was that the PolyObject was noticeably quieter in game than other doors/PolyObjects. It was driving me nuts because I couldn't figure out why it was so quiet. Then I noticed the sector heights and changed the containing sector to be the same values as the destination sector and the PolyObject became equally as loud as the other ones I'd made.


For what it's worth, it's also my impression that attenuation for PolyObject sounds is more severe than it is for regular moving sectors. PolyObjects seem to get quieter more quickly, as you move away from them, than normal doors using the same same sounds. You really don't have to be too far from a PolyObject for you not to be able to hear it as it moves when, at the same distance, you would hear a regular door. No idea if this is intended or not, and it hasn't caused me any problems, but it is something that seems to be the case.
User avatar
Sir Robin
Posts: 392
Joined: Wed Dec 22, 2021 7:02 pm
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: Intel (Modern GZDoom)
Location: Medellin, Colombia

Re: What Do PolyObjects Block?

Post by Sir Robin »

I also found an oddity with non-void poly-object in sectors with 3d floors. They make it so that hit scans pass through the floors. So monsters can see and shoot though the floors, and you can shoot back.

Documented here
User avatar
Enjay
 
 
Posts: 26403
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: What Do PolyObjects Block?

Post by Enjay »

Supplementary related question: How effective is a polyobject at blocking sight for game speed calculations?

Sorry, not sure how to word it. What I mean is, we all know that the Doom engine doesn't handle wide open areas with lots of 2S lines very well. So, splitting things up into smaller "rooms" to reduce the possibility of having a long line of sight across such an area can help. Normally this is done by single sided lines with void behind them. So, my question is, how effective would a polyobject be at doing this if it filled a gap between two large open areas. Would it be as effective as making the areas entirely separate using 1S lines, as ineffective as just connecting the two areas with no sight restriction, or something else?

Return to “Mapping”