1987 · Electric Dreams Software

Explorer

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

A jungle planet of four billion places, with nine pieces of a spaceship hidden in it. The whole landscape comes out of forty bytes of numbers and one 256-byte line of heights, worked out afresh every time the screen is drawn.

01 · The game

Stranded on an emerald planet

The title screen: EXPLORER over a green planet, with the credits for the Ramjam Corporation and Electric Dreams
The title screen, a picture the loader puts in place before the game starts.
The view on the ground: bamboo, palms and a carved totem under a blue sky, with the compass reading 0 at the top right
The view on the ground, facing north. The number at the top right is the compass.

Your spaceship has broken up over a jungle planet, and you have survived the landing. Nine fragments of the craft lie scattered across the planet. You win by bringing all nine together in one spot and standing on it.

You have a jet pack, a sonar that finds the nearest fragment, nine radio beacons, nine drones that carry a fragment to a beacon, a compass, and a laser gun for the robot bugs that roam the jungle. Every action costs energy. In the air you see the planet from above, as a map that scrolls north, south, east and west. On the ground you see the jungle in front of you, and you walk and turn. Strange striped patches in the jungle are doorways: step into one, type the name of any place, and it takes you there.

Explorer was written by Graham Relf for the ZX Spectrum, with graphics by Simon Dunstan of the Ramjam Corporation, and converted to the Commodore 64. The conversion keeps the Spectrum's colour scheme inside every picture, as a later section shows.

02 · The reviews

Sold on forty billion places, Explorer scored 13 %

The instructions promised a planet too big to map. The reviewers found the same jungle wherever they looked.

Explorer was sold on its size. Its instructions say that the last scan of the planet "revealed that the planet consisted of forty billion mappable locations. In nine of them are fragments of your craft."

Zzap!64 reviewed the Commodore 64 release in April 1987 and gave it 13 %. Its three reviewers made the same complaint: the planet is enormous, and all of it looks alike. Steve Jarratt called the game "basically a programming exercise designed to impress rather than stimulate – but it does neither." Julian Rignall wrote: "Locating the nine inconsequential objects within the 40 billion virtually identical screens is unbelievably tedious, monotonous, pointless, fruitless and rubbish." He finished: "If you really want to do some exploring why not buy a rail or bus ticket?" Paul Sumner called it "a computer simulation of searching for a needle in a haystack."

RatingScoreThe verdict
Presentation42 %"Confusing, awkward, and frustratingly slow."
Graphics64 %"Attractive, but repetitive."
Sound10 %"Very little, and what's there is poor."
Hookability27 %"Irritating and far from addictive."
Lastability7 %"Absolutely nothing stimulating or worthwhile to return to."
Value6 %"Represents an abysmal investment for ten pounds."
Overall13 %"In this case, big isn't remotely beautiful – not one single redeeming feature to write home about."

The ratings in Zzap!64 issue 24, April 1987, page 106. The review gives the price as £9.99 on cassette and £14.99 on disk.

Crash, the Spectrum magazine from the same publisher, had reviewed the Spectrum original a month earlier and given it 32 %. One of its reviewers asked: "Do they really think that some poor player is actually going to trudge around forty billion locations?" (Crash issue 38, March 1987, page 101)

In Zzap!64, Paul Sumner disputed the number itself: "it appears to me to be 40 boring locations repeated a billion times." The code agrees with his count of the scenery. The jungle in every view on the ground is put together from 40 pictures, chosen by the kind of ground and a few random numbers (a later section draws them, with three more that the game never uses). The billions fall short of the promise as well. A position is two 16-bit numbers, one east and one north, so the planet has 65,536 × 65,536 places: about 4.3 billion, a little over a tenth of the forty billion in the instructions.

03 · Walk the planet

The map and the jungle, drawn by the game's own code

Turn, walk, fly up and down, or jump to a fragment. Both pictures are made from the bytes in the Source tab.

From above: the game's map, 20 by 12 cells. The white square is you. Click a cell to read its ground, or double-click to walk there.
On the ground, facing the way the compass says.
Loading the listing…

How it was checked. The map is a JavaScript copy of the game's own map routine (draw_map at $2B25) and its ground routine (terrain_at at $32D6). The ground view is the game's own routine (draw_ground_view at $1258) run on a model of the 6502 processor, on the bytes in the listing. At "the landing place" in the jump list, facing north, both pictures match the emulator's screen exactly: 0 pixels of the map's 61,440 differ, and 0 of the ground view's 64,000. The JavaScript copy of the ground routine gives the game's answer at 200,072 points tested (test_terrain.js).

