Deep Water

By Richard Clark

Deep Water with Colored Lighting
Figure 1: Deep Water with Colored Lighting (Not a Color Map)

One of the great features of Boom was the deep water effect. By using a control sector, the player could be immersed in water, slime or lava. Boom also had the ability to use a color map so that colored lighting could be used to enhance the illusion. In ZDoom 1.17c, this functionality has been extended so that the lighting in the control sector, wil be the lighting in the deep water sector as illustrated in Figure 1. The demo wad deepwtr.wad illustrates the use of the deep water effect.

Map Layout
Figure 2: Map Layout

Figure 2 illustrates the map layout in WadAuthor. The deep water sector has a floor of -64 so that the player will be immersed in the water. The floor is the FWATER texture so that while the player is above the deep water, the water texture is drawn on the floor at the control sector's floor level. The control sector has a floor of -16 so this is where the water texture is drawn.

The control sector's floor texture is FLOOR4_8 and this will be drawn at the deep water sector's floor height of -64 when the player is in the deep water. The ceiling texture of the control sector is FWATER, and this will be drawn on the ceiling when the player is under the deep water. This can be a little confusing so Table 1 delineates which texture is drawn in and out of the deep water.

Above Deep Water Floor is drawn at control sector height with deep water sector texture. Ceiling is drawn with deep water sector ceiling. Lighting is deep water sector lighting.
In Deep Water Floor is drawn at deep water sector height with control sector floor texture. Ceiling is drawn at control sector floor height with control sector ceiling texture. Lighting is control sector lighting.

To set the light of the deep water just use the Sector_SetColor special. The demo wad uses the following open script to set the control sector light to a dark blue.

script 1 OPEN
    // Deep blue. Control sector has a sector tag of 2.
    Sector_SetColor (2, 0, 0, 203);

Use the Transfer Heights special to activate the deep water as illustrated in Figure 3.

Transfer Heights
Figure 3: Transfer Heights

The Transfer Heights special only takes one parameter, the tag of the deep water sector.

The familiar deep water effect has become even easier to use now with the sector color addition.


ZDoom reference by Randy Heit.