Popular Computing Weekly 23/09/1982 Pages 19 & 20

Open Forum

Alien Invaders On ZX81
By Ian Benyon

Alien Invaders is a fast, addictive moving graphics game for the expanded ZX81
in which you are under siege from invading craft from outer space. As they move
across the screen you have to try and shoot them down using your laser bases
which you can move to the left and right using the 2 and 4 keys.

To fire press the 9 key. Try and hit them as quickly as possible as you'll
score more if you do. But watch out thought, the aliens can drop bombs as well.

These are the main sections of the program and their purposes:

Lines 1-31	Variables
Lines 50-94	Set up screen
Lines 100-160	Main program routine
Lines 200-240	Alien crossed screen
Lines 300-390	Firing routine
Lines 400-470	Direct hit on alien
Lines 1000-1200	Your base has been hit
Lines 1500-1550 End of Game

Explanation of variables:

K	-Best score
C	-Number of lives
S	-Score
A & B	-Position of alien
X & Y	-Your position


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


EQUATIONS (1K ZX-81)
By Tim Gilberts
from Popular Computing Weekly Vol. 1 No. 20 (2 September 1982), page 17

This program is for those who haven't quite mastered the solving of:

    ax^2 + bx + c = 0

The program will fit into 1K quite easily but by using a machine code call to
the scroll routine as part of a print statement, a good whole screen display is
achieved.


Program Notes:

Line 10:          assigns the address of the scroll routine to the variable S.
Lines 20-80:      print an introduction and input the values of a, b and c.
Lines 90 and 100: check if it is possible to solve the equation without complex
                  numbers and if not restart the program with a request for
                  another set of values.
Line 110 solves the equation using:
    x = [-b+SQR(b^2-4ac)]/2a
and:
    x = [-b-SQR(b^2-4ac)]/2a
Lines 150 and 160: provide an automatic start up on Loading.


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



KONG'S REVENGE
by Jonathan Flint
from Popular Computing Weekly 23rd September 1982


This is an arcade style game for the Spectrum. The idea is to climb a
layout of girders safely while collecting as many points as possible
(as shown by your score at the top of the screen). Points are gained
by taking the white parasols which are found at various locations.

For reasons which may escape you, a large gorilla is throwing barrels
at you as you climb. These barrels should be avoided at all costs. If
there is sufficient head room, you may jump over them as they pass.
Your character (a little blue man) is moved using the following keys:

	z	LEFT
	c	RIGHT
	x	DOWN
	s	UP

Caps Shift together with one of the above keys enables your man to
jump in the appropriate direction; ie. Caps Shift z jumps you to the
left. Jumps are required over barrels and across gaps in girders.
Beware the x key - it moves you down whether or not there is a ladder
beneath to support you.

The game has four stages. You receive a large bonus when progressing
to each new stage. To reach a new stage you must climb to the highest
point on the screen and then simply jump into thin air.

The first three levels can always be scaled if you choose your route
carefully, but the fourth (with no ladders) is sometimes impossible.
You may have to go out of your way to pick up a parasol but this must
be done before a barrel rolls over them. If this happens the parasols
will lose their Brightness and become worthless.

The program starts with a series of DATA statements. Lines 11, 12,
13,15 and 16, define the user defined graphics used in the game. When
entering the program from the keyboard, you should RUN lines 1 to 90
as soon as they have been written in order to define the graphics.

These graphics and the lines in which they appear are:

Graphic:	Lines:
"p"		255,550,560,570		(Parasols)
"d"		1100,1126,2005		(Man)
		2030,2120,5010
		5030,5050,5060
"h"		5280			(Ladder)
"f" and "g"	5180			(Gorilla)

Lines 5190, 5200, 5220 use standard mosaic graphics.

The remaining DATA statements define the girder layouts and the ladder
locations used in stages two and three. Lines 100 to 570 use this data
to draw levels. The main playing loop lies between lines 1100 and 1500
and contains a minimum number of lines to keep things fairly fast.

Since the SCREEN$ function does not recognise user defined graphics or
high resolution pictures, I have used the ATTR function where
necessary to identify items on screen by their colour and Brightness
status. Thus if you wish to add anything further to the game bear in
mind:

(a) The program as it stands will only stop
    and think about something it meets on
    screen if it is BRIGHT.
(b) You cannot jump through anything
    which is red.
(c) You can stand on anything except an
    empty space.

When satisfactorily entered simply RUN the game. You may be killed by
hitting a barrel or by falling too great a distance. Press "r" for
another game.


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


GOLF
by Simon Goodman 
from Popular Computing Weekly 23rd September 1982


Golf, as the name implies, is a game which places you on a golf course
generated by the computer. Your task is to get round the course in as
few shots as possible by missing the bunkers, dodging the rivers and
the trees, keeping out of the rough and putting accurately when you
get close to the flag.

