1987 · Electric Dreams Software

Big Trouble in Little China

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/big-trouble-in-little-china with me to Gold.

Three heroes walk one street together, one enemy at a time comes for them, and their energy runs down whether they fight or not.

01 · The heroes

Three heroes, one in charge

You lead Jack Burton, Wang Chi and Egg Shen along the street from right to left. One of them is the active hero, lit in the panel; the other two walk behind him and take no part in a fight.

Walking moves all three together (walk_left, $1453), and while no enemy is on the screen the street scrolls with them. You can change the active hero at any time with B, C or S, or pass to the next living one with RETURN (switch_hero, $1469). The new hero swaps places with the old, and the portrait's light moves with him (highlight_portrait, $22FB).

Each fights his own way. Jack shoots, but only while he has his gun's bonus. Wang Chi kicks, rolls and slashes, and his sword strokes also need his bonus. Egg Shen never fights hand to hand: the blow test skips him (hero_blow, $1EF1), and he throws his magic instead.

02 · The enemies

One enemy at a time, chosen by where you are

Only one enemy is ever on the street. When one has gone, the next comes in from the left after a delay, and which kind comes depends on how far along the street you are (enemy_control, $127A).

KindLooksBlows to fellIts blows per energy point lostPointsThrows
3a fighter, blue86100no
4with a gun, yellow104400yes
5with a sword, green84200no
6in a broad hat, light grey1642,000no
7a hat and a gun, white1622,000yes
8a hat and a sword, yellow1622,000no
9Lo Pan, green20110,000yes

From the kinds table (enemy_kinds, $1201), the throwers' test ($24E7) and the points table (points_table, $260F). The colour names are the C64's palette's.

The street is cut into 12 sections of 150 columns, counted from the start. Each has a delay and a list of four kinds, and the game picks one of the four at random (spawn_lists, $122C). The first four sections bring only fighters and the odd gunman or swordsman, with a delay of about 14 seconds after an enemy goes; the last bring the men in hats, with a delay of under 3 seconds. The Maps page marks where each section begins.

When an enemy appears the heroes regroup: the controls stop answering while the active hero walks to his fighting place near the right of the screen and the other two line up behind him (regroup, $1D76). They do it again when the enemy has gone.

03 · Fighting

A blow lands on one frame, at one point

A blow counts only when the move is one of the hero's blows, the animation has reached the frame on which that blow lands, and the point the hero strikes with falls inside the enemy's body (hero_blow, $1EF1).

Every figure has a body box for each frame (boxes, $0F17) and every blow a striking point (strike_points, $1005), so a kick aimed too high or thrown from too far misses even when the pictures seem to touch. Each blow that lands plays sound 4 and adds one to the enemy's count; it falls when the count passes its kind's figure. The enemy's blows on the active hero work the same way (enemy_blow, $290A), and every few of them cost him a point of energy.

An enemy you beat falls and vanishes, and its points are added. One that gets past the heroes and walks off the right of the screen takes its points away instead.

04 · Energy

Energy that runs down on its own

Each hero has 41 points of energy, drawn as a bar beside his portrait. Blows take it away, and so does time: a point goes every 512 game loops, about every 50 seconds, whatever the hero is doing (tick_energy, $23F6).

All three heroes' energy runs down at once, the two who are only following too. A hero whose energy reaches 0 falls and stays down (hero_dies, $2419), and the active hero passes to the next living one. When all three have fallen, the game is over.

05 · Bonuses

The score pays for weapons, strength and food

Bonuses are not found on the street: the score brings them. Each time it passes a threshold, a bonus appears at the left of the view, and the active hero takes it by walking into it (place_bonus, $26C6; bonus_update, $21BA).

EveryBonusWho gets itWhat it does
1,000 pointsa weapon: Jack's gun, Wang Chi's sword or Egg Shen's potionthe active hero, or the next living one without his weapon20 uses; lights the weapon box beside the portrait
1,500 pointsfoodthe active hero, if his energy is below 25fills his energy to 41
3,000 pointsa strength potionthe active hero, if he has nonefor 20 blows, each blow counts twice

From bonus_thresholds ($2603) and check_threshold ($2716). The thresholds move on by the same step each time one is passed.

Egg Shen can throw his magic without his potion, but then each throw that hits counts as one blow; with the potion, a hit fells the enemy at once, as Jack's bullets do (shot_hits_enemy, $29D2).

06 · The sewers

The sewer monsters

In the sewers, at 16 places (hazard_x, $20B2), a monster's face rises from the floor as the active hero comes within 16 pixels of it. It cannot be fought. It hurts him, two points of energy, in two of its eight frames, at the top of its rise (items_update, $20D2).

The monster is painted into the street's picture, not drawn with sprites, and the Maps page marks its 16 places.

07 · The end

Lo Pan, and a prize you have to earn

The last 60 columns of the street are the boss's stretch. There the enemy is always Lo Pan: he appears out of the air, floats back and forth above the heroes and throws at them (boss_appear, $1372; enemy_think, $1C43).

The temple at the end of the street, with Lo Pan floating above the heroes
The temple at the end of the street, where Lo Pan floats over the heroes.

Each blow on Lo Pan is counted (boss_hits, $1EED). Near the street's end, once he has had ten, the prize appears, and the hero who takes it wins the game ($21DB). What the game does then is one of its surprises.