This text will constantly make references to the example WAD: spcial1b.zip (53K). The spcial1b.zip is a zipped file, and can be unzipped on a PC using Pkzip 2.04G (Binary).. I suggest you start by reading the contents, which follow below. Here you can jump directly to the special effect that interests you. If you need to read one of the other sections first, there will be a reference in the start of the section.
The first time I saw this special effect demonstrated was in swimpool.zip (2K) by Robert Fenske Jr. (rfenske@swri.edu), where the effect is demonstrated convincingly in a single room. The effect was first described by Mathew J Ledding-Hill, and it was later improved by Robert Fenske Jr. The discovery of the deep water effect has lead to all kinds of other special effects, as we shall see later.
This is one of the effects, that will give errors from any consistency checkers, so if you don't want to see any errors from your editors consistency checker, don't try to build this special effect. To build this special effect, you need an editor that lets you change the sector references in a sidedef. Some editors won't allow this, and are useless for this purpose. If you don't already know an editor that can change the sidedef references, I suggest you look around and try a few more editors. You might even learn an important lesson by doing this: No editor can currently claim to be the best at all things. One editor might be good at creating sectors, but doesn't allow you to set the 2s flags for yourself, while another has a great THING editor, but don't work too well with new graphics. Do what I do: Shift a lot between editors, and find the best editor for the task at hand.
If you create a sector inside another sector, where the internal sectors sidedefs ONLY has sector references to the internal sector, then the floor texture will be painted in the floor height of the external sector, while the player will walk around in the floor height of the internal sector.
To give an example, create the following map:
Now set the floor texture of sector 1 to F_WATER, set the floor height of sector 1 to 0, and set the floor height of sector 2 to be -40. This gives the impression of walking around in a pool of water. You can also set the floor height of sector 2 to be 70, and you will feel like flying. (Remember to make the ceiling high enough, so that a player can walk around in the height of 70). Also be careful when setting a height below -40 (relative to the floor), as you will get a HOM effect if the player get his head under water.
This first example is great fun, but it doesn't really lead anywhere, as it's difficult to take the step of 40 units to get out of the deep water. To be able to both enter and leave the deep water, you will need to create sectors within sectors in different heights, so that they form a descending stair into the pool. This is very easy to construct:
This resembles the WAD: swimpool.zip (2K)
created by Robert Fenske Jr. Here you can assign a floor height of 0 for sector
1, while sectors 2 and 3 get a floor height of -24 and -48 respectively.
This will make the water quite deep, while it's still possible to
climb out of it.
2. Deep Water Tunnel
The problem is that you don't want the ceiling to be painted in the same height. The idea of the tunnel is to make the ceiling height vary while the player is submerged in the water. As the self referencing inner sector makes it impossible to change the ceiling height, a different approach is necessary. This other approach is actually the second best solution, as it doesn't give the illusion of walking in deep water quite as well as in the method above. The way to do it is this:
Here the sectors 1, 4, 8 and 10 are all part of one and the same room, and they all have the same ceiling height. (Not necessary for the effect to work). The sectors 3, 5, 9 and 11 make up the room on the other side of the tunnel. The sectors 2, 6 and 7 make up the actual tunnel, and they have a much lower ceiling height than the other sectors. The sectors 8, 9, 10 and 11 has the normal floor height, and uses a normal floor texture. The sectors 4, 5, 6 and 7 has a slightly lower floor than the normal floor height. Apply a water floor texture (or maybe some other slimy thing) to these sectors. The sectors 1, 2 and 3 has the same floor texture, and the floor height is 24 units lower than the surrounding sectors. Do not apply any lower textures around the sectors 1, 2 and 3. As a result you should have a tunnel between two rooms where the player has to walk in the deep water between them.
The deep water tunnel effect can be seen in trinity2.zip
(310K) by Steve McCrea (sm@eng.cam.ac.uk), Simon Wall and Elias
Papavassilopoulos. Simply turn
right in the main courtyard, enter the chapel with all the imps, and
activate the altar.
3. Deeper Water
Only here you should imagine there is a floor everywhere around the
three sectors (Just call me lazy for not drawing a separate image)
The three sectors 1, 2 and three should make up the pool. Make sector
2 and 3 really deep, so that there is no chance the player is going to
see the floor of these sectors. It's also a good idea to make sector 2
and 3 very thin. At least sector 3 should be quite thin while sector 2
can be made quite large, if you want the player to walk around on top
of the water a little while before he falls into sector 1 (The hole).
Set sector 1 and 3 to have really low floor heights like 400 units
below the floor height of sector 2, and apply the
same floor texture to them (Not necessarily water). Sector 2 should
have a floor height slightly lower than the surrounding room (8 to 16
units), and some kind of water texture should be applied to this
sector. So far everything sounds really easy. The trick is this:
Don't apply any lower textures on any line bordering sector 2.
When viewed from above DOOM will try to paint the water texture in
sector 2 all over the lower texture part, and viewed at the button of
the hole sector 2 becomes transparent, so you can see the walls of
sector 3.
4. Invisible Stairs
If you create a sector inside another sector, where the internal sectors sidedefs ONLY has sector references to the internal sector, then the floor texture will be painted in the floor height of the external sector, while the player will walk around in the floor height of the internal sector.
This general rule implies that it's possible to create an invisible stair like this:
Invisible rising stair
Now that you've created an invisible stair, you might want to go on
and create an invisible rising stair. This is a bit difficult, but
not impossible. I'll explain how to do it by extending on the stair
that you already created . To have the stair
start in the lower position set the floor heights of sectors 2, 4, 6
and 8 to zero. Now for a rising stair to work, the sectors need to be
neighbours, but none of the sectors 2, 4, 6 or 8 are neighbours to other
sectors than themselves, so we'll need to do some kind of trick to get
it to work. The trick is this: create new neighbouring sectors that
form a stair, and edit the sidedef sector references so that these new
sectors get the same numbers: 2, 4, 6 and 8. Since sector 2, 4, 6 and
8 are neighbours now we can make the rising stair work just like a
normal rising stair.
One word of advise though: The linedef number of the new sector created should be smaller than any of the linedefs in the original sector. This can be hard to accomplish with most editors, so I advise you to build the dummy sectors 2, 4, 6 and 8 before the invisible stair itself.
If you forgot to build the dummy sectors first, I can give you the following DEU trick: Split old lines in two, and one of the parts will get a new line number (higher than any other line number) normally the "front" part will get the new number:
before: split: drag: ^ ^ | | <- New line number. | | | x <- drag this vertex | | | | x x <- to this vertex, and merge the two vertices.
When you've completed the new sectors, your invisible stairs should look like this:
Now you can make a linedef somewhere to activate the raising stair, and make it point to sector 2. The invisible raising stair is demonstrated in spcial1b.zip (73K) just behind the first invisible stair. If you let yourself drop down behind the first invisible stair, you will find it impossible to get back before you press the button, which triggers the invisible rising stair.
Note however that the invisible stair is not entirely invisible. I've
put a small texture on one of the steps, so you can see it
raise...
Only the normal texture on the special inner sector is shown, so to
create a texture that sticks to the invisible raised floor like here,
I've used the "lower unpegged" flag.
Remember to put the dummy sectors close to the raising stair, as the sound propagates from the dummy sectors, and NOT from the special sectors inside the steps of the stair. (Actually I think the sound is generated by the lowest numbered linedef, which we put in the dummy sector). This could of course be used to generate a "Silent Invisible Raising Stair", but that might not be much fun.
5. Invisible Lift
To create the lift you need to create dummy sectors again. Otherwise the special self-referencing sector will not be able to determine how low it should go. Remember to create the dummy sector first, so the linedefs here get the lowest numbers. The lift should look like this:
Assign a floor height of 0 to the sectors 1, 3 and 4, while the sectors 2 and 5 get a higher floor height like 64. Then make the linedef between sector 4 and 1 a switch activated lift, and make the sector reference point to sector 2. Now make the linedef between sector 5 and 1 trigger when the player walks over it, and the sector reference should again point to sector 2.
That's all. Now your invisible lift should be working. The dummy
sector 3 determines how low the lift will go, and the linedefs
neighbouring sector 1 are set up to activate sector 2 as a lift, which
controls the floor height.
6. Non-convex Invisible Areas
An example of a non-convex sector where you still can walk around in the air is given in the east part of spcial1b.zip (73K). Here I've enlarged the inner sector to almost fill the outside sector entirely. The following figure might clarify what I mean:
This ensures that all sub sectors are either inside the special
sector, or is at least a neighbour to it. Now we have covered a lot
about invisible floors. lets look at a different special effect:
7. Transparent Door
The same effect can also be viewed in the north part of spcial1b.zip (73K), where I've used the standard DOOM 1 open door linedef. The effect is better if you use the blasting doors now available in version 1.666 and higher. As you can see in special.wad, there is a considerable amount of HOM when the door is opened and closed. This looks much better when the blasting doors are used.
You might think that the transparent doors could be built much like the floor special effects we have seen so far, but since the DOOM engine treats sectors with the same ceiling and floor height in a special way this won't work. Instead another method has to be used.
In June of 1994, Alberto Barsella (alberto@astrpi.difi.unipi.it) reported to the DOOM editing mailing list that he had found a way to create transparent doors. His method was more cumbersome than the method shown below, but nevertheless paved the way to using this feature in new WADs.
As shown in the figure above, you must start with a three-region section of a level. You can start with a normal door sector and modify it appropriately. I will refer to the area bounded by LINEDEFS L3, L8, L4, and L7 as the door area. The six LINEDEFs labelled L1 through L6 are usual one-sided LINEDEFs. The two LINEDEFs L7 and L8 are two-sided ones that will constitute the actual door look. Sectors 1 and 4 are normally created sectors (and could be the same sector - see the note below). However, there are two sectors inside the door area, 2 and 3. The crucial aspects of a transparent door are all contained in LINEDEFs L7 and L8; the ordering of LINEDEFS L3, L4, L7, and L8; and sector 2.
The table below details the specific requirements for each LINEDEF and sector:
LINEDEF/SECTOR Description L1 one-sided wall, normal texture L2 one-sided wall, normal texture L3 one-sided wall, normal texture L4 one-sided wall, normal texture L5 one-sided wall, normal texture L6 one-sided wall, normal texture L7 two-sided wall no upper texture, one-patch transparent normal texture with Y offset equal to height of texture optional lower texture, second SIDEDEF references sector 2 L8 two-sided wall, no upper texture, one-patch transparent normal texture with Y offset equal to height of texture optional lower texture, second SIDEDEF references sector 2 1 floor height F, ceiling height C 2 floor height F+1, ceiling height F+1 3 floor height F, ceiling height C-1 4 floor height F, ceiling height CThe most crucial requirement is not in the above table. This requirement is that the LINEDEFs L7 and L8 MUST have a higher index number than any other linedefs in the surrounding sectors. If you follow this rule you should not get any HOM inside the door if you use the DMapEdit nodebuilder or WARM with the -n=a option.
This ordering is required because the DOOM engine uses the lowest-numbered SEG in a SSECTOR (subsector) to determine which SECTOR to use to draw the SSECTOR. Technically, at least one of the SEGS derived from LINEDEFS L3 and L4 must be the lowest-numbered SEG of the SSECTOR created from the door region (or lowest-numbered SEG for each of the SSECTORs created if the region is split in any way or the region is non-convex to start with). In principle, having LINEDEFs L3 and L4 with lower indices than L7 and L8 could not guarantee the correct SEGs generation. But as a practical matter all the node builders I am aware of preserve the SEGs ordering and any extra SEGs created during the node generation are attached to the end of the SEGs list (and thus will never have lower indices than the SEGs originally derived from L3 and L4).
Though the lower unpegged ("Lo") bit of LINEDEFs L3 and L4 are typically set for a normal door, this bit is irrelevant for movement for a transparent door as the sector associated with these LINEDEFs never moves. It's only use would be to anchor to the bottom the particular textures on these LINEDEFs. Do not make the transparent door wide enough so that a player can be fully inside the door when it closes. If this happens, the player has no way to get the door to open because the player will now be facing the left side of the LINEDEFs that are the door (L7 and L8) and consequently the door will not be activated. However, switches could be placed on LINEDEFs L3 and L4 to open the door.
note: IF you create the door so that it has the same sector on both sides of the door, you should be aware that this means that sounds will pass through the door and might wake monsters on the other side. Maybe this is exactly what you want, and using this you can create doors that let sounds pass. (You can make sound propagate to any part of your WAD this way)
The sectors 1 and 2 are the two rooms you want to join by a transparent door and sector 3 is a hallway joining these rooms.
If your editor doesn't allow you to split a sector you will not be able to get the desired effect using this step by step instruction.
normal tex: MIDGRATE (Or some other transparent texture) upper tex: - lower tex: - X offset: 0 Y offset 128 (Or the height of the transparent texture)
The sectors 1, 3, 4 and 5 should have floor height 0, while sector 2 (the door) has both floor and ceiling height 1. No textures should be applied to the linedefs between the sectors 3, 4 and 2, while the transparent door texture can be applied to the lines between the sectors 1, 5 and 2.
Obviously this closed sector arrangement has 4 more lines in it than
the previous transparent door effect and you will get the HOM effect
when you open the door,
so maybe you should forget about this ;)
8. Solid Window
The solid window effect is a window that the player can see through, but can't shoot through. Now that you've seen how to construct the transparent door special effect, it should be easy to make a solid window. You just omit the linedefs that opens the door, and place the "stuck" door inside the window.