Knowledge Base - Phased (Moving) Lighting

Phased (Moving) Lighting

Phased Lighting in Action
Figure 1: Phased Lighting in Action

Phased, or moving lighting, is one feature that I always loved about Hexen and wished dearly was in Doom. Well, now it is, in ZDoom. It is very simple to implement, as is illustrated in the demo wad, phasel.wad.

There are two ways to implement phased lighting, as is illustrated in Figure 2.

Map Layout in WadAuthor
Figure 2: Map Layout in WadAuthor

The first method is illustrated in the top row of sectors in Figure 2. Start by marking a sector with the LightSequenceStart. This special will be found in the sector specials drop down in WadAuthor. In Figure 2, it is the sector marked Start. Each adjacent sector is then assigned the LightSequenceSpecial1 and LightSequenceSpecial2, marked with a 1 or 2 in the illustration. Just alternate between the two specials for as many sectors as desired. In the game, the light will move toward the Start sector, in the direction of the arrow.

The other way to implement phased lighting is to mark a sector with the Light_Phased special and then set the light index, as is illustrated in Figure 3.

Phased Lighting Index
Figure 3: Phased Lighting Index

In Figure 2, the first light index is set to 1. Then for every adjacent sector, increment the index. The numbers show the index values in the example wad. The light will also move toward the sector with the start index.

That's all there is to get phased lighting working in your level. It is an easy special to master but really enhances the atmosphere of the map.


ZDoom reference by Marisa Heit.