1987 · System 3

IK+

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

Sixteen joystick moves, seventy poses stored as the tiles they fill, and computer fighters that block and strike more often after each of the first five bonus rounds.

01 · Moves and poses

Every move, pose by pose

Eight directions, with and without fire, give sixteen moves. Press a direction to see the move it starts, each of its frames drawn from the tiles the game stores, and what each attack is worth.

From the game's tables: the move for each stick position ($1BBB), each move's first frame ($1F41), the pose of each frame ($1F6B) and the ten poses that can land a blow ($2D0A). The directions are for a fighter facing right; facing left, the game reads a mirrored table ($1BDB). Play shows the frames in the script's order, one a step: at the normal speed (key 3) a step is five video frames, a tenth of a second. Each pose is drawn the way draw_sprite_fighter ($3D15) builds a fighter: each of the pose's twelve layout bytes ($7E00) gives a row of tiles a count and a starting column, and the game's offset tables ($3CB3-$3D10) place the tiles' bytes ($7D00, $7DA0, $8280-$BE7F) in the sprite blocks. Rebuilt this way, the two sprite fighters of a game in progress match the bytes in the emulator's sprite memory. Colours are each fighter's sprite colour ($0131) with the two shared multicolours of the recorded frame, light red and black. Facing left, the game mirrors every byte through a table at $0400 and starts each row from the other side. The strip at the bottom holds all 70 poses; the painted numbers are drawn from the game's own digit bytes ($3C11).

The stick is read once a step ($1AFE). When an opponent is close, forward and its two diagonals start move 20 instead, four frames of pose $13, which cannot land a blow ($1BFB). Up and back runs the punch of up and forward after a pose of its own, $3A, and fire and down does the same with the low kick of down; the C64-Wiki calls the first a punch backward with a turn. A move in progress can be broken into only on frames whose flags allow it ($211D).

A sprite fighter is drawn in a box nine tiles wide and twelve tall, three sprites across, but no pose fills the box. Each of the 70 poses keeps only the 8-by-8 tiles it covers, 1,920 tiles in all, 15,360 bytes ($8280-$BE7F), between 15 and 43 tiles each, and the game copies them into sprite memory whenever a fighter changes pose. Stored as full boxes of 108 tiles they would take 60,480 bytes, nearly all of the C64's 64 KB. Six more pose numbers, $46 to $4B, have no tiles at all, and the bonus round and the high-score table put all three fighters in $4B, which draws nothing ($F3CC, $235F). The layouts are the bytes the copy protection keeps scrambled until the original loader has run (Overview, copy protection).

Three poses are drawn over before they are shown. When a fighter lies in one of the falls ($27, $2B, $2F), the game clears the first 56 bytes of the pose's tiles and paints the points of the hit there ($3B5F), which is how the number above a felled fighter moves with the fighter.

02 · Points

Bug: two attacks paint half the points they score

When a fighter goes down, the points of the hit appear in the air above him. For two of the ten attacks the number shown is half the number added to the score.

The points each attack scores ($2D33, $2D3D) beside the number painted for it, drawn from the first digit each attack picks ($2D47, $2D51) and the digit bytes ($3C11). Highlighted rows paint a number that differs from the score.

The painted number comes from a table of its own. While a felled fighter lies on the floor, knock_marks ($3BA3) paints digits into the fallen pose's graphics: “1000”, or one digit followed by “00”. The digit comes from a table that runs alongside the points table, and for attacks 3 and 6 it holds the digit for half the points. The punch on up and forward scores 800 and paints 400; the low kick from a crouch scores 400 and paints 200. Checked in the emulator, the score went up by 800 for every punch that painted 400, and by 400 and 200 for low kicks that painted 200 and 100.

A fallen fighter with 200 painted above him while the red fighter's score reads 400

In the emulator, half a second after a low kick from a crouch felled the blue fighter: 200 hangs over him, and the red fighter's score has gone from 0 to 400.

03 · The computer fighters

How the computer fighters get harder

The computer's fighters improve at each bonus round. A difficulty step, 0 at the start of a game and up by one at each bonus round to at most 5, sets how often they defend and attack and how long anyone stays down.

The difficulty step's entry in each table. A chance is a random byte at or above the table's value. Against moves 2, 5 and 6 a computer fighter tries the first defence chance and, failing it, the second.

Each round the level can override the step ($2998). The table is read by LV AND 7, and LV is kept in binary-coded decimal, so level 10 ($10) reads the same entry as level 8. On the levels that read entry 0, the computer defends every time it has an answer and never attacks by chance: it starts a move only after 48 steps of standing idle ($2ACD).

The level overrides ($2980, $2988), with the first levels that read each entry.