Rooms over Rooms

By Lee Killough

Note: As part of the Boom engine, I added a totally silent, delay-free, position-preserving, angle-preserving, momentum-preserving teleporter which can emulate this room-over-room effect perfectly now, except for the fact that monsters and other mutable things can still only be in only one of the two "worlds" at a time.

This document describes a combination teleporter/lift special effect for Doom, which simulates rooms over rooms.

The map looks like this:


         -----------------------------------------
        |                    |                    |
        |                                         |
        |               2nd Floor                 |
        |    Sector #1: floor=128, ceiling=256    |
        |-                                       -|
        |                                         |
        |                    |                    |
         -----------------------------------------
        |      WR Plat DownWaitUpStay (Tag=1)     |
        |                                         |
        |                                         |   \
        |                    |                    |    \
         -----------------------------------------      \
        |           WR Teleport (Tag=2)           |      \
        |__                                     __|   ____\   All part of
        |         teleporter * destination        |       /   Sector # 2:
        |                    |                    |      /
         -----------------------------------------      /     Floor=128    
        |           WR Teleport (Tag=2)           |    /      Ceiling=256
        |                                         |   /       Sector Tag=1
        |                                         |
        |                    |                    |
         -----------------------------------------



                        (null space)



         -----------------------------------------
        |                    |                    |
        |                   __      Sector #3     |
        |  * tele. dest.>  | *|  <- Floor=0 Tag=2 |
        | Invisible sector>|__|     Ceiling=256   |
        |                                         |  \
        |           WR Teleport (Tag=1)           |   \
         -----------------------------------------     \
        |                    |                    |     \    (!!! ALSO !!!)
        |                                         |  ____\   All part of
        |                                         |      /   Sector # 2:
        |           WR Teleport (Tag=1)           |     /
         -----------------------------------------     /     Floor=128    
        |                    |                    |   /      Ceiling=256
        |                                         |  /       Sector Tag=1
        |                                         |
        |    SR Plat DownWaitUpStay (Tag=1)       |
        |-----------------------------------------|
        |                    |                    |
        |                                         |
        |                                         |
        |                1st Floor                |
        |     Sector #0: Floor=0, Ceiling=128     |
        |-                                       -|
        |                                         |
        |                                         |
        |                    |                    |
         -----------------------------------------

Some important notes:

The tiny sector in the first floor's lift has sector #3 referenced on both sides of its lines, to make it invisible (same as deep water effect).

This special effect uses the same sector for the elevator in both rooms.

This is important for two reasons:

  1. It ensures that the platform is exactly synchronized in both rooms.
  2. It correctly simulates sound travel between the rooms when the elevator is down (try shooting at the trooper, while the elevator is down, in the demo wad I've included).
Unfortunately, this causes a problem, too: How can we teleport in both directions if only one sector tag is available per sector and we have the same sector in both places?

The solution is to use a special effect I discovered, both while working on Street.wad (the toilets) and Melee.wad (MAP09, room with columns full of items):

Whenever a Thing is inside of a sector too small to contain it, and that sector is at a lower height than the surrounding one, even if the inner sector is totally invisible (by the deep water special effect), that:

The Thing is automatically lifted to the surrounding sector's floor height, as if by an instant lift, as soon as there is any floor motion in either sector. Furthermore, if there are two such Things stacked on top of each other, then under certain conditions (which I have not been able to fully determine), then the Things will float to the top ONE AT A TIME. Flush Street.wad's toilets to catch a scent of this effect <grin>.

So, since the lift is almost certainly going to be moving while the player or monsters are teleporting, we can be almost sure that they will immediately "float up" as soon as they are teleported into the tiny sector on the first floor's lift. They teleport into that small square which is too small to contain them [but is hidden by the deep water effect and is always at ground level (floor=0)]. Since the lift is moving, they immediately "float up" to the much larger surrounding lift, which always has a floor height at or above ground level.

Also notice that the two lifts are placed side-by-side on the map. This is similar to "unfolding" the 3-d virtual reality we are trying to create, onto the 2-d reality of Doom, with the lift being the invariant, or focal line. The reason this is important is the way that monsters behave in Doom. Doom monsters travel in 2-d towards the player -- I'm sure you've noticed that monsters, save perhaps the smarter Baron on occasion, will often be trapped in a room not chasing after a player, simply because the straight line betwen the monsters and the player leads to a barrier. So the monsters simply stand around walking in circles. Putting the lifts next to each other makes it so that monsters are trained to go after the player on the floor 'below'. It also makes it so that the player can hear what's going on on the adjacent floor, since 2-d distance is what determines player hearing in Doom. See the demo for examples.

Known problems:

  1. There remains the paradox that lifeless material that lands on the lift in the first floor is not the same as on the second floor. You can kill a monster in the lift, but its body will only be seen from the same floor you killed it on. Not much can be done about this one -- monster- blocking linedefs could prevent monsters from entering the lift, but then they could never use it.
  2. Sometimes the player can be trapped in the tiny sector, if they teleport to the first floor after all motion has ceased and there are no other players or monsters to reactivate the lift. The only way I can see out of this dilemma is perhaps to make the lift a continuously moving one -- I had tried making it so that it would be continuously moving as long as someone was inside it, but all sorts of problems with unintended linedef triggerings came up. We could make it really continuous, but then it would be noisy.
  3. Floating monsters (Cacodemon, Lost Soul, Pain Elemental) sometimes disappear and reappear inside the lift while using it. If it weren't total disappearance, but simply a different kind of motion, then I would be more inclined to accept it, because, after all -- do these monsters really need to stand on a lift?!!!
Okay, enough details!!!

Here's the wad, which is very tiny. I included DEUSF, since you need to merge the sprites or else you'll get a SpriteColumn error as soon as the lift is used. Simply type:

deusf -append teleport.wad -doom \doom2dir
with \doom2dir replaced with whatever the true location of your Doom 2 directory is (no need to use -doom if you have DOOMWADDIR set in your AUTOEXEC.BAT file).

Enjoy the teleporter.