Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
EarthQuake

The truth about sound-blocking linedefs.

Recommended Posts

I think there has always been some confusion here as to what this linedef flag does. So here am I with my own insignificant self-discovery, in order to bring attention to those who don't know exactly how they work.

http://www.speedyshare.com/files/26876585/sound.wad

In the example, you'll notice there are three areas, each with two sound-blocking linedefs between the area the player is in, and the areas the monsters are in. All the experienced mappers will say "sound is blocked when two of these linedefs are encountered". This is false.

Sound travels sector by sector. When sound reaches a new sector, it checks to see if there are linedefs separating them that are marked to block sound. If so, it keeps going until it reaches a second sector with the same condition. This might not be technically correct, but it's good enough for people who don't care about the specifics.

In the example wad, only the first area will successfully block sound.

So in short, the sound-blocking flags must be used on linedefs where each sidedef references a different sector. Otherwise they serve no purpose.

Oh, and the answer to the common question "why two?", here is the answer: it's more flexible that way. Play the following wad 3 times. Each time stand on a different blue square and shoot, then take note of which monsters wake up.

http://www.speedyshare.com/files/26876685/sound2.wad

That is all.

Share this post


Link to post

Possibly based on someones explanation, but I've always seen Doom's sound handling this way (sector-based).

Kind of like the reject map - maybe doom uses it for sound as well I'm not sure. When a sound is made it travels through each adjoining sector and each sector it travels to is given a number starting at 2. When a sector cannot be reached without crossing a linedef marked 'block sound' the number given to a newly encountered sector drops to 1 and then eventually to 0 when the same situation occurs. sectors with a resulting 0 are still considered 'deaf' and those with 1 or 2 then activate monsters if they are not flagged at the thing level as 'deaf' themselves. You also need to picture the process like multiple threads each carrying its own sound value as it traverses the maps sectors. Some might stay 2 for a lot longer than others etc.

I think that has sufficiently taken your neat explanation and complicated it somewhat yeh? ;o)

The 'fun' part is when you get a lot of sectors with separated sections across the map and trying to keep things in check. In some of my recent maps, where block sounds got a bit difficult to use I resorted to put in thin 32unit deep channels that would restrict monster movement until I was happy to let them pass by activating an insta-raise.

Travers

Share this post


Link to post

I've always seen Doom's sound handling this way (sector-based)

Me too. I guess that's because I don't even know how to create a new line without separating the sector into two. :)

Share this post


Link to post

If sound weren't sector based, and did just somehow travel along and over linedefs, you wouldn't be able to make a monster teleporter holding area without putting in a sound tunnel to wake the monsters up. As it is, you can simply split a sector into disjoint sections, and every monster in every piece hears the sound and wakes up, because they're all in the same sector.

Share this post


Link to post
boris said:

That tunnel technique is even used in Doom 2 map 13.

And MAP01 of course.

An option in the map editor to show sound blocking lines as red (for example) while normal lines stay white could be very handy, you could create distinct areas by adding the flag to all the bording linedefs (one-sided ones too) and see if there were any holes.

A mode which shows the sound levels, i.e. you move the mouse in a sector and all "2" sectors are highlighted with say yellow and all "1" sectors are highlighted in say green -- that would be very useful too I imagine.

Share this post


Link to post
boris said:

I think that could be done relatively easy with a plugin for DB2.


Every so often when mapping I wish someone could make this because of how hard it is to tell which lines I marked block sound 3 months ago on a map I 'finished' two days after I marked them.

Share this post


Link to post

I actually used this thing in my pitfalls.wad on purpose. A room with several row of windows, everyone has a 2 block sound lindefs, so you will not worry until you shoot one from the window.

Share this post


Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×