Fast moving action
on the Amstrad with
MK Mostowys.
WAR
OF THE WORMS
IN THIS GAME you must guide a snake around the screen using a joystick or keys
of your own choice. The object is to collect all the yellow bags of gold and,
if possible, the white goblets that appear at random intervals. On no account
must you try to collect a red goblet.
You are awarded 10 points for every bag collected and one hundred points for
a white goblet. If you manage a high enough score you will be invited to enter
it in the high score table provided.
If you ever manage to reach screen 15 and onwards things get rather
difficult.
The program is reasonably short and the breakdown of lines give a good idea
of how it works. The program could be shortened slightly by substituting
various CHR$ references with control codes entered direct.
Do not try to run the program until you have typed in and Saved the entire
program on tape. The reason being that the call BB03 statement used within the
program not only flushes the keyboard buffer as required but also partially
disables the Escape key as well. The only way to stop the program once it is
running is to wait until you are confronted with the high score table, then
ignore the two options given i.e., C to continue and O for key options, and
press E instead.
60-220 Main routine. Scans keyboard or joystick. Checks for collisions. Print
snake. Decides whether or not to place goblet.
230-240 Increments score and produces sound when goblet collected. Also
increases tail length.
250-260 Increments score and produces sound when goblet collected. Also
increases tail length.
270-280 Produces sound and decrements lives when wall, snake or red goblet are
hit.
290 Blanks out goblet after delay.
300-310 Places goblet of a random colour at a random position on the screen.
320-500 High score routine.
510 Decrements time scale and checks for end.
520-630 Prints screen.
Line 540 prints length of wall.
Line 550 prints number of columns.
640 Routine to print columns.
650-780 Gives keyboard or joystick options and allows user-defined keys.
790-820 Sets up user-defined symbols.
830 Defines three strings to print column.
850 Sets variables, envelopes, and dimension arrays for tail position.
860-960 Sets high scores.
970 Defines functions to check screen positions.