1984 · Datasoft

Bruce Lee

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/bruce-lee with me to Gold.

Bruce and Yamo are each two sprites laid one over the other, a coloured one and a black one. Every pose, facing either way, is a frame of its own.

The frames

Every pose the three fighters are drawn with

The game keeps 210 frames as rows of one-bit pixels, 8 or 16 pixels wide (frame_rows, $5D91), with a table each for their addresses, heights, widths, and colours ($59BD, $5B61, $5CBF, $5C33). Bruce’s frames start at 0, Yamo’s at $46, and the Ninja’s at $8C (frame_offsets, $59A5).

Drawn from the game’s own bytes, four screen pixels to one of the frame’s, on the grey of the room backgrounds. Each caption names the frames, their size in pixels, and their colours.

Bruce and Yamo each use two hardware sprites for one pose: frames n and n + 1, laid one over the other, one in their colour, yellow for Bruce and green for Yamo, and the other in black (build_sprites, $2584). Each frame is one bit a pixel, copied straight into its sprite, so the two colours come from the two sprites. The Ninja is one sprite, always drawn black (frame_address, $2719).

Nothing is mirrored. A fighter facing left and the same fighter facing right are separate frames, which is why each actor needs 70. copy_shape ($26A0) copies a frame’s rows into a sprite, into one of two buffers that take turns ($8180-$83FF), so a sprite is never shown half drawn.

Outlines

A second copy of every frame, for touching the scenery

At start-up the game unpacks every pair of frames into an outline 24 pixels wide with each pixel doubled to the width of a multicolour pixel, and stores them at $9000-$9FBF and $C000-$CA7F (build_body_shapes, $513B). The 105 pairs share 71 places.

Those outlines are what the game lays over the room to find what each fighter is standing on or holding. The Discoveries tab explains the test.

Rooms

Packed screens, coloured in bands

Each room is a packed screen of 440 cells, eleven rows of 40, each cell two characters tall (room_screens, $68F9, decoded at $0AD5). A byte with bit 7 set is followed by that many bytes to copy as they are, and a byte without it repeats the next byte that many times; a zero ends the room.

The scenery is in multicolour characters, four colours to a cell. To get more colours down the screen, a raster interrupt changes the background and the two shared colours at a list of lines for each room (irq_colour_band, $4982, with the lists through room_raster_pointers, $4833).

The Wizard’s fireballs are sprites 6 and 7, and they have no fixed shape: a fireball is random bytes ANDed with one of four masks (fireball_masks, $4322). Each falls five lines a frame and drifts towards Bruce’s column (wizard_fireballs, $4133).

The lanterns’ flames flicker because their characters are redrawn: every 1 to 15 frames, at random, three lantern characters get new flame rows (flicker_lanterns, $40BC).