Skip to main content

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:

StepWhat happens
Load a sceneA 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 pageThe 304 × 128 scene area of the work page is copied to (8, 8) on the screen.
Run an animationOne 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 textA text is centred in a window below the scene.
Fade the textThe text fades out and its window is cleared.
WaitA number of ticks.
Wait for the musicWith sound driver 1 only, until the music reaches the next of eight markers.
ScrollThe 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.

#PicturesSteps
1WESTWOOD, then STREET1Sound 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.
2STREET1Wait 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.
3STREET1Text 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.
4STREET2Loaded during text 3 · marker 4 · the street scrolls · animation 4 · text faded · wait 10.
5DOORWAY1, DOORWAY2DOORWAY1 shown · wait 10 · text 4 · wait 25 · DOORWAY2 loaded · wait 54 · animation 13 · texts 5 and 6 with animations 9 and 10 · animation 14.
6WINDINGMarker 5 · animation 15 six times. In the modes other than 3, the palette INTRO.EGA is set at the end of this scene.
7KHELBAN2, KHELBAN1Shown · text 7 with animations 16 and 17.
8KHELBAN3Texts 8 to 10 with animations 32, 33 and 43.
9KHELBAN4Marker 6 · text 11 with animations 34 and 35.
10KHELBAN6, KHELBAN2Texts 12 to 15 with animations 17, 18, 19, 20, 22, 23, 24, 25 and 28.
11COINAnimation 37 · wait 18 · animation 36 · wait 36.
12KHELBAN6, KHELBAN5Texts 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–2A 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.
3Rain 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.
4The 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.
5The 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.
6The screen is cleared and a tall strip in its middle shows three views of a spiral staircase in turn, six times.
7Khelben'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.
8A 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.
9A closer view of his eyes: they look from side to side, close and open again as he asks for help.
10Khelben 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.
11The screen is cleared; a hand holding the coin appears in a tall strip, and a star of light grows over the coin and goes.
12Khelben 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.
13The 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.

ListPictureOn screen
0, 1STREET1A lightning bolt in the sky, small (0) or large (1), drawn twice with a palette flash, then thunder (sounds 3, 4).
2STREET1Lightning along the clouds, then sound 6.
3, 42STREET1The whole picture flashes, with thunder (sound 3). List 42 runs during the scroll.
4STREET2A small bolt far away, at the top right.
5—Two palette flashes and sound 5. The sequence never runs it.
6STREET1A raindrop falls into a puddle in the lower right of the street (sound 9), where rings spread and fade.
7, 8STREET1A raindrop falls along another path; list 8 ends with sound 8.
9DOORWAY2The torch behind the doorkeeper flickers.
10DOORWAY2The doorkeeper speaks while the torch flickers.
11, 12WESTWOODThe first company name over the street: faded in, held, faded out, with sound 11 (11, mode 3); shown, then removed (12).
13DOORWAY2Sound 10, then the door opens in two steps on the doorkeeper.
14DOORWAY2The doorkeeper leans forward with his arm stretched out; the torch flickers.
15WINDINGThe three views of the spiral staircase, one after the other.
16KHELBAN1The fire, the hanging lamp and the crystal ball each go through three frames.
17KHELBAN1, KHELBAN6The fire and the lamp flicker; three lightning flashes with sound 5.
18KHELBAN6The fire and the lamp flicker.
19, 20KHELBAN6Khelben'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, 28KHELBAN2One 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, 31KHELBAN5Khelben's casting postures: hands open before him (27), hands forward (29), hands raised and glowing (30), raised higher with a stronger glow (31).
32KHELBAN3Khelben blinks.
33KHELBAN3Khelben speaks and blinks.
34KHELBAN4His eyes look from side to side.
35KHELBAN4His eyes close, then open again.
36COINSound 1; a star of light grows over the coin in three sizes, then the hand returns.
37COINThe hand holding the coin, in a strip 104 pixels wide and the full height of the screen.
38, 39WESTWOODThe two short linking words and the second company name: faded in and out together (38, mode 3), or shown, then removed (39).
40, 41WESTWOODThe game's title and subtitle: faded in and out with sound 11 (40, mode 3), or shown, then removed (41).
43KHELBAN3Three 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:

CommandEffect
0Palette flash: in mode 3, one of the palettes PALETTE3, PALETTE2 or PALETTE4 is set for the delay, then the normal palette returns.
1A shape is drawn, the palette may flash, and after the delay the background is put back.
2A shape is drawn and stays.
3, 4A shape is faded in or out through one of seven fading levels (mode 3), or simply drawn or removed (other modes).
5A block of the scene picture is copied to the screen.
6A sound effect plays; number 255 plays nothing.
7After 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

Marker12345678
Ticks651130219533986607788551304913439
Seconds8.917.926.854.783.4121.6179.1184.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
PalettePALETTE1.PALPALETTE0.PAL, then INTRO.EGA from the winding stairs on
First sceneFades in from blackAppears at once
Palette flashes (command 0)YesNo
Shape fades (commands 3 and 4)Seven fading levels from FADING.DATDrawn or removed at once
TextFades outCleared
Street scroll3 pixels per tick8 pixels every 2 ticks
EndFlash to white, fade to blackA 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​

Anomaly

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​

Footnotes​

  1. Counted by running the AdLib driver of START.EXE on INTRO.ADL in a processor emulator, with the sound card ports intercepted; the tick rate follows from the driver's timer set-up. ↩