ReX's Nexus: Creating Cutscenes for (G)ZDooM

Anatomy of a Cutscene

The screen is dark and all you hear is the crackling static of a radio receiver in its last throes. Slowly the screen brightens in a classic fade-in to reveal a scene of carnage and destruction. Suddenly, a shadow darts across the screen and the camera moves to follow it. Ominous music pipes in, softly at first, but growing to a crescendo as the camera reaches a breach in the wall. A city street stretches out below, buildings along it lying in ruins and utter devastation. The camera slowly drops to street level and pans around. You hear the sound of heavy, belabored breathing, and the camera swings in the direction of the sound. Suddenly a scream rings out, and the camera lens is splattered with drops of crimson as you hear the sound of a body hitting the pavement. The music peaks just in time to show you a vast, indistinct shape shambling away into an adjacent alley. Words and a logo zoom out onto the screen, but you are cringing at the horror of it all, and for a moment you can't make sense of the words. "ATTACK OF THE KILLER FIENDS", they announce. The scene fades to black but the title remains on the screen. You breathe a sigh of relief as you press the 'ESC' button to bring up the menu. All is safe with the world. It's only a game after all.

Anybody who's played a modern computer or console game has seen one - the ubiquitous cutscene. Used for everything, from providing a story's introduction to filling in pieces of the action that cannot be left to the player to control, cutscenes serve a myriad of purposes. As outlined by the fictitious scenario in the paragraph above, it is used as a means to set up the "back story" and to create the appropriate mood. It can be used for mission briefings, where the player can benefit from basic information about the game and its objectives. It can be used to show the player the effect of his/her actions in a distant, remote part of the game. It can be used to advance the plot, provide clues, and promote character development. Finally, it can be used to provide a dramatic conclusion when the player has successfully completed all objectives. Cutscenes are an important tool in a game-developer's kit, and when used skillfully they can create a dynamic environment in the player's sand-box.

There are two key elements in the creation of a cutscene - aesthetics and mechanics. Aesthetics are, largely, subjective and a matter of taste. Therefore, I'll only provide some basic guidelines on what this constitutes. Or, more accurately, I'll provide some guidelines on what I think it constitutes. Mechanics, on the other hand, are more easily established, and I'll provide step-by-step instructions on how to achieve some common cutscene effects.

A. Aesthetics of a Cutscene

The aesthetics aspect of a cutscene revolves around the mood you wish to create, and your desire to hold the player's interest. Here are some pointers, all of which pertain more to cinematography than map-building:

B. Mechanics of a Cutscene

There are seven common tools you can use in a cutscene, and each of these is already built into ZDooM. As such, you won't need to insert your own resources into your game if you so choose. These tools are:

The first three items all pertain to "cinematography" - types of cameras, switching cameras, and causing cameras to "travel". The fourth item is required if you want actor movement where the actor needs to be animated. The fifth allows you to move an actor (such as an enemy or model) along a path. [Enemies become dormant when propelled by an Actor Mover.] The sixth is useful for mission briefings and other instances when messages need to be conveyed to the player. Action Code Script, or ACS, is the language that ZDooM (and each of its derivatives) uses to create various effects. Please read the articles to which those items have been linked, and become familiar with them.

There are four steps to developing your cutscene [which I have cheesily named the "4P Method"]: Planning, Placement, Programming, Playing. Let me first outline what these steps are and their importance in creating the right effect. After that I'll illustrate with some examples.

C. Making a Cutscene Optional

Whenever possible, especially whenever the viewing of the the cut-scene is not necessary for the player's advancement within the game, provide the player a means to skip the cut-scene. Watching a cut-scene may be enjoyable the first time, but if a player goes back and plays the map again s/he may not be interested in sitting through it again. There are several ways by which you can allow a player to skip a cutscene. [However, keep in mind that some cutscenes may be required in order to move the action or story along, and it may not be desirable (or even possible) to make these portions skippable.] The method you use to allow players to skip cutscenes will, to some extent, depend on the type of cutscene:

D. An Example of a Mission Briefing

Mission briefings are generally the simplest types of cutscenes to develop. Let's look at the key blocks of code in an example. [Incidentally, this example is from Paranoid, a Half-Life mod for GZDooM.] The first picture below is the scene where the mission briefing occurs. You see the model of the briefer, the desk and other office accoutrements, and the two cameras. The second picture is from the map editor, and it shows the layout of the scene; the notes indicate what each thing is.

Now let's look at the scripting that went into creating the mission briefing:

// Script 11: Mission Briefing & begin game

script 11 (void)

This triggers the following sequence: the player freezes, the screen fades to black in 3 seconds, the players point of view changes from the normal in-game mode to the particular camera for the cutscene (tag ID = 255), the camera is activated, and the scene being captured by the camera fades into view in 3 seconds.

Meanwhile, camera with thing identification (TID) of 255 has been set up as a moving camera at zheight = 152, is bilinear (camera will adjust its angle to match those of the points it passes), and will move to interpolation point with TID = 254. Interpolation point (IP) with TID = 254 has the same x, y, and z coordinates as the camera, is pointing to IP with TID = 253, and has a travel time of 64 tics to that IP, which is at zheight = 128 and slightly forward of the camera start point. This means that, upon being activated, the camera will slowly float down towards the floor before moving forward to the next IP.

This section begins with a sound being triggered, signalling that the briefing is about to begin. This is a useful device that adds a touch of realism, but is entirely optional. Following that, the audio portion of the briefing starts. You'll need to include a sound file in your game and set up the sound definitions, but that's the subject of a different discussion. In this example, the mission briefing also includes a HUDMessage that simply transcribes the audio portion. You can choose to use only the audio, or only the HUDMessage, or both.

Meanwhile, the camera has moved to its "destination" IP. In this example, the IP is positioned at an actual camera model that the player can see as the POV approaches it. Again, this is simply a device to provide some realism, and is not required.

After the briefing has gone on for a little while, you should consider changing cameras to lend a touch of dynamism to the proceedings. In this example, the camera changes to a fixed camera off to the side, and which is pointing at the briefer. The second audio section of the briefing then begins, and the transcribed test is displayed. The reason to split the audio file into two or more files is that it allows better control of the synchronization of audio, HUDMessages, and camera movement.

As before, after some more of the briefing, you should change the camera again. In this instance, the camera has been changed back to the original moving camera while the last audio and HUDMessage portion of the briefing is delivered. Finally, the radiostatic sound is played to signify the end of the briefing, and the scene fades to black. The camera is changed back to the player's POV, the player is unfrozen, and the scene fades back in.

Admittedly, this is a rather involved mission briefing, and you can achieve the same result without the manipulations described here. However, this example illustrates the richness and diversity of effects that you can employ to create an attractive cutscene. The principles used in this example are virtually the same as those for other, more complex cutscenes. Even though you may use more actors, have more frequent camera changes, or implement more sound & light effects, the toolbox defined in the discussion above will allow you to execute a slick and professional-looking cutscene.