1990 · Domark

The Spy Who Loved Me

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/the-spy-who-loved-me with me to Gold.

Five stages of road, water and sea, a truck that sells weapons for tokens, and the rules the code keeps.

01 · The stages

From the harbour to the open sea

The game runs through five stages, each scrolling up the screen. The code numbers them 0 to 4 and starts each with start_section. The Maps tab draws every one of them.

The Lotus on a grey road through green verges, with obstacles on the road ahead
The harbour road.
The sea bed: black water with yellow-green seaweed down both sides and small enemies
The sea bed.
StageWhat happens
1, the harbour roadThe Lotus drives from the harbour past side roads and bridges, collecting Q tokens. Where the road meets the water the car becomes a speedboat (enter_water).
2, the waterThe speedboat weaves between piers and swimmers to the dock at the end of the map. The boat fires missiles but no gun.
3, the coast roadBack in the car, against enemy cars, a helicopter and a boss. The Q-truck comes along this road. The road goes round and round until the car takes the ramp into the sea, which it can only do with the sub capability bought from the truck (hit_ramp).
4, the sea bedThe Lotus as a submarine moves freely in every direction (steering), against divers that weave on random paths, pairs of larger enemies, and a warship drawn in characters (the warship). The stage ends a few seconds after the warship is destroyed (hit_counted).
5, the open seaOn the surface against enemies that come in close waves, among them a rider that sways from side to side. The last stop of the map ends the stage with "congratulations", and the game starts again from stage 1 with the score kept (section_end).

Zzap!64 described the same run: the Lotus under attack, a speedboat halfway through, the Lotus again with a helicopter and the Q-van, a dive off a pier to the sea bed, and a wet bike against boats at the end.4 The manual's six scenes include three, aboard the supertanker and inside Atlantis, that were made only for the 16-bit computers.1

02 · Speed

Where the car sits sets the speed

On the roads and the water the scroll speed comes from the car's height on the screen, not from a throttle (set_speed). Near the top the scenery moves at speed 6; lower down it drops through 5, 4, 3, 2 and 1, and at the very bottom the scenery stops and the car is held there. Pushing up moves the car up the screen and so speeds everything up.

Every row of scenery that scrolls past adds the speed squared to the score: 36 points a row at top speed, 1 at the slowest (scroll_step, speed_score). Driving fast scores more than driving carefully. How sharply the car can steer depends on its speed too: a slow car can only drift sideways (x_speed_limits).

On the sea bed and the open sea the speed is fixed and the stick moves the car freely (fixed_speed, joystick_free).

03 · Damage

Armour, and what costs it

The car has one store of armour, the DAM bar on the panel, which starts full (reset_car). When the car touches something, the game looks up what to do by the other object's collision kind (collide_player):

The car meetsWhat happens
A bump in the roadThe car slows down (bump_slow)
A slippery patchThe car spins round, still moving (bump_spin)
Rubble or wreckage5 or 10 off the armour (bump_damage_5, bump_damage_10); when the armour runs out on the road, the car crashes
Another vehicleThe two shunt each other sideways and the other loses a hit point (shunt)
A person500 points off the score, if the car drives well into them (hit_person)
A rampThe car jumps over it, or, at the end of the coast road with the sub capability, dives into the sea (hit_ramp)
Rough groundA puff of smoke and one off the armour for every pass over it (make_smoke)

Some scenery kills outright: each character has a kind (char_kinds), and driving onto a wall or into deep water ends the life at once, however much armour is left.

04 · Q tokens

Q tokens and the Q-truck

Q tokens lie on the road and the water. Each one driven over adds one to the count on the panel (collect_token). They are spent in the Q-truck, which drives along the coast road. Lining the car up behind it and driving into its back takes the car inside (q_truck_contact, h_q_truck); hitting it anywhere else is just a shunt.

The shop: a column of item icons, the one beside the arrow named SIDE REAR BOLTS, COST 10
Inside the Q-truck. Up and down slide the column of icons; fire buys the item named beside it.

The truck sells nine things (shop_items, shop_buy). Buying one takes its price from the tokens and fills the weapon. Four of them are kept for the sea bed: the lasers, the bolts and the torpedoes are given to the car only when that stage starts (section_3), and the sub capability is what lets the car get there at all.

ItemQ tokensWhat it buys
Sub capability75The dive off the ramp at the end of the coast road
Miniature lasers2531 laser shots, on the sea bed
Pursuit missiles1031 missiles, fired behind the car
Smoke refill5127 puffs of smoke
Side rear bolts10Four shots at a time, on the sea bed
Armour replacement1 to 8, or 11 to 18 below half armourFull armour (show_item works out the price, how)
Intercept missiles1531 missiles that home in on the boss
Torpedoes15Eight shots at a time, on the sea bed
Exit the Q truck0Back to the road

A token count is kept in two bytes of decimal digits, and the panel shows three of them. Your Commodore warned that a player without 75 tokens when the ramp comes "must continue going round in circles": the coast road's list really does start the road again until the car has dived (Maps).5

05 · Weapons

One button, every weapon

Fire launches everything the car has, in a fixed order (fire): a pursuit missile while there are any, then a laser, then an intercept missile when a boss is on the screen to aim at, then the gun straight ahead, except on the speedboat, which has none (enter_water), with one set of extra shots. The extras come from the bought weapons and the pickups: the torpedoes' eight-way burst, or the bolts' four-way, or the two-way, three-way and backward shots that pickups give. Smoke puffs out behind the car while fire is held and the smoke lasts.

The five bars on the panel show what is left, from the left: DAM the armour, AIR the intercept missiles, MIS the torpedoes, three-way shots and pursuit missiles together, SMK the smoke and LAZ the lasers (draw_hud). Pickups on the road and the water refill a weapon or the armour (collect_pickup).

06 · Enemies

A list for every stage

Nothing on the road appears at random. Each stage has a list of three-byte entries: a distance, and which of 32 routines to run when the map reaches it (spawn_from_list, spawn_lists). The routines make obstacles, people, Q tokens, enemy cars, the Q-truck, the boss, ramps, pickups, divers and the warship, and the last of them, number 31, is not an enemy at all: it is a stage event that sends the map back to an earlier row, changes the map, or stops the scroll (script_event).

Enemies are steered by small handlers: some follow one edge of the road or the other, some keep level with the car and fire, one drops other vehicles in front of it, and the divers of the sea bed weave along one of eight paths picked at random (h_shoot_or_turn). Shooting one adds its value to the score (add_score), and the signs that float up show a tenth of it (the signs).

07 · Lives

Five lives, and one more every 100,000

The game starts with five lives (game_start), and every time the hundred-thousands digit of the score changes it gives one more (draw_hud). A lost life shows "bad show james" and starts the stage again from its beginning (after_death). The score, the tokens, the pursuit missiles and the smoke are kept. Everything else goes: every start of a stage clears the intercept missiles, the extra shots, the sea-bed weapons in use, and the sub capability (reset_car), and a death also empties the stores of sea-bed weapons not yet handed over. A car that dies on the coast road after buying the sub capability has to buy it again. The last life shows "game over", and a score good enough goes into the high-score table.