A step is 16 units along the compass bearing, and the planet is 65,536 units across in each direction, so it wraps round: walk far enough east and you come back from the west. The map from above shows one cell for every 16 units at the lower height and one for every 32 at the higher. On the ground, the game draws the 24 cells round you. It draws the 16 cells two steps away first, then the 8 next to you on top of them, each at its compass direction on a 64-column horizon of which 40 columns are on the screen.

The game refuses a step when the top of a near tree trunk fills the middle of the view. It tests one character cell, row 3 and column 19 of the screen, for the colour of black on yellow (step_forward at $162D), and the step button here does the same.

04 · A planet from forty bytes

Four layers of the same line of heights

Nothing about the landscape is stored. Every time a cell is drawn, the game works out what grows there.

The terrain profile at $4700: 256 heights from 2 to 138.

The four layers over 128 by 128 cells round you (the white square is the map above). Bright means a high sum. A coloured cell passes that layer's test, and the colours are the ones the next paragraphs use.

Click a cell on the map above to see its four sums.

The method is Graham Relf's, from his earlier orienteering game The Forest. It starts from a single line of 256 heights, the profile. To find the ground at a point east x and north y, the game multiplies x and y by two small numbers, adds the products, and keeps the lowest 8 bits of the result: a number from 0 to 255 that says where to look along the profile. Doing this along five different directions and adding the five heights gives one layer. One direction alone would make parallel stripes. Five at different angles add up to blotches, as the layer pictures below the profile show.

The game works out four layers like this, each with its own five pairs of numbers. All forty numbers are the table terrain_layers at $341B, and the routine is terrain_at at $32D6. The layers decide the ground in order:

TestGroundOn the mapCells
Layer 1 is 204 or lesswaterpale blue, with ripples14.3 %
otherwise, layer 2 is 150 or lesskind 8open ground with huts3.3 %
otherwise, layers 3 and 4 are both 255 or lesskind 6open ground8.6 %
only layer 3 is 255 or lesskind 4open ground18.0 %
only layer 4 is 255 or lesskind 2jungle18.1 %
neitherkind 0jungle37.9 %

Shares from 400,000 cells drawn at random across the planet.

The first layer's sum is also the ground's height, and two bits of the last layer's sum pick one of four map tiles for the cell (map_tiles at $27F4). A landing is safe on kinds 4, 6 and 8, about 30 % of the planet. Coming down on jungle or water is a crash, which costs 500 energy and sends you to a doorway's "Name the spot you wish to go to" (crash at $2C03).

05 · What grows where

The jungle is a chain of pictures

The ground's kind picks a list of pictures. Each picture drawn picks the list for the next one.

The 43 pictures of the ground view, each drawn by the game's own routine (draw_image at $2F99) from its record in object_records at $363F. Any of them can also be drawn mirrored. Objects 20, 41 and 42 are never drawn in play: Discoveries has them.

For each of the 24 cells round you, the game picks a list of objects by the cell's kind of ground, two bits of its last layer's sum, and whether the cell is near or far (scenery_list_for at $3443). Its random numbers choose one object from the list, and the game draws it at the cell's place on the horizon. Every object's record names the list the next object comes from, so each object decides which objects can join it in the cell. After three objects the chain takes the first entry of each list, and an entry of 0 ends it.

Before drawing a cell, the game sets those random numbers from the cell's height (draw_scenery_at at $10FF), so a cell grows the same jungle every time it is drawn. Walk away and come back, and every tree is where it was.

A picture is a run of character cells. Each cell is a Spectrum colour byte and eight bytes of pixels, followed by a byte that says how far to move to the next cell. A colour byte of $80 or more draws the cell's pixels over whatever is already there, behind a mask, so that trunks stand in front of the trees further back. The masks are tables at $4400 and $4500. A colour byte of $28 leaves the colour that is already there, which lets a tree's black outline sit on the blue sky.

06 · Spectrum colours on a Commodore 64

Every picture still carries Spectrum colours

Click a swatch.

Each swatch is one Spectrum colour byte: the left half as a Spectrum shows it, the right half as the Commodore 64 draws it, through the table attr_colours at $2F09. Rows are the background colour, normal and then bright; columns are the foreground colour. The swatch with a frame is $72.

The ZX Spectrum colours its screen in blocks of 8 by 8 pixels, each with one byte: three bits for the foreground colour ("ink"), three for the background ("paper"), one for brightness and one for flashing. The Commodore 64's hires bitmap also colours blocks of 8 by 8 pixels, with one byte holding two of its 16 colours. So the conversion keeps every Spectrum picture as it was and changes each colour byte as it draws (attr_to_colour at $2EFE), through a table of 128 entries. The C64 has no flashing, so the flash bit is dropped, and the game uses it instead to mean "draw this cell behind a mask".

