1987 · Incentive Software

Driller

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

Every area of the moon and the buildings on it, each seen from its entrances as the game draws it, with its plan, its gas field and what each object does when shot or touched.

01 · The sectors

The moon's sectors, as their edges join them

Walk off the side of a sector and the next one loads, with the probe at its opposite edge. Eight sectors make a ring round the moon's middle: walk east from Amethyst through eight of them and you are back where you started.

Each sector where its edges put it, from Amethyst, where the game starts. An edge is a rectangle along the side of the area (objects 51 to 54) whose script goes to the next area with no entrance; set_start then keeps the probe's place and moves it to the opposite edge. Ruby, at the left end of the middle row, and Malachite, at the right, are neighbours too. The places below have no edges: the probe reaches them through doors, or, for Mitral, by walking off the moon, and 127 is the scene the game shows when it ends.

The two ends of the map are closed at the start. Niccolite's south edge and Opal's both lead into Diamond, and each has a wall 62 cells high along it; Diamond's only edge leads back north to Opal. Trachyte, at the top, is reached only from Obsidian, whose north edge starts hidden behind a wall. Edges that lead nowhere set flag 21 instead, and a script that runs in every area then takes the probe to Mitral (below).

02 · Every area

Each area from its entrances

Pick an area, then an entrance. The view is drawn by the same routines the Play tab runs.

shapes, darker when tallera door to another areaa sensoran entrance and its headingthe gas: a strike, and a safe sector insidehidden at the start

The view is the probe's at the entrance, walking, at the start of a game: new_game, then set_start, draw_view and copy_view from the Play tab's port, run on the memory the tape loads. The plan looks down on the area's 128 by 128 cells, x to the right and z up, each shape's footprint from its record. The gas diamonds are where a rig strikes gas at all and where it makes the sector safe: drill takes 100 less the rig's distance from the field's centre, across plus along, times 100 over the field's size, and 50 or more is safe.

What the objects do

03 · The format

An area's record

The game's data starts at $CF3E with the count of areas, 29, and the table at $D006 holds where each record is. load_area searches the records for the area's number, so they need not be in order, and they are not: the sectors come in the order 1, 2, 3, 8, 14 to 18, then the Stores and the complexes, then 5, 4, 6 and the rest.

ByteWhat it holds
+0whether the view is cleared before it is drawn: with 0, what no face covers keeps the last picture
+1the count of objects
+2the area's number, which scripts and doors use
+3where the area's own scripts are, from the record's start
+5the scale: the probe's step, height, climb and fall are multiplied by it
+6the border, the colour a sensor's shot flashes, and the view's paper and ink
+10the gas field: its centre, x and z, and its size
+13the name, 12 characters
+25the objects, each as long as its byte +8 says

An object starts with its type (bit 7 set when it starts hidden, bit 6 while it is hidden), its corner in cells (x, height, z), its size, its number and its length; then the colours of its faces and, for a line or a flat polygon, its points. Whatever follows, up to the length, is its script. An entrance is an object of type 0 that is never drawn: in place of a size it holds the pitch, heading and roll the probe comes in with. A sensor (type 2) holds how often it fires and how far it reaches.

04 · The scripts

The scripts that join the areas

Five scripts at $D04C run after every pass that moved anything, wherever the probe is. They hold three of the game's surprises, and two areas' own scripts hold the way to the last sector.