Cameras
By Richard Clark


camera View
Figure 1: camera in Action

One of the fun features in ZDoom is the camera thing and associated ChangeCamera special. Judicious use of the camera can really enhance the game play in a single player or multi-player map. In this tutorial I explain how to use the camera in a ZDoom map.

The camera is a new thing (9025) in Zdoom. Place the thing in the map where you want the camera to be. Figure 2 shows two cameras placed in a sample map in WadAuthor. I created an example wad, testcam.wad, that illustrates using the camera.

cameras placed in map
Figure 2: Camera Placement

The circled areas are the camera things. Two switches have been added to the map so that the player can activate the cameras. There is a camera in each room that when activated, looks into the other room, as illustrated in Figure 1.

camera setup
Figure 3: Camera Properties

Figure 3 shows the camera properties. The Tag Number is the Thing ID that the activation special will use to turn on the camera. The Facing is the direction the camera is pointing.

camera Activation Special
Figure 4: camera Activation

Figure 4 shows the camera activation special, ChangeCamera. The special takes three arguments, defined below.

ChangeCamera tid who revert

In the example, the camera thing id was 3, so this line will reference camera 3. The who is set to 0, since we only want the view of the player using the camera to change. The revert is 1 since we want the view to be restored once the player moves away from the camera switch. In Figure 1, the view shows the player activating the camera in the room across from the camera. Also, by setting the Z parameter of the camera thing to 64, the camera will have a good view of the map.

Using these simple techniques, it would be possible to set up a series of cameras in a map to give the player different views of areas to enhance the game play of the map.


Sources

ZDoom reference by Randy Heit. Thanks to Randy for telling me about the Z parameter of the camera thing.

3D Game Alchemy by Steve Benner, et al. Copyright © 1996 By Sams Publishing


Back