Denary Derrick Game

Lots of fun and education value in this simple number game for children.

Volume 2

Number 1

March 1984

The count down is on!

By KIM WEST and PAUL PASSANT

DENARY Derrick is designed to help young children to get practice with numbers, and in so doing, get used to a computer keyboard.

The program will play two games. The first requires the defender to fire rockets by pressing the key which has the same number as Derrick is carrying.

Once the correct key is depressed a rocket is launched, and can be guided by the Left and Right keys.

It is not very difficult to hit Derrick once the rocket is fired. The aim of the game is to stop him, but the essential tactic is to get the correct number.

Once the first game is mastered the major role of Derrick can be used. In the system of counting we use 10 is very important. The columns in base 10 (denary), represent units, tens of units, tens of tens, and so on.

It can be seen that relating numbers to 10 is very important. The numerical difference between a number and 10 is fundamental in subtraction, and thus in many more complex calculations. This is where Denary Derrick comes in.

The second game is almost identical to the first but rockets are only launched if the key representing the difference between Derrick's number and 10 is pressed.

For example, if Derrick has a 1 the rocket will only be fired if 9 is pressed.

If Derrick is hit he is merely teleported back to the top of the screen where he will collect a different number. A hit scores 10 points.

When Derrick lands for the third time a score card is displayed showing the last score and the total overall. The program then returns to the rule sheet and the player can reselect game one or two.

The program itself has a simple structure. PROCintro gives the idea of the game while PROCdefine sets up tables of data and defines characters.

Then there are three nested REPEAT loops. The outermost, a continuous loop, will rerun the game until BREAK or ESCAPE is pressed.

The second loop allows game one or two to be selected before each go, ending when Derrick has landed for his third time.

Inside this is a loop which keeps Derrick moving down until he is hit or has landed.

PROCbase checks to make sure the launch pad can be moved, and if so prints it in its new position.

Similarly PROCspider does the same for Derrick (note line 400 - VDU48+N% is used to print the required figure on Derrick).

FNhit acts as a shield around Derrick, checking if the rocket has reached him.

All the machine code for printing Derrick is assembled in PROCdefine along with all the data and characters.

To ensure Derrick carries different numbers on subsequent descents PROCinit sets NI% to the old value of N% (Derrick's number), and picks random values of N% until it is different to NI%.

KEY% is the Ascii value of the number which should be pressed. Lines 1530 and 1540 calculate KEY% depending on which version of the game is being played.

Several colours are changed with VDU19, the flash rate increased so Derrick's eyes move faster, and printing is sent to the graphics cursor ready to print Derrick.

PROCupdate briefly returns printing to the text cursor and prints the score.

On landing all colours are changed to blue except one for the printing, PROCland also plays a tune and then resets the colours ready for the next descent.

PROCanother gives the sheet, last score and running total. Finally PROCexplode teleports Derrick with the aid of some interesting machine code which fragments his part of the screen. Denary Derrick is a long listing, but a very educational program for youngsters.