Rockford info

Most of the info about Rockford is now in the BDCFF Rockford specification.

Inside this document:

Before Rockford's birth

At the start of each cave, the inbox flashes for a time, then you hear the cracking sound and see the inbox morph through four stages of pre-Rockford before Rockford exists and can be moved (and killed). During this time, the status bar shows the cave number and lives remaining (see Strings). Once Rockford has been "born", the status bar changes to show the number of diamonds needed and collected and so on, and only then does the cave timer begin. However, all the creatures still move around and do their normal stuff during this birth process.

General Algorithm

procedure ScanPreRockford(in positionType currentScanPosition;
                          in integer preRockfordStage;
                          in integer TimeTilBirth) 
# If it's time for Rockford to be born, we morph stages 1-3 to stages 2-4, 
# or morph stage 4 into a real Rockford. Otherwise do nothing.

    ASSERT(TimeTilBirth >= 0);
    ASSERT(preRockfordStage in {1, 2, 3, 4});

    if (TimeTilBirth == 0) then
        if (preRockfordStage <= 3) then
            PlacePreRockford(currentScanPosition, preRockfordStage+1);
endprocedure ScanPreRockford

Rockford's birth and death

An interesting feature of BoulderDash, and an important part of the feel of the game, is that the cave starts before Rockford exists, and continues on going after Rockford has died!

What happens is that when the cave initially starts up, Rockford doesn't yet exist, but still all the creatures will be able to move, boulders fall, explosions happen, etc. At the point where Rockford will appear is a flashing "in box" (functionally equivalent to steel wall; ie it can't be exploded by anything that explodes near by during this time). If any amoeba exists, it is silent. The status bar shows the cave code and number of lives remaining. In the C64 implementation, the "time until birth" varies a bit. Generally, it's four seconds, but it's six seconds if the game is running in two player mode with one joystick. An extra second is given if the game is playing on difficulty level 2 (I don't know why).

When this "time until birth" reaches zero, the flashing "in box" changes into a "pre-Rockford, stage 1" (also functionally equivalent to steel wall). A cracking sound is played, and at that point amoeba sound is enabled. The status bar changes to its normal display (score, number of diamonds required, etc), and the cave timer starts. During the next four scan frames, the "pre-Rockford" morphs into stages 2, 3 and 4, and finally into a real Rockford, who can finally be moved and killed.

When Rockford dies, creatures continue to move, explosions happen, time continues to run out, etc. There is no flag in the code indicating whether or not Rockford has died; the entire game just continues right along (since Rockford is not encountered during the scan routine, the joystick won't be read and the player won't be able to move). If you let it, the game will keep on going until the player runs out of time, at which point the game finally stops.

What happens is that a count is kept of the number of scan frames that have passed without encountering Rockford (which, as it happens, can only happen if Rockford dies). Once 16 scan frames have gone by without Rockford being seen, then if the player hits fire, the cave finishes. This 16 frame threshold is used to prevent the problem that the player might hit fire before realising that they have died.

Bonus lives

A bonus life is earned every 500 points and at the start of every intermission, unless the player already has nine lives in which case no bonus life is awarded. When a bonus life is awarded, the space characters flicker with some horiontal lines in order to indicate that a bonus life has been awarded; there is no sound played.

General Algorithm

procedure CheckForBonusLife() 
# Check to see whether the score has passed a 500 or a 1000 point boundary 
# (in other words, you get a bonus life every 500 points).

    if (CurrentPlayerData.score >= CurrentPlayerData.nextBonusLifeScore) then
        CurrentPlayerData.nextBonusLifeScore += 500;
endprocedure CheckForBonusLife


procedure AddLife()

    ASSERT(CurrentPlayerData.lives <= 9);

    if (CurrentPlayerData.lives < 9) then
        Make space objects flash to indicate bonus life;
endprocedure AddLife

Collecting diamonds

Enough Diamonds collected

When Rockford has collected enough diamonds, the background of the screen (normally black) flashes white for 5 ticks and the crack sound is played. When the (inactive) outbox is come across during the next scan, it is morphed into an active outbox. When Rockford has collected enough diamonds to be able to exit the cave, the background of the screen (normally black) flashes white for 5 ticks and the crack sound is played. When the (inactive) outbox is come across during the next scan, it is changed into an active outbox.

Falling diamonds

Rockford is able to collect diamonds while they are falling. In particular, it is useful to hold down the fire button and collect diamonds as they fall past.

General Algorithm

procedure ScanPreOutBox(in positionType currentScanPosition;
                        in Boolean GotEnoughDiamonds) 
# If Rockford has collected enough diamonds, we can change the 
# pre-out box (ie an out box which has not yet been activated) 
# into a flashing out box.

    if (GotEnoughDiamonds) then
endprocedure ScanPreOutBox


procedure PickUpDiamond() 
# Player has picked up a diamond. Increase their score, increase their number 
# of diamonds collected, and check whether they have enough diamonds now.

    CurrentPlayerData.score += CurrentPlayerData.currentDiamondValue;
endprocedure PickUpDiamond


procedure CheckEnoughDiamonds()
    if (CurrentPlayerData.diamondsCollected == CaveData.diamondsNeeded) then
        CurrentPlayerData.gotEnoughDiamonds := true;
        CurrentPlayerData.currentDiamondValue := CaveData.extraDiamondValue;
        Update statusbar;
        Request screen to flash white to indicate got enough diamonds;
endprocedure CheckEnoughDiamonds

Web page design by Peter Broadribb <>