1984 · Epyx

Impossible Mission

This minisite was contributed by chunkypixel, 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/impossible-mission with me to Gold.

Every room of Elvin Atombender's stronghold, drawn from the game's own records, and how a game shuffles them into a new map.

01 · The rooms

All 32 rooms, drawn from their records

Every room in Elvin Atombender's stronghold is a short list of bytes: floors, walls, robots, furniture and lifting platforms.

The room table at $0E70 points at 32 records packed into $0EB0-$1D63. Their format is below.

The game draws a room into a buffer at $C100 while the screen is blanked ($A39C), then reveals it with two black bands that open from the middle of the screen outwards ($A2F7). Furniture comes from a table of 27 types at $232C: a shape, its size and how long it takes to search. The floors alternate between two glyphs, and the walls are one glyph down each side.

02 · The map

Roll a new stronghold and see the map the pocket computer draws

Every game builds its map from scratch when fire is pressed. Each roll here is made by a port of the game's own map builder.

The map is a picture of 102 glyphs, 17 across and 6 down, that the game carves out of solid rock at the start of every game ($B2BD). The 32 rooms are first shuffled within four groups of eight. Then they are dropped one at a time onto a grid of 9 columns and 6 rows, at a random row; a room that lands on a taken square moves down the column, and then on to the next column, until it finds a free one ($B450).

Each room cuts its own outline into the picture with a mask from a table ($B59D). Eight lift shafts, lines two pixels wide, run between the nine columns of the grid, and the rooms hang beside them. Rooms 0 to 15 open onto the shafts on both sides. Rooms 16 to 23 have a door on their left only and rooms 24 to 31 on their right only, so the builder never joins them from the closed side ($B500). Once a room is placed, the builder looks at its neighbour in the row; if it may not join that one, it looks up and down the column for a room it may join and cuts the shaft between the two ($B488).

The pocket computer shows a cell of the map only once the agent has been in it ($B761). Until then it shows glyph $FC, which is solid, so the map fills in as the stronghold is explored. The agent starts at the top of the first shaft, in the map's top-left cell ($B3E9). The striped frame round the map is six glyphs kept with the map code ($B56D). The colour view is ours: the game draws the map in one green. Here the rock is black, each room is filled with its own background colour from its record, and the shafts are the grey behind the lifts in the shaft view. Several rooms are green inside, which is why the rock cannot stay green.

03 · A new stronghold every game

The rooms stay the same; the map, the robots and the hiding places are rolled for each game

Pressing fire at the start runs $7236, which rolls the whole game.

WhatHowRoutine
The mapThe 32 rooms shuffled in four groups of eight and laid out on a 9 × 6 grid joined by lift shafts and corridors$B2BD
The robotsEvery robot gets one of 32 behaviour scripts; rooms with a ball choose from a different 16$B088
The passwordOne of eight words: SWORDFISH, ASPARAGUS, ARTICHOKE, CROCODILE, ALLIGATOR, ALBATROSS, BUTTERFLY, CORMORANT$B0CD
The nine puzzlesEach picture is 18 blocks chosen from 16 patterns at random, with a frame round it$B0F3
The 36 piecesFour per puzzle, cut with masks so that no pair of masks is used twice$B180
Hiding placesThe 36 pieces, nine snooze passwords and nine lift-init passwords go into random pieces of furniture among 128$B26D

The room layouts are fixed. Which room sits where, who patrols it and what is hidden in it change every game. How the pieces are cut is on the How it works tab, and the robots' scripts are there too.

04 · The room record

A room is a list of lists

The game reads a record from the start in one pass, and most of its parts end with a byte of $FF. In the order they are read:

PartBytes
Colours: background, the two shared multicolours, the floor4
Floors: where each segment starts on the screen, and its length3 each, then $FF
Gaps: a place on the screen that is cleared for five rows, and the glyph drawn under them3 each, then $FF
The two places the agent can enter6
Robots: a script number, a row and a column3 each, then $FF
The ball: a script number and a position, or nothing3, or $FF
Sprite colours and which sprites are on5
Lifting platforms: a row, a column and how many platforms are stacked there, then bytes the platform code readsa list per platform, ended by a byte of $80 or more
Furniture: row, column, type and contents4 each, ended by a byte of $80 or more

A new game gives every robot a new script ($B088) and writes new contents into the furniture ($B26D). The overlay on the room browser shows the hiding places of the one game this page's data was taken from.