1989 · Domark

Licence To Kill: gameplay

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/licence-to-kill with me to Gold.

Six scenes in five levels, a helicopter whose throttle is also its height, and a clock that pays out what is left of it.

01 · The levels

Six scenes, five levels

The reviews counted six sections, and the game counts five levels. The dive and the water-ski are one level in the code, number 3, and harpooning the seaplane switches from one to the other.

LevelSceneWon byCountdown
1 (number 0)The helicopter chases Sanchez's jeep over a town (level1_start)Reaching the end of the map and landing: the scroll stops, and the helicopter must come down inside the landing area (move_player)2,000: 80 seconds
2 (number 1)Bond on foot in the boatyard (level2_start)Fighting through to the top of the yard5,000: 200 seconds
3 (number 2)Bond on a rope under the helicopter, after Sanchez's plane (level3_start)Hooking the plane's tail: the rope must be long enough and Bond inside a small box at the tail when fire is pressed (catch_plane). The level is lost if the fuel runs out first2,000: 80 seconds
4 (number 3)The dive among Sanchez's divers and boats (level4_start)Harpooning one of the seaplane's pontoons (harpoon_seaplane), which starts the water-ski3,000: 120 seconds
The water-ski behind the seaplaneReaching the top of the screen (diving_loop)
5 (number 4)The plane over the tanker convoy, then Bond on a tanker (level5_start)Jumping onto a tanker and running the convoy off the road to the last stretch5,000: 200 seconds
Level 2: Bond on foot in a sandy boatyard beside a shed, with ammunition and magazines shown in the panel
Level 2, the boatyard. The panel shows the bullets left and the spare magazines.
Level 3: Bond hanging below the helicopter over a blue sea beside a long pier
Level 3: Bond on the rope over the sea.
Level 4: the diver in light blue water near a boat
Level 4: the dive, with a boat at the surface.
The high-score table, ALL TIME TOP SECRET AGENTS, seven names from 007 down to 001
The high-score table between games.

Within the scenes there is more to do than the table shows. On level 1 Sanchez's jeep can be shot: it takes 12 hits, each worth 100 points, and stopping it is worth 2,000 more (shots_hit_jeep); the lower bar in the panel shows the hits it has left (draw_hits_bar). On level 2 an ammunition crate makes the gun fire by itself for 66 shots, and each magazine picked up adds one, up to three (touch_enemies). On level 3 the rope grows while the plane is on the screen and shrinks while it is not (rope_length_step), and it swings with the helicopter's speed. When the truck chase ends, the game prints "CONGRATULATIONS ON DEFEATING SANCHEZ AND SMASHING HIS EVIL DRUG EMPIRE" (level5_end), waits for fire, and starts again from level 1.

Each level has a 25-byte record in the table at level_records, which start_level reads: where its map ends, its colour scheme and playfield colour, how fast its fuel runs down, its list of enemy launches, its tiles, and its table of character heights. Most of the values are written straight into the code as it runs, so the same routines serve every level. After level 5 the level number goes back to 0 (level_complete).

02 · Energy, lives and the clock

Six or seven shots, four lives

A shot or a crash takes energy, and Bond loses a life when the energy is gone. The level then starts again from its beginning.

The energy is a count at $039E. Every level starts it at 47 (start_timer), and levels 1 and 3 then set it to 6. An enemy shot takes 1 on level 1 and 8 on level 2 (enemy_shots_hit_player), so the seventh shot costs a life on level 1 and the sixth on level 2. Touching an enemy on level 2 costs a life at once (touch_enemies). On level 4 each touch of a diver takes 1, and a boat that hits Bond at the surface empties the energy (diving_collisions). On level 5 the tanker has an energy count of its own: it drains while the tanker is off the road (drive_tanker), and a Stinger missile takes 3 of it (move_stinger). A crash into the scenery sets the count below zero at once.

The lives start at 3 ($19F6), and the panel shows 03. Each loss takes one away, but the game ends only when the count goes below zero, so Bond plays on at 00 and has four attempts.

The countdown in the panel loses one every other frame, 25 a second (count_down_timer), and stops at 0000; running out of time is not a loss. Whatever is left when a level ends is added to the score as a bonus.4

03 · Crashes

Fly higher to clear the buildings, but not all of them

On level 1 the stick's up and down set the helicopter's throttle, from 1 to 47. The throttle picks how fast the scenery scrolls, and it is also how high the helicopter flies: the game crashes it into anything taller than that.

The opening picture of level 1, drawn from its map, tiles, and character set. Every character the helicopter would crash into at this throttle is hatched in white and outlined in black. The test is the game's own: a character crashes the helicopter when its height times 4 is at least the throttle (player_hits_scenery).

The C64 can report when a sprite touches the background, but the game never reads that register. Instead each level has a table of heights, one for every character, four bits each (heights_a for levels 1 and 4, heights_b for the others). Each frame on level 1, player_hits_scenery copies the throttle into the compare instruction at $333F, works out which screen characters lie under the helicopter, and looks up the heights of up to seven of them, chosen by where the helicopter sits within a character from the lists at scenery_offsets. One that is high enough sets the energy below zero.4 Heights run from 0 to 12 on level 1, and the throttle stops at 47, so a character of height 12, which needs 48, can never be flown over: at full throttle those are the only ones left hatched in the widget.

The same heights decide where shots stop: a character taller than a shot ends it (move_shots). On level 2 the routine is entered further in, at $32D1, and a high character puts Bond back where he stood, which is how the boatyard's walls stop him. The Maps tab can show every character's height.

04 · The scroll

Two screens and a four-part copy

The scenery moves down the screen a pixel or more each frame, by the C64's fine-scroll register (scroll_step). Each time it has moved a whole character, every row must be copied one row down, which is too much work for one frame. The game keeps two screens, at $4000 and $4400, shows one while it copies into the other in four parts of six rows (scroll_copy_rows_a to _d), draws the new top row from the map, and then flips the display to it (set_scroll_regs).

Enemies arrive from a list for each level, three bytes an entry: a scroll position, a column, and a kind of enemy (launch_from_map). When the scroll reaches the position, a group of up to six sprites appears. Each of the 45 kinds names its shape, colour, hit points, hit box, and where its shots start from, in the tables from type_state.