Personal Computer News


Millipede

 
Published in Personal Computer News #051

Take on the role of Morris the millipede in this Acorn Electron game.

Introduction

Millipede is a fast arcade style game written for the Acorn Electron by Peter Scott of Bedlington, Northumberland. Since it was written on the Electron, it will run on both the BBC Model B or expanded Model A (at a higher speed to boot).

Gameplay

You play the part of Morris the millipede; the object of the game is simply to keep alive as long as possible and eat as much as you can. Millipedes, as everyone knows, have a voracious appetite. The food comes in the form of green diamonds and bonus crosses. It is not possible to eat the multi-coloured obstacles or your own body. Trying to eat these or the edges of the screen gives Morris terminal indigestion and is not recommended.

Twenty points are awarded for eating a diamond and 75 points for a cross. A bonus life is awarded if you pass level five and there are nine levels in all.

The author gives the following hints on getting a good score: "Only press a key when you want to change direction, as the millipede keeps going regardless. Start on level nine and graduate up through the skill levels as you get better. Don't take too many risks, especially towards the end of the screen as you get bonus points depending on the length you have attained."

Program Notes

9 This line can read ON ERROR GOTO 173
 
15-23 Main game loop
27 Function to read a character on the screen
31 Procedure to pause for a while
35 Print the score in format 00750
36 Print the level in the form 03
43 Main game loop
44 Check the keyboard and change direction accordingly
46 Move the millipede
47 Call screen sense procedure - check if you've hit an obstacle or food
48 Hit a bonus cross
49 Print centipede, update position array, make sound and reduce time
50 If a random condition is met then print cross
51 Check if you are dead, print food if you aren't
56 You are dead
58 If all lives are gone then end the game
60-62 Explode the millipede then erase it
69 Pause until you press a key
74 Completed this screen
77 Work out your length and if greater than 1 add a bonus
82 You're past level 5 - add a life
87 Draw the screen - change all colours to black to hide printing
91 Work out the delay for this screen
92 Randomise the random generator, set up the variables
100 Start the game
106 All your lives are up
107 Rub out the screen
109 Inquest on your performance
110 You are on the high score table
115 Start the printing of the high score table
126 Input your name and rank on the high score table
131 Swap variables for the score table
135 Print instructions in MODE 4
145 Input whether you want sound or not
149 Input the skill level
153 Initialise the game
158 Set the logical colours
159-160 Define the graphics characters
161-164 Set up some variables
165 Define the sound envelopes
166-167 Define colour variables and obstacle rising
173 Error - is it an escapel if it is then go back to the instructions and reset the score
174 Print the error and reset the computer to normal: END.

Peter Scott