When the program is on the computer type RUN to start and enter the
number of holes that you wish to play. After a short pause you will be
asked to enter your handicap (between 1 and 3). If you enter your
handicap as 1 then you will be able to hit the ball further but you
will also have longer holes and you will also have a smaller par. If
you choose a handicap of 3 you will have slightly shorter holes and
you will have a larger par but you will not be able to hit the ball as
far.

When you have entered your handicap the hole will be displayed using
the following symbols: the flashing T on the left is the Tee; the dark
green (a chess board character of black and green) is the rough and
landing in this will decrease the strength of your shot considerably.

The light green in the centre (a chess board character of cyan and
green) is the fairway; the light green square on the right is the
green with the flag in the centre; the black objects dotted about are
trees and hitting one of these costs a penalty shot.

The yellow and black characters are bunkers and landing in one of
these causes the strength of your shot to be cut considerably.

The blue characters are lakes and landing in one of these costs a
penalty shot. The distance across the screen is displayed in yards in
the top left. The par for the hole is displayed in the centre at the
top and the number of shots you have taken is at the top on the right
(if you have had any).

You are then asked to enter the strength of your shot (in yards), the
direction of your shot (this is like a clock, eg. 12 is up, 3 is
right, 6 is down, etc; decimals, eg. 1.5, are allowed); the computer
then works out where your shot landed.


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


UNDER PRESSURE
by Simon Lane
from Popular Computing Weekly 2nd September 1982


You are a marine engineer, working on the Yoshima oil rig in the North
Sea. Your main task is to carry out underwater inspection and
maintenance of the pipe lines carrying the oil from the rig to a
refinery in Scotland.

Instruments monitoring the oil flow indicate that the main pipe line
has sprung a leak, about 1000 metres away from the Yoshima rig. You
are despatched in a propeller-driven diving bell to investigate the
leak.

Cruising just above the pipe line, looking for the tell-tale black
wisps that denote a leak, you suddenly become aware of a strong smell
of smoke. Turning round you see that your engine has caught fire.
Grabbing the chemical fire extinguisher from under your seat, you
douse the engine in a mass of foam.

With the fire out, the immediate danger is over, but the engine is a
twisted heap of burnt-out wire and metal. You are trapped on the
sea-bed.

Fortunately, the diving bell is equipped with an aqualung and a
wet-suit. However, as you are putting on the aqualung you notice that
the air cylinder seems strangely light. On checking the cylinder's
gauge, you discover that it is virtually empty.

With the air inside the diving bell starting to become stale, you have
few choices. Entering the air lock, you flood it with water and open
the outer hatch. You must attempt to swim to the surface before your
air runs out. But, if you rise too fast you will suffer from "the
bends" and die from decompression.

When you have loaded and run the program, a man in a wet-suit will
appear on the screen. Two dials will also appear on the top of the
display, indicating your depth and the amount of air you have left.

Type "0" to use your flippers. This uses more air, but doubles your
speed. You must watch out for shoals of fish and clumps of seaweed on
your way up. Hitting either of them will delay your ascent.

A flashing square appears beside the oxygen dial when your air supply
is almost exhausted. The key to the game is to keep rising slightly
faster than your air supply diminishes.

If you reach the surface, the computer will tell you how long you took
and give you a percentage score based on your time and your remaining
air. My best score so far is 63 percent. Can you beat it?


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



SWARM
A new game for 16K Spectrum by Simon Lane
from Popular Computing Weekly, 16th September 1982

An experimental research station at Porton Down is working on a hush-
hush project. In a quest to invent a new weapon, to match the Super
Powers' terrifying nuclear arsenals, the research team is altering the
genetic DNA patterns of various insects.

Black widow spiders, their poisonous bite enhanced a thousand fold,
are kept under close observation. Killer ants, bred for size and
ferocity, are encase in specially constructed titanium alloy cases.
Even beetles, their skins toughened to withstand almost any shock, are
being used as instruments of destruction.

The research team's most successful experiment has resulted in a
species of hybrid bee. These bees have wingspans of 12 ft., with
bodies to match. They are carnivorous and need to feed almost
constantly. Unfortunately, a swarm of the bees escaped from one of the
hives. The bees are approaching a nearby city, looking for food.

You are part of an artillery unit called up to deal with the menace.
Your rocket launcher is one kilometre away from the swarm, but you
only have enough ammunition for one shot at each bee.

When run the program displays rows of the giant bees on the screen.
Using the keys 5, 6, 7 and 8 you must position your sights directly
over each bee. Enter 0 to fire. Full instructions are contained in the
program.

User-defined graphics are present in line 80-240, 310, 320, 1087 and
1260 [... and several other places as well. JimG]
