1990 · System 3

Last Ninja Remix

This minisite was contributed by air, 64kramsystem. It’s agent-generated and needs a human editor. Clone https://github.com/gamesexplained/gamesexplained and follow kit/START.md to curate games/c64/last-ninja-remix with me to Gold.

Every figure each level draws, moving as the game moves it: Armakuni walking, fighting, climbing and drowning, every enemy waiting in the level, and the level's own figures, from the boat in Central Park to the spirits of the Final Battle.

Each level carries its own frames and its own animations, so every card below is drawn from the level picked here, by the level's own code.

01 · Armakuni

Eight frames walk him up the screen and eight down it

The walk has two sets of frames, one for facing up the screen and one for facing down it. Mirrored, each set serves the other diagonal, so the four ways he can face need sixteen frames. Every figure of his carries the weapon in his hand.

The walk is not an animation of its own: PlayerDriver ($A422 in Central Park) moves the frame on by one every four ticks while the stick is held, keeping it within its set of eight ($A47C). A tick is CIA 1's timer, 19,457 cycles, about a fiftieth of a second. Fire pressed while he walks, with the stick pointing the way he faces or one step either side of it, starts a somersault instead of a blow (InterpretControls, $A5BD). When he stands still with another weapon picked than the one he holds, he plays the swap, whose fourth frame raises the event that puts the new weapon in his hand ($A577, event 1).

02 · Fighting

Fire and the stick give each weapon its own blows

With fire held, the stick's direction on the screen picks the move. The sword, the staff and the nunchakus share one set of moves; bare hands and the shuriken share another. The How it works tab shows where each blow reaches and how hard it lands.

Each move is a stream of commands in the level's table of 36 (SelectPlayerAnimationForAction, $A600), one for facing up the screen and one for facing down. A command names a frame and how many ticks it stays; the moves end on frame 16 or 17, his standing frames.

Hit

The streams a blow sets off in whoever it lands on, chosen by the blow and the way the victim faces (InstallHitReactionAnimation, $ABCA), drawn here on Armakuni. Enemies reel through the same frames, with their own parts.

03 · Climbing, falling and the water

A wall to climb runs a script of its own

Some walls carry a command that takes Armakuni over when he walks into them: up or down a wall a few pixels at a time, across water, or to his death. Each card is one stream the level's code starts; a climb plays its middle stream again for every 11 pixels of the wall.

04 · The enemies

Every enemy borrows Armakuni's frames and adds a sprite of its own

An enemy shares Armakuni's frames for walking and standing. Its kind adds a sprite of its own to every frame below 49, and its profile picks the weapon it holds. Each card plays the enemy's six actions, its fall when its energy runs out, and its getting up again.

From the five tables that SpawnEnemy reads ($B5C7 in Central Park), one entry in each for every area of the level: the kind and profile, the position, and the delay the enemy's actions take, which every command without a delay of its own keeps (InstallAiActionByDirection, $B346). The actions are its two walks, its two standing frames and the two streams Armakuni swaps weapons with ($B376); the fall is $C3CB or $C3D7, and the getting up $C3E3 or $C3ED.

05 · The level's own figures

Boats, a spider, a panther and a helicopter take the enemy's place

An area without an enemy can give the second actor's slot to something else. The level's code starts its stream when the player enters the area, walks somewhere or uses an object, and the second actor's sprites draw it.

06 · Thrown, and never shown

A thrown star is two images that take turns

The composer swaps a flying star's image each time it draws the thrower's figure again. The level's frames that none of its animations shows close the tab.

The star in flight is drawn into the last sprite of Armakuni's group by ConfigureCompositeSpriteSlot ($BCCC in Central Park), which flips bit 3 of its kind before it looks the image up ($BCD3). Kind 1 is the star of the shuriken, and of an enemy that throws (SpawnProjectile, $B6D9). Item 10, thrown with bare hands, flies as kind 6, or as kind 7 once flag $03EB is set: the same two images in other colours.