1984 · Novagen Software

Encounter

This minisite was contributed by air. It’s currently claimed by air who is editing it to reach a Gold tier standard.

Sixteen kinds of saucer and a homing missile. All sixteen saucers are one shape in eight pairs of colours: what tells them apart is how they fight.

01 · Under fire

Each saucer fires its own script

Pick a saucer to watch it attack, from the cockpit and from above at the same moment. In each recording the stick turns to face the saucer and drives in to medium range without firing back, so the saucer keeps shooting. Against types 5 and 11, which save all their fire for one fan of 16 shots, it hangs back at long range instead, so the fan has room to open out before it arrives.

The cockpit is drawn by the game's own view routines from the object table as it stood in each pass of the main loop, in the colours the raster interrupts give each frame, so a saucer and its shots change colour as they do on the machine. The map shows the same pass from above, centred on the player: the saucer, its shots with the whole path each has flown (a shot lives 48 passes), the obelisks as black dots, and the wedge the view can see. The strip under the panel is the whole recording, coloured by what the saucer was doing, with white marks where a shot hit the player. Each saucer is on the first level that has it, at Novice, its type set at every spawn ($A441). Types 0 and 1 are on level 2: on level 1 the same play saw them fire once in 1,200 passes.

A shot hits the player when its range code is under $80, or under $C0 if its bearing jumped by $57 or more since the last pass, which means it passed through ($AD26).

The console lamps are five cells of colour memory each, recoloured by $AA70. The middle right lamp turns yellow when a saucer arrives and orange when it goes. The lower right lamp turns light blue for 18 passes when a saucer fires. The upper left lamp alternates red and pink while a missile is live.

02 · Saucers

Sixteen saucers share one shape and eight colour pairs

Every saucer is drawn from the same shape family, object type $42. Its type picks a colour pair from the table at $8CE0, eight pairs used twice, so types 8 to 15 wear the colours of types 0 to 7. The raster interrupt at $B45F shows the low nibble of the pair on even frames and the high nibble on odd ones, fifty times a second, and a pair of two colours reads as a blend of the two.

Each picture is drawn by the game's own routines with the saucer straight ahead of the player on the plain of the first level that has it, the obelisks, the gun sight, and the hills and clouds left out. The two swatches are the pair's nibbles, even frames first. slow down holds each frame for half a second. The missile is shape family 3 ($62) in the pair $33. Shots are family 1 ($22) and take the saucer's colours: the view has one colour register for objects, $D023, and the saucer and its shots share it.

Only one enemy is on the plain at a time: there is one enemy slot. Between enemies the game waits a random 8 to 39 passes of its main loop, a third of a second to a second and a half, then sends a saucer or a homing missile. A saucer's type is random from 0 to twice the level less one ($A42C), so level 1 has two types and level 8 all sixteen, except that the first two saucers after a level-up are the two types it has just unlocked ($9E).

03 · Fire scripts

A script of waits and spreads aims every shot

A shot leaves on the bearing from the saucer to the player, plus a spread taken from the saucer's fire script. Four behaviour handlers decide when the script runs.

Fire scripts at $8C00: sixteen start offsets, then pairs of (wait in passes after the shot, spread: twice this many 2048ths of a circle added to the bearing, or with bit 7 set a random spread within the low bits) ended by $FF and the offset to loop back to ($A97A). A type whose handler ignores the script still has one.

HandlerTypesWhat the saucer does
$A5D6 default0-4, 6, 8, 10Moves for up to 63 passes, waits 8 to 40 passes standing still, aims, then stands and runs its script to the end; types 0 and 1 sound a rising tone while they aim. After its attack rounds it picks a new course.
$A5C7 script fire9, 12, 14, 15Runs its script every pass while it moves. It never waits or aims.
$A563 burst fire5, 11Wanders for 255 passes, then fires its whole script, 16 shots, in one pass, and leaves without scoring.
$A70D permanent fire7, 13Never moves: the speed cleared at spawn is never set. Runs its script every pass it is allowed.

A new course takes its speed and heading from a difficulty value that ramps from the skill's base up to $3F ($A693, $AB70). With a chance set per level ($68C8, hidden in the title screen) the heading points straight at the player ($A6E6). A saucer gives up and leaves when a clock that counts periods of 256 frames reaches 24, about two minutes ($58, $A5F2). The clock starts again with each level and at every death, kill, missile and pause.

04 · The missile

The homing missile weaves while it is far and flies straight once it is close

Each pass the main loop points the missile at the player ($A255). While the range code is at or above a threshold fixed at launch ($40, from the table at $8E40), the handler at $A7F0 turns it off that line by a random angle of up to 45°, and swaps the side every 1 to 64 passes, so it weaves. Inside the threshold it flies straight at the player. It never asks the obelisk map, so obelisks do not stop it.

Level 1 at Novice, a missile forced at the first chance, met twice: once by a stick that faces the missile, holds back and fires once the range code is under $B8, and once by a stick that only turns to face it. On the map the red line is the missile's path since launch and the white line the player's. The chart is the same recording, pass by pass: above, the range code, with the threshold dashed; below, how far the missile's course is turned off the line to the player, from its movement in that pass.

The missile's speed is also fixed at launch: a value from the table at $8E00 plus the player's top speed for the skill ($68). A player driving straight away at full speed cuts the speed it closes at to the table value alone. That is why the usual way to beat one is to face it, back away and shoot.

A missile comes in place of a saucer when one is pending, when the same two-minute clock runs out, or one time in four while a saucer flag is set ($A322).