Click Here To Go To The Your Computer Archive

Written By John Wilson

Cover Art
Click Here To Enlarge Loading Screen

Loading Screen
Click Here To Enlarge Opening Screen

Opening Screen
Click Here To Enlarge Screenshot

Game Screenshot

Krazy John

John Wilson struggles to control the crazy climber Krazy John and avoid the frenetic fireballs

Krazy John is a program for the BBC Micro Model B or Model A with 32K. The program makes extensive use of BBC Basic and machine code to give a fast arcade-type game. Before I go into how the program works, I will give a brief description of how to play the game.

You take control of Krazy John, the foolhardy climber, and must try to climb the high rise building before your time runs out. You must climb up the ladders and run along the girders, jumping the fireballs that spread along the floor, jump the gaps and collect the yellow blocks on your way to the top. In order to collect a block, you must jump up underneath one. Once this has been done, you are awarded some points, and the final elevator is lowered. To complete the screen, you must collect all the yellow blocks, and climb up the final ladder in the top right hand corner. As the game progresses, more and more fireballs appear, and must be avoided at all costs. To move your man, use the following keys:

Z - Left, X - Right, : - Up, / - Down, RETURN - Jump

As the program uses many of the special features of the BBC Micro, it would be difficult to convert to any other computer. For those of you who are interested in modifying the program, I will give a brief description of what the main parts do.

Program Notes

Lines Description
60 Trap any errors in the program
70-100 Print the title
110-140 Print instructions if required
150-170 Define sound envelopes
180-420 Define user characters
430 Read in machine code
450 Set up main variables for machine code
470 Make cursor invisible
480 Set up main variables for game
490 Print screen
500 Move fireballs
510-520 Have you stepped on a fireball?
530-570 Move your man
610 Define graphics window
620 Update score
630-640 Read character at given co-ordinates
650-780 Print screen
780-800 Print girders
810-920 Print ladders
950-1020 Put gaps in girders
1090-1110 Add yellow blocks to screen
1130-1230 Set up fireballs
1290 Delay loop
1300 Plot man
1310-1330 Move man left
1340-1360 Move man right
1370-1400 Move man up
1410-1430 Move man down
1440-1530 Jump up
1540-1580 Jump to left
1590 Plot man jumping to left
1600 Plot man jumping to right
1610-1650 Jump to right
1660-1680 Move fireballs
1690-1700 Fall down a gap
1710-1790 Collect a yellow block
1800 Go on to next screen
1810-1820 Update bonus timer
1830 Print in double height writing
1840-1890 Your man has died
1900-1930 Print your score and the high score
1940-1970 Play another game if required
2000 Read in machine code from data
2010-2100 Machine code in data
2130 Check for no errors in data
2150-2450 Print instructions


The main variables used in the program are as follows:

A$ General input
move Pointer to machine code to move fireballs
poke Pointer to machine code to Poke fireballs on screen
XP Pointer to x positions of fireballs
YP Pointer to y positions of fireballs
DI Pointer to movement directions of fireballs
S% Your score
W% Screen number
M% Number of men left
CH Chance of a new fireball appearing
XI% Your x position
YI% Your y position
k% Whether a key has been pressed
U% Character to be printed for the man
L% Number of yellow blocks left

To save memory, I have removed all unnecessary spaces from the program, so when typing in the program, do not add extra spaces. I also stored the machine code in pages 9 and 10. These pages are only used occasionally, so it is quite safe for a temporary store of machine code.

I have managed to test the program on both the 0.1 OS and the 1.2 OS, with success, so the program should, hopefully, work on all versions. One final note, I have included a test in line 2130 to trap any errors in the data, before it is too late. I suggest that you include thisline, otherwise the program could be overwritten by the machine code.