1984 · First Star Software

Boulder Dash

This minisite was contributed by air, 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/boulder-dash with me to Gold.

Rocks fall, creatures prowl, and every cave asks for a quota of diamonds before the exit opens.

01 · The aim

Reach the quota, then the exit

The status line at the top gives, in order, the diamonds needed, the points for each diamond, the diamonds collected, the seconds left, and the score.

Diamonds collected are counted against a quota set for each cave and level, though caves A, D, J and K and the bonus caves need the same number on all five levels ($74C5, $74F6). Reaching it flashes the screen white and starts a sound, and the closed exit, which looks like steel wall, turns into the open flashing exit ($70EC). Walking into the open exit ends the cave. In most caves each diamond is worth more points after the quota is met than before; in caves C, K and L and the bonus caves a diamond after the quota is worth nothing (header bytes 2 and 3). The seconds left are then counted into the score, adding the level number, 1 to 5, for each second ($8BF0).

A man is added whenever the score passes a multiple of 500, up to nine ($73DE, $73D1); a game starts with three ($8ADD). Losing a man sends Rockford to the cave's start again, and with two players the turn passes to the other one if they still have men ($8B05).

02 · Rocks and diamonds

Anything unsupported falls

The cave is a grid of objects, and every pass over it gives each object's routine a turn ($8171). A boulder or diamond with an empty cell below starts to fall. One resting on another boulder, a diamond or a brick wall slips sideways, left first, when the cell beside it and the cell below that are both empty, so heaps do not stand ($76F8, $731F, $71FD).

A falling thing that lands on Rockford or on a creature explodes the three by three cells around the cell below it ($70BA). Rockford can push a boulder sideways into an empty cell, but the push works only one time in four, so a push usually takes several tries ($7543). Digging with the fire button held takes the dirt or diamond next to Rockford without moving him ($75A9).

To stop a thing that has just moved from moving again in the same pass, the game keeps a “handled” twin of each moving object. The scan visits the cells from the top row down, so a boulder that fell into a lower cell would otherwise be stepped again as the scan reached it. The twin has no routine, and a table turns it back as the scan passes ($81AD, $5EE8).

03 · Creatures

Fireflies and butterflies

A firefly follows the wall on its left. It turns into the empty cell on its left side if there is one, else goes straight on, else turns right in place ($7172). A butterfly follows the wall on its right, the same rule mirrored ($7245). Both explode when Rockford or the amoeba is next to them, and they explode when a boulder or diamond falls on them. A firefly leaves empty space, and a butterfly leaves a three by three patch of diamonds, which is the usual way to collect a lot at once ($764F).

04 · The amoeba

A patch that spreads

Where a cave has amoeba, each piece gets a random chance on each pass to spread into an empty or dirt cell next to it, and the chance is low at first and higher once the cave's amoeba timer has run out ($7368, $7478). When the previous pass counted 200 pieces, the whole patch turns into boulders. When it had no room to grow, it turns into diamonds, so walling the amoeba in is a way to harvest it. The test is for a pass with no room after one that had some, so an amoeba walled in from the very start never changes ($813B).

05 · The magic wall

Boulders become diamonds

A diamond or boulder that falls into an active magic wall comes out two cells lower as the other kind if that cell is empty, and is lost if it is not: a falling boulder becomes a diamond and a falling diamond becomes a boulder ($729D, $7745). The wall stays active for the number of seconds in byte 1 of the cave's header. After that it looks like brick again, and a boulder or diamond that falls onto it is destroyed ($7E9F, $7E84). Discoveries has two bugs in the wall.

06 · Levels

Five speeds and five sets of numbers

The five levels of a cave use the same walls. They change the cave's random fill, the number of diamonds needed, and the seconds allowed (see the Maps tab). On the easier levels the game also runs more slowly: a short delay is added after every row of the cave on each pass, by amounts of 12, 6, 3, 1 and 0 for levels 1 to 5 ($8065, $806A).