1988 · Elite Systems

Ikari Warriors: the whole road

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/ikari-warriors with me to Gold.

The game has one level: a road 1,891 rows long, built a row at a time by a script. This page runs the game's own drawing code over that script and shows every row.

01 · The map

From the wrecked plane to Colonel Cook

The road starts at the bottom and runs up. Drag the slider or scroll inside the picture to walk it. The numbers on the left are route rows, eight pixels each, counted from the first row a game draws.

Drawn by the game's draw_map_row on the kit's 6502, from the bytes of the Source tab.

The labels on the right mark what the script does at that row, each with a word as well as a colour: TILES where it loads a new set of characters (26 times), and COPTER where it sends a helicopter down the screen (21 times). The last two marks are the END: the figures of the ending at row 1,878, and the end of the game at row 1,890. The flat grey ground there is the script's last fill, plain characters with no earth or grass under the final scene.

02 · The script

A road written as a script

The road is not stored as a picture. The game keeps a script at map_script, 1,302 bytes long, that draw_map_row runs one step each time the screen needs a new row (map_script_step). A step either waits a number of rows or does something:

Under the objects lies the ground, earth and grass copied from a 64-row pattern at ground_pattern, kept in the memory under the input and output chips. Each new row is written into a window of 64 rows that wraps round (map_row_ptrs), and the 22 rows on screen are copied out of it as the view scrolls (copy_play_area).

The picture above is the game's own code at work, so it is the road as the game builds it. These are the same rows the game draws in play.6

03 · Soldiers

Where the soldiers wait

The soldiers and mines are not in the map script. They come from a separate list at route_list, 369 entries of a scroll position and either a group of soldiers from enemy_groups or the column of a mine. The twelve empty tanks come from tank_list. The map above shows the scenery only; the Gameplay page explains how the list is read.