Popular Computing Weekly 25/11/1982 Page 15

Open Forum

Bubbles On ZX81
By Eve Gorton

This is a 16K ZX81 program. It creates a moving display of "bubbles" (letter
Os) and provides a "pin" (/) with which to burst them. The program can be made
to last a longer time by increasing the value of Z at line 350. At the end of
the game, you are given a score of bubbles burst and a rating. The pin is moved
with the cursor keys 5,6,7 and 8.

Program notes:

Line:

120-150		Gives instructions to start the game.

160-195		Variables: S = number of bubbles burst.
			   z = Counts the trips through the loop and ends game at Z = 120.
			   A & B = position of "pin".
			   C = Sets line for bubbles.

200-210		Prints bubbles and scrolls.

215 to 360  Moves "pin", checks (with line 216) whether pin has scored a hit,
            increases Z by 1 and checks value of Z.

2000-2050	Subroutine indicating a "hit" on a bubble. Adds 1 to variable S.

3000-3070	Ends game by giving final score and rating.



Popular Computing Weekly 18/11/1982 Page 24

Open Forum

Leopard on ZX81
By Eve Gorton

This is a game for the ZX81 with the 16K Ram. The program traps you in the
jungle at midnight with a hungry leopard. You can only see the whites of his
eyes and you have five bullets which are really more like guided missiles. Each
bullet has a life of approximately 15 seconds before it explodes; the leopard
moves about quickly from place to place. Success in catching the leopard
depends to some extent upon luck but also on the skill with which the operator
moves about on the cursor keys. The moving display celebrates your success with
the words "Well done, you are safe" but failure results in a moving display
which gives the disgusting sound of the leopard munching its prey (or at least,
that's the intention!).

Program notes:

Lines:
1       Complaints that the game is too difficult have forced the computer to
        include the REM line, giving details of how to make it easier.

25-90       Gives instructions and explains the game.

200-220     Fills the screen with inverse spaces.

230-270     Sets up the variables:
            X and Y (position of moving bullet}:
            G       (length of time leopard stays in one place):
            Z       (life of bullet):
            M       (number of bullets).

280-290     Prints information showing position of bullet and its number. Sends
            program to subroutine 3000, for position of leopard's eyes.

300-470     Loop for moving bullet; each trip through the loop adds 1 to the
            variables G and Z, checks their values, limits the values of X and Y
            to prevent going off screen and checks the position of XY in relation
            to AB (the position of the leopard).

1000-1110   This subroutine shows the explosion of the bullet, adds one to M
            (number of bullets used), reduces Z (life of bullet) to 0 and
            returns.

3000-3050   Changes the position of the leopard, signified by graphics
            character shifted E printed twice. Returns G to 0, G being the
            measure of the length of time the position of the leopard remains
            static.

4000-4080   When M = 6, all bullets are gone. A moving display showing the
            bullet hitting the leopard, gives the number of bullets used and
            celebrates with a moving display of congratulations!



Popular Computing Weekly 25/11/1982 Page 18

Open Forum

Pigeon Shoot On ZX81
By Eve Gorton

This is a game for the 16K ZX81. A clay pigeon appears from the left or the
right of the screen, at a random height. The "F" key is pressed to fire at the
pigeon and you are told whether your shot has been successful or whether you
have missed. A running total of hits is given at the bottom of the screen,
along with the gun position, which is fixed. The clay pigeon is represented by
a shifted graphics Z and the empty space. You cannot cheat by keeping your
finger on the F key permanently, so don't try!

After 10 pigeons, you are asked whether you want to continue the game or
whether you would like to know your final score. The final score is expressed
as a percentage, rounded down to the nearest whole number.

Program notes:

Line:

100-110     Sets up the variables F (number of shots), P (number of pigeons)
            and S (number of successful hits).

120-160		Gives instructions to start game.

200-210		Sets up screen, indicates number of hits and gun position.

300-330		Decides whether pigeon is left or right.

600-710     Sends a pigeon across the screen from the left, checks the position
            of the pigeon when F is pressed and sends a successful hit to
            subroutine 900 and an unsuccessful hit to subroutine 1000.

800-895     As lines 600 to 710, except pigeon emerges from right hand side of
            screen.

900-995		Subroutine for successful hit:
		900 to 910 Draws exploding clay pigeon.
		915-920 Pause loop.
		930-950 Blanks out exploding clay pigeon.
        960-995 Increases value of S, prints "GOOD SHOT", pauses and returns to 200.

1000-1050	Subroutine for unsuccessful shot:
		1000-1030 Prints "MISSED" pauses, blanks the word out.
		1040 Blanks out the clay pigeon
		1050 Returns to 200.

8000-8510   Subroutine for giving choice of continuing game or going to finish.
            Lines 630 and 830 check the value of P (number of pigeons). If P is
            greater then 10, then the program goes to 8000 giving the choice of
            going on or finishing.

9000-9050	Calculates and prints final score as a percentage.



ZX SATURN (1K ZX-81)
By Richard Aston
from Popular Computing Weekly Vol. 1 No. 32 (25 November 1982), page 19

Here is a great program for a ZX81. I bought your magazine not too long ago,
and in it was a program for a BBC computer. I tried the program and was so
impressed I wrote it for a ZX81.

I call the program ZX Saturn because it draws Saturn with its rings using Plot
and then draws a space ship landing.



