The introduction
The engine in ten minutes · Display modes › The three modes · Overlay 255
In brief
The introduction is the animated story shown when the game starts, before the start menu, and again when the player chooses RUN INTRODUCTION in that menu. It is a fixed sequence of 13 pictures, 20 texts and short animations, accompanied by music. A key press skips the rest of it once the first scene is on screen. It changes nothing in the game: no party, item or flag is touched, and the start menu follows.
The whole sequence is played by overlay 255. Pictures are CPS files; durations are counted in ticks of the game's free-running counter, 18.2 per second.
How it works
The sequence is built from a few kinds of steps:
| Step | What happens |
|---|---|
| Load a scene | A picture is loaded into a work page and the shapes it holds are cut out for later animations. It is not visible yet. |
| Show the work page | The 304 × 128 scene area of the work page is copied to (8, 8) on the screen. |
| Run an animation | One of 44 animation lists: shapes drawn, removed or faded in place, blocks of the picture copied to the screen, palette flashes and sound effects, each with its delay. |
| Print a text | A text is centred in a window below the scene. |
| Fade the text | The text fades out and its window is cleared. |
| Wait | A number of ticks. |
| Wait for the music | With sound driver 1 only, until the music reaches the next of eight markers. |
| Scroll | The street picture scrolls sideways by 280 pixels. |
The sequence
Animations are given by their list number. Where two numbers are given, the first is used in mode 3 (VGA), the second in the other display modes.
| # | Pictures | Steps |
|---|---|---|
| 1 | WESTWOOD, then STREET1 | Sound 0. Both pictures are loaded; WESTWOOD serves only for its shapes. Wait 1 tick, sound 12 (the music starts). The street appears: faded in from black in mode 3, shown at once in the other modes. Skipping becomes possible. |
| 2 | STREET1 | Wait 18 · animation 3 · wait 18 · animation 6 · wait 18 · animation 0 · music marker 1 · animation 11/12 · 7 · wait 6 · animation 2 · wait 6 · marker 2 · animation 38/39 · 3 · 8 · 1 · wait 10 · animation 0 · wait 6 · animation 2 · marker 3 · animation 40/41 · 7 · wait 18. |
| 3 | STREET1 | Text 0 with animation 7 and a wait of 90 ticks · text 1 with animations 8 and 2 and 72 ticks · text 2 with animations 2 and 6, 36 ticks and animation 3 · text 3. Each text is faded before the next. |
| 4 | STREET2 | Loaded during text 3 · marker 4 · the street scrolls · animation 4 · text faded · wait 10. |
| 5 | DOORWAY1, DOORWAY2 | DOORWAY1 shown · wait 10 · text 4 · wait 25 · DOORWAY2 loaded · wait 54 · animation 13 · texts 5 and 6 with animations 9 and 10 · animation 14. |
| 6 | WINDING | Marker 5 · animation 15 six times. In the modes other than 3, the palette INTRO.EGA is set at the end of this scene. |
| 7 | KHELBAN2, KHELBAN1 | Shown · text 7 with animations 16 and 17. |
| 8 | KHELBAN3 | Texts 8 to 10 with animations 32, 33 and 43. |
| 9 | KHELBAN4 | Marker 6 · text 11 with animations 34 and 35. |
| 10 | KHELBAN6, KHELBAN2 | Texts 12 to 15 with animations 17, 18, 19, 20, 22, 23, 24, 25 and 28. |
| 11 | COIN | Animation 37 · wait 18 · animation 36 · wait 36. |
| 12 | KHELBAN6, KHELBAN5 | Texts 16 to 19 with animations 18, 19, 20 and 27 · animation 29 · marker 7 · animations 30 and 31 · then, until marker 8, animations 31 and 30 in turn. |
| 13 | — | Not skipped: the text window is cleared and sound 14 plays; in mode 3 every colour except colour 0 and the text colour fades to white, then to black. Skipped: sound 15. The introduction's graphics are freed. |
What the scenes show
The numbers are those of the sequence above.
| # | On screen |
|---|---|
| 1–2 | A city street at night, in the rain. Lightning strikes and the picture flashes with thunder, raindrops fall and one makes rings in a puddle. The names of the two companies and then the game's title and subtitle appear over the street one after the other: faded in and out in mode 3, shown and removed in the other modes. |
| 3 | Rain and lightning go on while the texts tell how the party, resting by the fire, received an urgent note from their friend Khelben Blackstaff, Archmage of the city. |
| 4 | The view pans along the street to a door between two lanterns, with a flash of lightning on the way and a far bolt at the end. |
| 5 | The door, closer. It opens in two steps on a doorkeeper standing in front of a torch; he welcomes the party and says that Khelben is waiting in his study, then leans forward with his arm stretched out. |
| 6 | The screen is cleared and a tall strip in its middle shows three views of a spiral staircase in turn, six times. |
| 7 | Khelben's study: Khelben leans by the fireplace; the fire, a hanging lamp and a crystal ball flicker, and lightning flashes behind the window while he thanks the party for coming. |
| 8 | A close-up of Khelben's face: he speaks and blinks; lightning flashes. He is troubled: an ancient evil stirs in the Temple Darkmoon and he fears for the city. |
| 9 | A closer view of his eyes: they look from side to side, close and open again as he asks for help. |
| 10 | Khelben standing in the study, by the fire and the lamp: his face moves as he speaks and his posture changes from frame to frame. He tells of a scout sent three nights earlier who has not returned, and gives the party a coin. |
| 11 | The screen is cleared; a hand holding the coin appears in a tall strip, and a star of light grows over the coin and goes. |
| 12 | Khelben in the study again: he will use the coin to reach the party and will teleport them near Darkmoon. He raises his hands, which glow; with sound driver 1 he keeps alternating two raised postures until the music's last marker. |
| 13 | The screen flashes to white and fades to black (mode 3). |
The texts are paraphrased here, not quoted.
What each animation list shows
Pictures named in the table are those on screen and, for commands 5, those the blocks are copied from.
| List | Picture | On screen |
|---|---|---|
| 0, 1 | STREET1 | A lightning bolt in the sky, small (0) or large (1), drawn twice with a palette flash, then thunder (sounds 3, 4). |
| 2 | STREET1 | Lightning along the clouds, then sound 6. |
| 3, 42 | STREET1 | The whole picture flashes, with thunder (sound 3). List 42 runs during the scroll. |
| 4 | STREET2 | A small bolt far away, at the top right. |
| 5 | — | Two palette flashes and sound 5. The sequence never runs it. |
| 6 | STREET1 | A raindrop falls into a puddle in the lower right of the street (sound 9), where rings spread and fade. |
| 7, 8 | STREET1 | A raindrop falls along another path; list 8 ends with sound 8. |
| 9 | DOORWAY2 | The torch behind the doorkeeper flickers. |
| 10 | DOORWAY2 | The doorkeeper speaks while the torch flickers. |
| 11, 12 | WESTWOOD | The first company name over the street: faded in, held, faded out, with sound 11 (11, mode 3); shown, then removed (12). |
| 13 | DOORWAY2 | Sound 10, then the door opens in two steps on the doorkeeper. |
| 14 | DOORWAY2 | The doorkeeper leans forward with his arm stretched out; the torch flickers. |
| 15 | WINDING | The three views of the spiral staircase, one after the other. |
| 16 | KHELBAN1 | The fire, the hanging lamp and the crystal ball each go through three frames. |
| 17 | KHELBAN1, KHELBAN6 | The fire and the lamp flicker; three lightning flashes with sound 5. |
| 18 | KHELBAN6 | The fire and the lamp flicker. |
| 19, 20 | KHELBAN6 | Khelben's face moves as he speaks, with the fire and the lamp. |
| 21 | — | The same with four other face frames. The sequence never runs it. |
| 22–25, 28 | KHELBAN2 | One posture of Khelben each: arms at his sides (22), hands joined (23), arms folded (24, 25), a hand raised to his chin (28). |
| 26 | — | Another posture from KHELBAN2, hands on his belt. The sequence never runs it. |
| 27, 29, 30, 31 | KHELBAN5 | Khelben's casting postures: hands open before him (27), hands forward (29), hands raised and glowing (30), raised higher with a stronger glow (31). |
| 32 | KHELBAN3 | Khelben blinks. |
| 33 | KHELBAN3 | Khelben speaks and blinks. |
| 34 | KHELBAN4 | His eyes look from side to side. |
| 35 | KHELBAN4 | His eyes close, then open again. |
| 36 | COIN | Sound 1; a star of light grows over the coin in three sizes, then the hand returns. |
| 37 | COIN | The hand holding the coin, in a strip 104 pixels wide and the full height of the screen. |
| 38, 39 | WESTWOOD | The two short linking words and the second company name: faded in and out together (38, mode 3), or shown, then removed (39). |
| 40, 41 | WESTWOOD | The game's title and subtitle: faded in and out with sound 11 (40, mode 3), or shown, then removed (41). |
| 43 | KHELBAN3 | Three lightning flashes with sound 5. |
The sequence calls the animation player 131 times, always with a fixed list number; lists 5, 21 and 26 are never among them. Shapes drawn by the lists come from the pictures named in Animations below; blocks are copied from the picture last loaded into the work page.
Animations
Each animation list is a series of commands with a shape, a position, a delay and a palette or fading level:
| Command | Effect |
|---|---|
| 0 | Palette flash: in mode 3, one of the palettes PALETTE3, PALETTE2 or PALETTE4 is set for the delay, then the normal palette returns. |
| 1 | A shape is drawn, the palette may flash, and after the delay the background is put back. |
| 2 | A shape is drawn and stays. |
| 3, 4 | A shape is faded in or out through one of seven fading levels (mode 3), or simply drawn or removed (other modes). |
| 5 | A block of the scene picture is copied to the screen. |
| 6 | A sound effect plays; number 255 plays nothing. |
| 7 | After the delay, the shape's background is put back. |
The shapes come from four pictures: STREET1 (14), STREET2 (1),
WESTWOOD (9) and KHELBAN1 (17).
Texts
The 20 texts are stored in the executable. Each is centred in the text window, line by line, nine pixels apart. Texts 0 to 4 use colour 16 and the others colour 15 of the palette. In mode 3 the chosen colour is copied into colour 255 and the text drawn with it, so that the text can fade out without touching the picture; in the other modes texts are drawn in colour 15 and simply cleared.
Music and sounds
The introduction loads the INTRO sound file (INTRO.ADL or INTRO.SND,
by sound driver) and plays sound 12 to start the music. With sound driver 1,
eight waits hold the sequence until the music reaches the matching marker,
so that scenes change on the music. The markers are set by the first voice
of the tune in INTRO.ADL, in order,
at these times from the start of the music, counted in driver ticks of
1/72.8 second:1
| Marker | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
|---|---|---|---|---|---|---|---|---|
| Ticks | 651 | 1302 | 1953 | 3986 | 6077 | 8855 | 13049 | 13439 |
| Seconds | 8.9 | 17.9 | 26.8 | 54.7 | 83.4 | 121.6 | 179.1 | 184.5 |
The tune ends 14,219 ticks (195.2 seconds) after it starts. A wait for a
marker that has already passed returns at once. With the other sound
settings these waits are skipped and the sequence runs on its own delays
only. With the PC speaker or the Tandy sound chip there is no music:
sound 12 is 0 in INTRO.SND, a
program that plays nothing, and only the sound effects are heard. Sound
effects come from animation commands 6 and from the street scroll; sound 14
or 15 closes the introduction.
Skipping
From the moment the first street scene is on screen, any waiting input skips the introduction. Keys pressed before that moment are discarded. Once skipped, every remaining step returns at once, so the sequence ends almost immediately with sound 15. The key is noticed while the sequence waits; during the fading waits of commands 3 and 4 in the modes other than 3 it is noticed only at the next wait.
Display modes
The introduction is the same story in every display mode, but mode 3 has more effects:
| Mode 3 (VGA) | Other modes | |
|---|---|---|
| Palette | PALETTE1.PAL | PALETTE0.PAL, then INTRO.EGA from the winding stairs on |
| First scene | Fades in from black | Appears at once |
| Palette flashes (command 0) | Yes | No |
| Shape fades (commands 3 and 4) | Seven fading levels from FADING.DAT | Drawn or removed at once |
| Text | Fades out | Cleared |
| Street scroll | 3 pixels per tick | 8 pixels every 2 ticks |
| End | Flash to white, fade to black | A short wait |
In mode 3, FADING.DAT is read when it exists; otherwise the seven fading
tables are computed and the file is written for the next time. The Tandy mode (6) scrolls like mode 3 but has none of
its palette effects.
Details and edge cases
Anomalies
The street scroll plays sound 11 only in the EGA mode. The scroll has
two branches. The one used in modes 3 and 6 moves the picture 3 pixels at a
time and runs animation 42 when it reaches 96 pixels. The one used in the
other modes moves it 8 pixels at a time, runs animation 42 at 96 pixels and
also plays sound 11 at 200 pixels. The branch for modes 3 and 6 has no such
step, so sound 11 never plays there. A faithful reimplementation plays sound
11 during the scroll in mode 5 and not in modes 3 and 6. (ANOMALY-89)
Sources
- Overlay 255: play the introduction, run an animation list, print a text, scroll the street, test for a skip key.
- Start menu, sound routine, load the sound file.
- Music marker, read the music marker.
- Formats: CPS, ADL. Content: Scenes and sequence pictures, Sound and music. File hashes: file inventory.
- Comparative source: REF-SCUMM-012,
engines/kyra/sequence/sequences_darkmoon.cpp,DarkMoonEngine::seq_playIntro.