1987 · Electric Dreams Software

Fire Trap

This minisite was contributed by unorig. It’s agent-generated and needs a human editor. Clone https://github.com/gamesexplained/gamesexplained and follow kit/START.md to curate games/c64/fire-trap with me to Gold.

One building to climb per stage, fires that grow and throw debris, and creatures that visit windows. The game does the rest with short tables of objects, each updated once a tick.

A stage

The clock and the four lives

A stage starts on the Get Ready screen, which waits 200 frames (run_get_ready, $1686) while a map picture is drawn. The stage then runs one game tick every four video frames, about 12.5 a second on a PAL machine (run_game, $1336). The timer starts at 999 and drops one unit every 13 frames, so a stage lasts at most about 260 seconds. The firefighter starts with four lives, and a hit takes one (firefighter_hit, $1CD4).

After a hit the firefighter falls for 20 ticks, or until he reaches the foot of the building. If lives and time remain, the stage is set up again with its fires cleared and the clock back at 999, and he starts again a little below where he was hit; otherwise the game is over (state_1_hit, $1D19).

Fires and debris

Fires come faster on later stages

The game tries to set a window alight every 17 minus the stage number game ticks: every 16 ticks (64 frames) on stage 1, and one tick sooner on each stage after (start_window_fire, $2195). The window is picked at random from the rows just above and below the firefighter. A burning window flickers and throws down debris, three pieces at a time at most (grow_window_fires, $223A; spawn_debris, $22C8). Debris that touches the firefighter hits him. The game keeps up to sixteen fires in a table at $0964.

The firefighter fights back with a spray. Up to six shots can be in the air, kept in a table at $0A78, and the game refuses a third shot in the same direction (fire_spray, $2048). A shot that reaches a burning window puts it out and scores (spray_hits_fire, $242E).

Visitors

People, creatures, birds, and one big actor

WhatHow manyWhat it doesWhere
People at windows10Freed when the firefighter reaches their window, for 300 points; they rise a little, then fall away.$36DC, table $09D8
Window creatures6Each takes three spray hits and hurts the firefighter on contact.$3AA5, table $0A10
Flying objects4Rise from below toward his column and hurt him on contact.$38A4, table $0A68
Pickups8Hidden behind a new fire's window and revealed when that fire is put out, within a budget for each band of ten map rows.$34C0, table $09B8
The actor1Appears at random in the middle of the building and falls, rises, crosses, wobbles down, or chases him.$3BDF, variables $7A-$89

There are five kinds of pickup (update_pickups, $3524). Two are worth points, 1,000 and 2,000, and may be the money bags the retro blog names. The other three start a state each. One switches on a spray that fires three ways (flag $78; $1A75), and collecting it again scores 500. A second starts a countdown from 59 in $74, and while it runs the hit tests skip him, so nothing can hurt him ($1A93). A third is the warp: the firefighter shoots up the building eight units a tick, spraying as he goes ($1AAA). The second is probably the blog's protective suit, though the code gives it no name.1

The top

A last object, then the rescue and the descent

Near the top of the building a special object drawn from four sprites starts to move (update_top_object, $2706). It runs through four behaviours: it rises, swings sideways toward the firefighter, dives past him, and leaves to one side ($27E7). Reaching the top starts the end-of-stage states (stage_end_sequence, $1B34), which play a run of pictures and then let the firefighter float down the building ($1C32). Then the bonus is counted (stage_complete_sequence, $C232): for each fire put out before the rescue, the time left times the stage number, and 200 points for each fire put out after it.