The Spectrum's eight colours become the C64's black, blue, red, purple, green, cyan, yellow and white. Bright black, blue, red, magenta, green, cyan, yellow and white become black, light blue, light red, brown, light green, grey, orange and light grey. One entry breaks the pattern: $72, bright red on yellow, becomes light red on red. That is the doorway's colour, and the game finds a doorway by looking for it.

07 · Instruments and energy

What everything costs

The menu window: Objects, Beacons, Weapons, Energy 39985, Score 0
Any key that is not a move opens the menu.
Fix 3 nearest: beacon 5 at 1000 metres and 1 degree, beacon 3 at 840 metres and 252 degrees, beacon 0 at 800 metres and 56 degrees
Fix 3 nearest, with three beacons down.
ActionEnergyRoutine
Start40,000zp_image $0C92
Each view on the ground (a step, a turn, a landing)−15draw_ground_view $1258
Take off−100take_off $1728
Fly higher−50go_up $2879
Fire the laser−500fire_laser $2437
Crash, if there is that much−500crash $2C03
Send a fragment to a beacon−1,000send_to_beacon $1A53
Run outset to 2,000energy_gone $231A

Flying over the map, the sonar, the beacons and the doorways cost nothing, though the game works out a charge or a refill for every doorway trip and then drops it (Discoveries). Running out of energy is not the end: the game says "Energy gone", gives you 2,000, and asks where you want to go, as a doorway does. There is no game over.

The sonar ("Echo nearest") finds the nearest fragment, measuring distance as the distance east plus the distance north. Under 1,280 units, an echo comes back after a delay of a quarter of the distance, and the window gives its bearing. Further away, it still gives the bearing, with "Out of range" (echo_nearest at $19A8). For anything south-west of you, the bearing is wrong (Discoveries). The beacons are dropped where you stand, and "Fix 3 nearest" lists the three nearest with their distances and bearings, so you can find your way between them (fix_beacons at $1BFD). A drone carries the fragment you are standing on to any beacon less than 16,384 units away: the fragment's position becomes the beacon's (send_to_beacon at $1A53).

The bugs come one at a time. Each new view on the ground has a chance of (score + 1) in 256 of bringing one, where the score is the number of fragments you have seen, so they come more often as you do well (maybe_new_bug at $1436). A bug locks you into the weapons mode until you shoot it, and each shot costs 500.

08 · Doorways

Every name is a place

A doorway: a red and pink striped patch in the middle of the jungle
A doorway one step away.
The screen filled with red and yellow stripes, with the line Name the spot you wish to go to: and the name HOME typed under it
The prompt, with HOME typed.

A JavaScript copy of the game's sums (name_destination at $0E23), checked against the game's own code on 20,007 names (test_names.js). In the emulator, HOME arrived at 48,356 east and 48,609 north. "Go there" moves the walk above to the place.

A doorway is a cell whose last layer adds up to a number whose lowest byte is 12, about one cell in 260. Two in three are in jungle, and the rest on open ground. When a doorway is within two cells, the game draws its striped patch in front of you, at the middle of the bottom of the view (scenery_doorway at $1183). On your next step it checks the middle of the view for the doorway's colour, and if it is there, it asks "Enter doorway" (after_step at $16B6).

Press E and the screen fills with stripes and asks you to name a place. The game turns the name into a position with two sums. The east position starts at 0, and for each letter it adds the letter's code and then turns the 16-bit number five places to the left, the bits that fall off the top coming back in at the bottom. The north position does the same over the name read backwards, from the end of the name to its second letter. The sums are the same in every game, so a name always leads to the same place, and a well-chosen name puts you one step from a fragment (Discoveries).

09 · The end

Nine fragments in one cell

The jungle with a window reading WOW, YOU DID IT!
The last screen of the game.
The sonar's window: 178 degrees, Out of range
The sonar's answer for a fragment 1,344 units away.

After every step, the game checks whether all nine fragments lie on the cell you are standing in (check_win at $0DBA). Fragments start far apart, so the way to bring them together is to drop a beacon, send every fragment to it with the drones, and then walk to the beacon. When the last check passes, a window says "WOW, YOU DID IT!" and the program stops: its last instruction is a jump to itself ($0E0E).

The score in the menu is the number of different fragments you have seen. It counts each one once, and the "Found:" line in the objects menu shows their numbers.