0 ratings0% found this document useful (0 votes) 380 views52 pagesComputer Spacegames (1982) (Usborne Publishing)
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here.
Available Formats
Download as PDF or read online on Scribd
COMPUTER
m,ZX81, BBC,TRS-g9, APP
spect er PLE, Vic
c TK & PEyDaniel lsaaman
and Jenny Tyler
Contents
About this Book 26 Space Rescue
Starship Takeoff 30 Touchdown: TRS-80 version
IntergalacticGames 31 Touchdown: VIC 20 version
Evil Alien 32 Touchdown: ZX81 version
Beat the Bug Eyes 33 Touchdown ZX Spectrum version
Moonlander 34 Touchdown: BBC version
Monsters ofGalacticon 35 Touchdown: Apple version
Alien Snipers 36 Adding to the programs
Asteroid Belt 38 Writing your own programs
Trip into the Future 40 Summary of BASIC
Death Valley 46 Conversion chart
24 Space Mines 47 Puzzle Answers
Illustrated by
Martin Newton, Tony Baskeyfield, Graham Round, Jim Bamber, Mark
Duffin and John Bolton
Designed by
Graham Round and Roger Priddy
First published in 1982 by Usborne Publishing, 20 Garrick Street, London
WC2E 9BJ, England
© 1982 Usborne Publishing Ltd
Beat the Bug Eyes program by Bob Merry
Starship Takeoff program by Richard NashAbout This Book
This book contains simple games
programs to play ona microcomputer.
They are written for use on ZX81,ZX
Spectrum, BBC, VIC 20,
TRS-80 and Pet and Apple micros, and
many are short enough to fit intothe
ZX81's 1K of memory.
Most micros use the language BASIC,
but they all have their own variations or
dialects. In this book, the main listing for
each program works on the ZX81 and
lines which need changing for the other
computers are marked with symbols and
printed underneath. The fact thatthe
programs are written for several micros
means that they do not make full use of
eachone's facilities. You could try
finding ways of making the programs
shorter and neater for your micro.
For each game, there are ideas for
changing and adding to the programs
and towards the back of the book you
will find tips and hints on writing games
of your own. Also in the bookisa
conversion chart to help youadapt
programs in magazines and other books
for your micro anda summary ofthe
BASIC terms used in this book.
Typing in the programs
Lines which need changing for
computers other than ZX81 are marked
with these symbols:
4 VICand Pet
* BBCand Acorn Electron
= TRS-80
© Apple
s ZXSpectrum
Every time you see the symbol forthe
micro youare using, look below forthe
corresponding line number with the
same symbol and type that in instead.
Petcomputers.
VIC 20 versions of all except the graphics program should workon
Points to remember
1 Type the lines exactly as they are printed
including all punctuation and spaces.
2 Press RETURN, NEWLINE or ENTER
key at the end of each programline.
3 Check each line as you go.
4 Make sure you don't miss outa line or
confuse one with another. A piece of paper
oraruler is useful to mark your place in
the listing.
5 Look out for the symbols and make sure
you use the correct lines for your
computer.
6 Ifyouareusing a ZX81 or ZX Spectrum,
remember not to type the program
instructions letter by letter but to use the
special key for each instruction instead.
You may find it easier to get someone to
read the program out to you while you
type it in. Don't forget to explain that they
must read every comma, fullstop, bracket
and space and differentiate between letter
“O" and zero, FOR and 4, and TO and2.
Debugging programs
When you have typed
inthe program, check
your manual to find out
how to display it onthe
screen. (Usually you
type LIST followed by
the line numbers of the
section you want to
see.)Check you have
typed everything
correctly. It is easy to
make mistakes, so
expectto find some. Use
your manual to find out
howto make changesto
the program once itis
typed in. Ifin doubt, you
can always type the line
again. All the computers
will replace an existing
line witha new one with
the same number.
Here is a checklist of common
mistakes to look out for:
1 Line missed out
2 Line wrongly numbered
3 The beginning of one line joined onto
the end of another.
4 Brackets, commas, colons, semi-
colons, fullstops or spaces missed out,
especially in long, complicated lines,
Watch for double brackets in particular.
5 Wrongline used for your computer.
6 Letter “O” confused with zero.
1 Wrong numbers used, e.g. extra zeros
included.
Playing the games
Tostart the game you must type RUN. In
some games things happen very quickly,
somake sure you have read the
instructions and know what youare
supposed to do.
Itis quite likely that the program still
hasa mistake init and either won't
at all or the game won't work properly.
Sometimes your computer will give you
anerror code which you can look upin
the manual. This may help you find the
mistake, though not always. List the
program again and check it carefully
against the book.
‘When the game is over, the computer
will usually say something like BREAKIN
LINE 200. To play again, you have totype
RUN.
Experimenting with the games
There are suggestions for changingand
adding to the programs throughout the
book, but don't be afraid to experiment
with changes of your own. Youcan't
damage the computer and youcan
always change back to the original ifthe
changes don't work.
You will probably find you want to
adjust the speed of some games,*
especially after you have played thema
number of times. You will find out which
line to change on each program page.
Wherever you see
PRINT, youcan
change the message in,
quotes that follows it to}
whatever youlike.
Also, unless you have
2X81 with only IK, you
canaddextra
messages.
Type a line number (say 105 if youwant
toadd a message between lines 100and
110), then type PRINT, then your
message inside quotes.
Ifyour computer can make colours
and sounds, you could use your manual
to find out how they work and try adding
them to the games in this book.
*See page 37 for a special note for BBC and Spectrum users.Starship Takeoff
Youare a starship captain, You have crashed yourshipona
strange planet and must take off again quickly in the alien
ship you have captured. The ship's computer tells youthe
gravity on the planet. You must guess the force required fora
successful take off. If you guess too low, the ship will notlift
off the ground. If you guess too high, the ship’s fail-safe
mechanism comes into operation to prevent it being burnt
Pheu iHow the program works
4@i0 CLS ‘Clears the screen.
20 PRINT "STARSHIP TAKE-OFF"
Computer selects two
NT (RND#20+1) } ———— numbers - one between 1 and
INT (RND#40+1) 20 to be put inG, the other
between 1 and 40 tobe put in W.
SO LET R=G8W ‘Multiplies the number inG
by number in W. Puts result
inR.
40 PRINT "GRAVITY= "56 Prints GRAVITY and number
inG.
70 PRINT “TYPE IN FORCE" Asks you for a number.
80 FOR C=1 TO 10 This begins a loop which tells
the computer to repeat the next
section 10 times, to give you
10goes.
90 INPUT F ‘Stores your number in F.
‘Compares number in F with
100 IF F>R THEN PRINT “TOO HIGH"; number in Rand prints
110 IF F10 THEN PRINT ", TRY AGAIN" ——Printsifyou've hadless
than 10 goes without a correct
answer.
140 NEXT C —_____—————= End of loop. Goes back to 80
150 PRINT for another turn.
160 PRINT "YOU FAILED —" Prints after 10 unsuccessful
170 PRINT “THE ALIENS GOT YOU"
180 STOP
190 PRINT "GOOD TAKE OFF"
The above listing will work on a ZX81.For
other computers, make the changes below.
@10 HOME
410 PRINT CHR$(147)
*4@30 LET NT (RND (1) $20)
w30 LET NT (RND (0) #20)
#4040 LET NT (RND(1) #40)
40 LET NT (RND(O) #40)
How to make the game harder
‘Youcan change the program togive
youless than 10 goes. Dothisby :
altering the last numberinline 80and | | Youcouldchange the range of possible
eee | | forces. See if you can work out how.
‘same.Intergalactic Games
Thereis fierce competition among the
world’s TV companies for exclusive
coverage of the First Intergalactic Games.
Everything depends on which company
wins the race to put a satellite into orbit at
the right height.
Youare the Engineer in charge of the
launch for New Century TV. The crucial
decisions about the angle and speed of the
launching rocket rests on yourshoulders.
Can you doit?(South) —— ¥ position —» (North)
lurks Elron, the Evil Alien. You have managed
to deactivate all but his short-range weapons
but he can still make his ship invisible.
You know he is somewhere within the
three-dimensional grid you can see
on your ship’s screen (see
below), but where?
_ You have four space bombs.
Each one can be exploded at
a position in the grid
specified by three numbers
between 0 and 9, which
your computer will ask
‘you for. Can you blast
the Evil Elron out
of space before he _
and
Se eeHow the program works
PRINT "EVIL ALIE!
LET S=10 Sets the size of the grid.
LET G=4 ‘Sets the number of goes.
M4040 LET X=INT(RNDSS) Elron’s position is fixed by
km 4@50 LET Y=INT(RND#S) ‘these 3 lines, which select 3
= g | numbers between 0 and the
ma@60 LET D=INT(RND¥S) aes
70 FOR Start of aloop which tellsthe
computer to repeat the next
15linesG times.
80 PRINT "X POSITION (0 TO 9)?"
85 INPUT X1
90 PRINT “Y POSITION (0 TO 9)
‘This section asks you for
too! INeuT yt your3 numbers and stores
110 PRINT “DISTANCE (0 TO 9)?" them in X1, Yl and D1.
120 INPUT D1
130 IF X=X1 AND Y=Y1 AND D=Di THEN GOTO 300 Checksif
youwere
140 PRINT "SHOT WAS "5 right and jumps to
150 IF Y1>Y THEN PRINT "NORTH"; 300 if you were.
160 IF Y1X THEN PRINT "EAST"; ee eT
180 IF X1D THEN PRINT "TOO FAR"
210 IF D1)-“<
fora difficulty number which it can put —~ [je
intoS instead of S being fixed? (Tip: limit
the value of Sto between 6 and 30and.
‘use INT(S/3) for the value of Ginline
30.)Sy F
Beat the Bug Eyes
You're trapped! Everywhere you turn you catch a glimpse of thesteely
cold light of a space bug’s eyes before it slithers down behind arock
again, Slowly the bugs edge towards you, hemming you in, waiting fora
chance to bind you in their sticky web-like extrusions. Luckily ‘youhave
your proton blaster with you.
‘The bug eyes pop up in four different places on your screen and these
correspond to keys | to 4. Press the correct key while the bug’s eyesare
onthe screen and you will blast it. There are 10 bugs in all- the moreyou
blast, the greater your chance of escape.
How the program works
10 PRINT "BUG EYES" Sets the score to zero for start
20 LET of game.
30 FOR T=1 TO 10 Beginning of loop which
gives you 10 turns.
4040 CLS ————— Clears screen.
_ Delay loop which lasts a
xma@50 FOR I=1 TO INT(RND#30+20) varying length of time,
60 NEXT I depending on the value of
LET R=INT(RND%4+1)———-— Chooses a number from 1 to 4
and putsit in R.
GOSUB 210+308R ———— Jumps to one of four sub-
‘routines depending on the
‘GOSUB makes the computer
branch out of the main
toa position on the screen—
“A” spaces across and “D”
lines down - and then jumps
again to 350 to move the
cursor to this position.
90 PRINT “0O" Prints the “bug eyes" at this
FOR I=1 TO 20 pesitlon:
LET R#=INKEY$
IF R$<>"" THEN GOTO 140 pressing a key. If youare,
NEXT I computer jumps to 140 and
TF VAL("O"4R$)127 THEN GET R$
FOR J=1 TO 300Moonlander
pC Og CO SOc tr Cece ume ttscn tits
down to the moon’s surface. In order to land safely you must slow down yourdescent
but that takes fuel and you have only alimitedsupply.
Your computer will tell you your starting height, speed and fuel supply and ask
how much fuel you wish to burn. It will then work out your new height and speed. A.
bur of 5 will keep your speed constant. A higher number will reduce it. Try tohave
your speed as close tozero as you can when you land. Can youland safely onthe
CS ee
Notice the commas and semi-
colons in lines 70 and 80.
Experiment with leaving
rC tee)
them out andchangingthem
Sie ee round to see what happens.
to ed
Cees
50 LET
[eas
70 PRINT “TIME";T, “HEIGHT"3H
80 PRINT “VEL. "3V, "FUEL" ;F
90 IF F=0 THEN GOTO 140
100 PRINT "BURN? (0-30)"
ete Ota)
120 IF B3O THEN LET
140 IF B>F THEN LET B=F
150 LET V1=V-B+5
SU a)
170 IF (V¥14V)/2>=H THEN GOTO 220 ————
Tn as
cc Tea
Pe ama
210 GOTO 70
220 LET Vi=V+(S-B) #H/V
230 IF Vi>S THEN PRINT “YOU CRASHED-ALL DEAD"
240 IF V1>1 AND Vi<=5 THEN PRINT "OK-BUT SOME INJURIES"
250 IF V1<=1 THEN PRINT "GOOD LANDING.“
260 STOP
The above listing will work on a ZX81.For
CE SRC Ceo Cr aca
oy
@10 HOME
PO simon Ist yal
RTs loge ee Mregor—_
How the program works
Sets the starting values for
Peon te enrol
DEEL
Seton
‘computer jumps down the
paar ee are gS
Peery ectony
SEED eee eed
commentary of your progress
tcc
Eco
SL cae Teed
Pee tecob et
Pertti ta
the correct limits.
ToNOn CSCO nes ae
TON ENC SCORE UA ULECS
EC Cay
tee et rg
greater or equal to your
Perera eee tg
is, you've landed. Computer
Oa et dart ake
recite
peer
CROCS ECan
eee Cee
——— Puts yournew velocity into V
Prien
pret om
SEE cachet ar La od
ee tenet
eC Caer to
Pere meet kong
ECO Ee Cente sca
Puzzle corner
Youcould make the game easier by increasing
the maximum speed allowed for a safe landing.
How would you change the program to do this?Monsters of Galacticon
Landing on Galacticon was easy—
but no-one warned you that some of
the nastiest monsters in the known
Universe are to be found there.
As each monster threatens, you
must choose one of your weapons —
aray gun, a trypton blaster ora
sword laser —to use against it.Can
you make the right choices? Ifso,
you may live to conquer Galacticon.
How the
program works
Sets up astorage place (an
“array”)iabelled MS with 4 {
compartments in it—MS(1),
‘MS(2), MS(3) and MS(4)— one
foreach monstername.
Sets the number of monsters
tod.
Sets the number of people in
‘your groupto5.
Puts the 4 monster names into
the array.
‘These lines shuffle the
monsters up. Computer loops
10 PRINT "MONSTERS OF GALACTICON"
20 DIM Ms(4)
30 LET
40 LET
50 LET
60 LET
70 LET
80 LET
90 FOR
10 LET B=INT(RNDSN+1)
120 LET TS=48(A) land Nand switches the
150 LET M$(A)="8«B) names inthe compartments
140 LET M$(B)=TS ‘with those numbers. TS is:
150 NEXT I temporary string used during
the switch round process.
160 FOR T=1 TO 8 Beginning of loop for 8 turns.
40170 CLS ‘Clearsscreen
Ma@1g0 LET R=INT(RNDSN+1)
190 PRINT "MONSTER COMING. - ‘Chooses one of the monsters
200 PRINT “IT’S A ";M$(RD and prints its name.
210 PRINT "WHICH WEAPON ? (R,S OR T) * The computer uses the values
220 INPUT R®& in Rand R$ to work out a
250 LET W=CODE (R$) -S4+R ‘weapon number, W, which
*MA240 LET W=W-3S8 (WS) -S8(W>6) will ,Sers.
If Wis2, the computerjumps
250 IF W=2 THEN GOTO 300 to 300 to say you've killed the16
Alien Snipers
.g. forM 4, you must type Q,
Typing in a letter automatically triggers off
letter is correct you'll score a hit. You can c
ch game. This is a number between 1.
See page 2 for meaning of @am*sHow the program works
ae10 CLS
20 PRINT “ALIEN SNIPERS"
30 PRINT Gets a difficulty number from
40 PRINT “DIFFICULTY (1-10)" you, putsitin D, and checks it
SO INPUT D is within the correct limits.
60 IF D<1 OR D>10 THEN GOTO 50
70 LET S=0
80 FOR G=1 TO 10
Sets opening score to zero.
Beginning of loop which
gives you 10 goes.
skB4090 LET L$=CHR$ (INT (RND¥ (26-D) +38) )——Selectsaletterbetween A
and the letter whichis your
difficulty number before the
end of the alphabet.
LET N=INT(RNDSD+1) Selects a number between 1
and D.
cis
PRINT Prints the letter and the
PRINT L$,N nambex:
FOR I
LET Is
IF $<
NEXT I
189 GOTO 200
TO 20+D45 ;
NKEYS Checks if youare pressing a
>"" THEN GOTO 190 Key and jumps to 160ifyou
If you didn't press a key,
computer jumps to line 200
which sends it back for
another go
Checksif you
the pressed
right key and,
ifso, increases
*M40190 IF I$=CHR$(CODE(L#)+N) THEN LET S=S+1——yourscoreby 1.
200 NEXT G End of loop. Goes back for
PRINT "YOU HIT another fume
"YOU HIT "33 "/10"
ae Prints score after 10 goes.
The above listing will work on a ZX81.For
other computers, make the changes below.
@10, 110 HOME
410,110 PRINT CHR$(147)
90 LET L$=CHR$ (INT (RND (0) #(26-D) +65))
4070 LET L$=CHR$ (INT (RND (1) (26-D) +65))
$90 LET L®=CHRS (INT (RND §(26-D)+65))
W100 LET N=INT(RND(O) $D+1)
%4@100 LET N=INT(RND(1)#D+1)
M4140 FOR TO 200+D850
@140 FOR TO 100+D850
I¢=""
*150 LET I$=INKEY$(1)
4150 GET Is
@150 IF PEEK(-16384)>127 THEN GET I$
190 IF I$=CHR$(ASC(L$)+N) THEN LET S=S+1Asteroid Belt
Youare on atrip through the Asteroid Belt. To avoid crashing intothe
asteroids, you must destroy them and the force required for doing this
depends on their size.
Asteroids appear on your computer screen as groups of stars. To
destroy them you must press the number key corresponding tothe
number of stars. Be prepared — asteroids come at you thick andifast.Changing the speed
of the game
Line 180 (190 for the BBC)
controls how much time
you have topressakey.
Change the last number in
180, or the number in
brackets in the BBC line
190, toalower number to
speed up the game.
Puzzle corner
Se-4, Can you adapt the scoring
#7 system so that, foreach
Sep) | asteroid, youget the same
number of points as thereTrip into the Future-
Imagine youare ina / *
nearly as fast as light.
Strangely time is
passing more slowly
inside your spaceship
than outside. So,
having set off on along,
fast space trip, you
can return toEarth
further in the future
than the clocks inside
your ship indicate.
In this game, your
computer tells you
how many years must
elapse on Earth
before you return.
You then decide the
length of your trip (in
light years) and the
speed of your ship(as
a fraction of the speed of
light) in order to achieve
this. Take care not to
travel too far too slowly or
‘you will die of old age on the way.
wh
How the program works
4@10 CLS
20 PRINT “TRIP INTO THE FUTURE”
Chooses a whole number
xma@S0 LET T=INT(RND&100+25) between 25 and 124 forthe
40 PRINT "YOU WISH TO RETURN "37 years which must elapse
50 PRINT "YEARS IN THE FUTURE." ihefore your retarm, and peinte:it,
60 PRINT
70 PRINT "SPEED OF SHIP (0-1)" Gets a speed from you and
80 INPUT V checks itis within the correct
90 IF V>=1 OR V<=0 THEN GOTO 70 mits.
100 PRINT "DISTANCE OF TRIP"
TTORiNeUTID Gets adistance from you.
120 LET T1=D/V ‘Calculates the time taken
20)
‘See page 2 for meaning of @am*LET T2=T1/SQR(1-V8Vv)
PRINT "YOU TOOK "3T1; "YEARS"
150 PRINT “AND ARRIVED "372; "YEARS" Prints these times,
160 PRINT “IN THE FUTURE.
170 IF T1>SO THEN GOTO 210 ‘Checks if youtook longer
than your lifetime (50 years).
Jumpsto line 210 if youdid.
180 IF ABS(T-T2)<=5 THEN PRINT “YOU ARRIVED ON TIME"] Checksif
190 IF ABS(T-T2)>S THEN PRINT "NOT EVEN CLOSE” aa
200 STOP is yeacs
210 PRINT "YOU DIED ON THE way" and prints
220 STOP amessage.
Puzzle corner
Can you work out how to change the
program to do the following things?
The above listing will work on a ZX81.For
other computers, make the changes below.
@10 HOME
410 PRINT CHR$(147)
§30 LET T=INT(RND(O) #100+25)
‘*4@30 LET T=INT(RND(1)#100+25)
1) Give a wider range of years which
must elapse before you return to Earth.
2) Increase the accuracy required from
within 5 years to within 2 years.
3)Shorten or lengthen your lifetime.7 (Aiia
Death Valley
There is only one way to escape the forces of the evil Dissectitrons. You
will have to steel every nerve and fly your single-seater Speed Dart
along the jagged, bottomless ravine known as Death Valley.
Your computer will ask you for the width of the valley. Try 15* first and
then work your way down 8 is quite difficult. Steer your Speed Dartby
pressing Q to go left and P to go right, and see if you can make itsafely
through Death Valley.
*Ifyouare using a VIC 20, then use widths of 6 to10.
-— —_ . 29—
10 LET CSINT(RNDSS+5)
SO LET M=INT(RND$50+10) xP amount of money (M), price of
40 LET FP=INT(RND$40+80) food (FP) and amount of ore
SO LET CE=INT(RND#40+80) produced per mine (CE) forthe
start of the game.
60 LET C=0 ——___. sets the amount of ore in
storage to zero forstart.
79 LET S=1 ‘Sets the satisfaction factor to 1.
80 LET Y=1 Sets the yearnumber to 1.
kHA@F0 LET LP=INT(RND#2000+2000) ‘Selects buying/selling price
formines.
kM A@100 LET CP=INT(RNDE12+7) ‘Selects selling price for ore.
4@110 CLS
120 PRINT “YEAR’
130 PRINT
140 PRINT “THERE ARE “;P;" PEOPLE IN THE COLONY”
150 PRINT "YOU HAVE ";L;" MINES,AND $"M
160 PRINT "SATISFACTION FACTOR ";S Prints current state
170 PRINT of affairs inthe
180 PRINT “YOUR MINES PRODUCED ";CE;" TONS EACH" icolony.
190 LET +CESL
200 PRINT “ORE IN STOR'
210 PRINT “SELLING”
3" ToNs"
220 PRINT “ORE SELLING PRICE="5CP
230 PRINT “MINE SELLING PRICE="5LP;"/MINE™
240 PRINT "HOW MUCH ORE TO SELL?" Asks how much ore you want
250 INPUT CS to sell, puts it CSand checks
260 IF CSL THEN GOTO 290 ‘Does the same process for
320 LET L=L-LS selling mines.
330 LET M=M+LS#LP
340 PRINT
350 PRINT “YOU HAVE $"3M Prints yournew money supply.
360 PRINT
370 PRINT "BUYING" Asks how
380 PRINT "HOW MUCH TO SPEND ON FOOD ? (APPR. $100 EA.) ">=muchyou
390 INPUT FB ‘i wantto
L spendon food and puts this in FB.
400 IF FBM THEN GOTO 380 ‘Checks youhave enough
money topay.
410 LET MeM-FB Adjusts your money supply.
24
20 LET P=INT(RND$60+40) mines(L}numberofpeople(),
;
|
c420
430
440.
470
mAe540
550
kmA@560
570
580
590
600
410
620
630
640
650
660
670
680
699
700
710
‘The above listing will work on a ZX81.For
other computers, make the changes below.
e110
aito
410, 20, 30, 40,50, 70, 100, 500, 510, 530 540, 540
change RND to RND(1)
M10, 20, 30, 40,50, 90, 100, 500, 510, 550, 540, 560
change RND to RND(O)
See page 2 for meaning of@am*
IF FB/P>120 THEN LET according to how much you
IF FB/P<80 THEN LET ‘spent on food.
PRINT “HOW MANY MORE MINES TO BUY?" Asks how many mines you
INPUT LB want to buy and checks you
IF LBM THEN GOTO 440 canafford them.
LET L=L+LB ‘Increases number of mines if
necessary.
cay. -LBSiP Adjusts your money again.
IF S<.6 THEN GOTO 660 ‘Checks on value of
satisfaction factor. Ifthisis
very low, computer jumps to
660toendthe game.
IF S>1.1 THEN LET CE=CE+INT1.1 THEN LET P=P+INT(RND&10+1) ‘More people arrive ifSis high.
IF S<.9 THEN LET P=P-INT(RNDS10+1) —— People leave ifSis low.
IF P<30 THEN GOTO 700 ‘Ifthere are less than 30
IF RND>.O1 THEN GOTO 590 peonsiseen eee
PRINT “RADIOACTIVE LEAK....MANY DIE" Introduces small chance of
LET NT (P/2) half the people being killed.
IF CEC150 THEN GOTO 620
Ifthe amount produced per
PRINT "MARKET GLUT - PRICE DROPS"
Bess muneis very high orepice is
pee ate moa idfiis loan T cs >
andi il,
IF YT THEN PRINT "YOU TOOK TOO LONG ABOUT IT"
FeO ee LL
T (RND¥10+5)
ca
IF G<12 THEN LET G$="MEDIUM"
IF G<8 THEN LET G$="LOW"
LET A=INT(RND*10+5) :
eae cla
pee eC Met) ee oO
aS 5
see si
PRINT "YOU ARE NOW ORBITING THE PLANET"
oe mt ee oe) oe
cet LM OR ae Ce 7 ae 7
PRINT "ATMOSPHERE IS ";AS
as La 5 a
sO he ee 5
pe - 2
fa SOM Me ch CS De
pt ea} :
ee
(my
IF B>=G%10 THEN GOTO 770
aeante et Eee : eer: PaBeet
IT) =
_ :
Paste gs) LRA) ”
760 GOTO 840
ese eee SSUES ho (ee)
cic Se LM yet 8 NR
PA Tem clOhte EL xe)
800 PRINT "YOU LANDED SUCCESSFULLY — WELL DONE"
810 IF X-S-H>25 THEN GOTO 840
+ 820 PRINT "PITY YOU DON*T HAVE ENOUGH"
830 PRINT "ENERGY TO OPEN THE DOOR"
CT ee
Pir Sats
1010 PRINT "YOU ARE ABOUT TO EMBARK ON A"
1020 PRINT "MISSION TO A DISTANT PLANET"
1030 PRINT "IN URGENT NEED OF MEDICAL"
1040 PRINT "SUPPLIES. YOU MUST FIRST READY"
1650 PRINT "YOUR SHIP FOR THE TRIP BY"
Ser Kema SLM VMs) o Om ON MERLE aS) aT ao
+1076 PRINT "ENERGY TO THE ENGINES, SHIELDS"
~ 1080 PRINT "AND LIFE-SUPPORT. YOU ARE"
1090 PRINT "THEN PUT TO SLEEP FOR THE MAIN"
Cee sO LMR eS en te MS Ce aa
1110 PRINT "YOU WILL GET A REPORT OF THE’
1120 PRINT "EVENTS ON THE WAY. YOU MUST"
1130 PRINT "THEN LAND ON THE PLANET.....
1140 PRINT "PRESS ANY KEY"
ma01150 IF INKEY$="" THEN GOTO 1150
(ve)
RETURN
BCTV OCCU RnR os Sores. co aod
Cee ee R en cn ete co teet rs lan
DEVO MES Edits. Xe) ane
xa@all RND to RND(1)
Cte peace Re SACP SOP COMETS)
410,250,470, 730,1160 PRINT CHR$(147)
emae60 IF LEFTS(1$,1)="Y" THEN GOSUB 1000
#840310 ON INT(RNDS4+1) GOTO 320, 350,380,410
Wae430 FOR J=1 TO 500
*430 FOR J=1 TO 1000
SBR eae ag cic
#1150 GET Is ‘ Ski) z
maiiSO GET If : IF I$="" THEN GOTO 1150
P:3 7Adding to the game
This game is really made up of two parts. In the first part you set off on your
space journey with the aim of orbiting the planet and in the second you
attempt to land on the planet. You could perhaps try adding a third partin
which you make the treacherous crossing from the landing site tothe
Intergalactic Red Cross H.Q.Touchdown
This game is different from the others in this book because it uses graphics.
Peet oh Coe ua ct ono me Cent eey
pee a rte er entree ene C re Ce tag
RC GE Cs ait ture heen oI Crecens earns
oni ie
How to play Touchdown
Ace space pilot, Captain Flash, is sitting next to you as you take the final
part of your Advanced Spacecraft Handling Test (Part II). Your
lightweight, two-man landing craft is rapidly approaching the Moon's
surface. Your velocity must be almost zero as you touch down. Deftly you
control the thrust, pressing A to increase it and D to decrease it, watching
your progress on the screen all the time. If you use too much thrust youwill
begin to go back up again. Too little and you will make anew crater onthe
Moon. Can you impress Captain Flash with your skill ?
ioe PORE OTC Coma ree nCanckatersast ig
key to decrease it.
SO UR Rel)
Pree
Ree Geers)
RTM ut Tec eese
aa er Sees 0 eee eee
cer LS ace
3S M3$=CHR$ (131) +CHR$ (135) +STRINGS
Pe RSOR oT kee bet ees)
Cc eo
eet ery
60 C=1:G0SUB 390
a ees aay
co Stora
90 GOSUR 460
100 rete ran
etem ee ee
120 VI=Y-T/20+6 2 F=F-T/10
Stone een e ya
Cremer tere cet
150 IF Hi¢O THEN 200
ee aE
re ee
Ftc ey
SCC ee
en es te sr
PoC eon era
Por
ee res irs
Pee at Ce tar)
ee Oe ee Sea
Pree atta
tec erg
320 SET (X,47-INT(RND (0) #5) )
casas
aoa
aS Oe tee aa
J
30)
cr
aa
365
Sa
ee
er)
cana
co
cre
ora)
oor
ce)
ert
a
ert
re
ra
re
oo
are
rat
620
rata
rere
rete
rae
re
680
eee Pees
ere
ae
RETURN
pete rena)
PRINT @Y,3 : IF C=1 THEN PRINT
Pee merase
Le ee eG
THEN
OS ee ed
an
ctor
DUM hes Cee a
PRINT M3$; ELSE PRINT CHRS
rr
amy
Na eeseE ee)
Omen Leese ary
A IZ
Cota
pened
Tae r ee oer a
Seer eC
pet Oa ee
cee
eel ied
RETURN
oe
ese)
PRINT @INT(RND(O) ¥1024)
oes
Ln
RETURN
orn
SO ae
SeSC eae PACS
IF (V#V1)<8 THEN PRINT
ee OL 0
RETURN
ia
ct
ae etnag
emg
y.BTC [e EOP Re
prt Mm eC rarer eon
25 POKE 36879,8
Same itd
40 GOSUB 250
rece ets)
merece etre
Bee arya)
Deyo
eet ered
To ferret ere)
Peter tt ea
a ere
ma
Se oem Swe
ee Bete)
Tomer 1
eee ane rm
ST eet eso
pC emcreL eer)
care GOSUB
Pete eer
pra
Pres ae
por ea ety
270 G=(FNR(40) +40) /100
Pee ait)
ny
IgG e EES eSD)
ara)
re
=100:T=0
a eee Te. CST
Se ge ee eee ae)
esa
Sms
350 PRINT
355 PRINT
ec ccae
ROME 8 Sto eee
ee SOL
Salt)
errno
Bord
re
or
erty
ovr
era
ord
a
440.
rea
cra
cor
cr
Se cere r TSU
ema eye)
eee Bee Sas
POKE Y#22,160 : POKE Y+23, 160
ane ee re
emer
Cees
POKE Y+Z,32 : POKE Y#7+1,32
aes
aa
oo.
Pe oeeeey
IF X100
THEN T=100
Ce ee es GES)
coed
ee ed
RETURN
CSC h mer cet ra)
eee ee)
nea Sr
NEXT
PRINT “LOST IN SPACE!
aa
ULM SOC rene Ale
ist tmr MED ULAR OEOE IPSC
NEO ORC Met Mt taS a eo
ar
OU ee at)
CCR eC Cog
Css cgBt Weed CL)
mee
) LET BE="£6b666666666666666566 3"
Pre eet)
Eee mers)
omens
Peet eee)
cre ae
te
77 GOSUB 460
80 LET A=2
eee)
Cmte ss)
Cee eo
CPt or
Cran aT
Tne
To eas
rae ee ra
PRComerct ns)
Pere a eo eee
Serna ae ea
cea at Onn ze ret S10 RETURN
Prem Ramee sO ac)
PCO eee) IF I$="A" THEN LET T=T+4
150 IF Hi100 THEN T=100
IF I="D" THEN T=T-4
ct i)
eae es
Coa
eae!
PRINT
Coat
Ce era eed
aoe tn
Rin aO EEL IVaC)
CaS ee Zee Mat tear)
PRINT "ALL DEAD" : RETURN
i Oa ea ae
SRR gee Ma ere
no
Crag
CD
eRe L
Mi eend
eciaeMe aesSzxi7
*mAe17
Adding tothe programs
Here are some ideas for additions
youcan make to the programs in
this book or to your own programs.
In most cases you won't be able to
add these to a ZX81 with only 1K as
the games themselves fill almost all
its memory space, but youshould
find there is plenty of room on the
other computers.
Remember you will either have to
restrict your additions to the spare
line numbers in a program or
renumber the program. If you
decide to renumber, take care you
change all the GOTO and GOSUB
lines too.
mszx1010
1010
@1010 GET Is
Getting the computer to tell you
how to play
Youcanadda
section to any
program to make
the computer print
instructions telling
you what to do. The
easiest way todo
this is to add some lines, such asthose
below, at the beginning of the
program and then puta sub-routine at
the end.
10 PRINT "TITLE OF GAME”
41 PRINT "DO YOU WANT TO”
12 PRINT "KNOW HOW TO PLAY?"
15 INPUT I¢
IF 1scbyarye
IF LEFTS(I$, 1
THEN GOSUB 1000
YY" THEN GOSUR 1000
main program goes here
1000 PRINT “WHAT YOU HAVE TO"
1010 PRINT “Da IS..
1999 RETURN
You can add as many print statements
as you like for the instructions, just
remember to put a number andthe
one. Restrict the length of the part
inside the quotation marks tothe
number of characters your computer
can print on one line. Don't forget to
puta RETURN line atthe end or the
program won't work.
S2x7
word PRINT at the beginning of each xmae7
Ifyour instructions are very long, you
may want to insert this sub-routine
which stops the program running ata
particular point until you press a key.
This way you can stop the instructions
scrolling off the top of the screen
before you have read them. Puta
GOSUB line at the place you want the
program to stop and then put this sub-
routine at the end.
1000 PRINT "PRESS A KEY TO CONTINUE “s
IF INKEY8="" THEN GOTO 1010
I8=GETS
O10 GET 18 + TF 1
1020 PRINT
1050. RETURN
“* THEN GOTO 1010
Making the computer “talk” to
Youcan make the computer ask you
questions and react to your answers.
For instance, here is an addition which
will make the computer refuse to play
with you unless your name begins with J
1 PRINT “WHAT 1S YOUR NAME?"
2 INPUT 18
3 IF T8(1)<>"3" THEN GOTO 1000
3 IF LEFTS(I8,1)<>"J" THEN GOTO 1000
4 PRINT “OK-YOU CAN PLAY."
5 PRINT “ARE YOU READY?"
& INPUT as.
IF J8(1)<>"Y" THEN GOTO S
TF LEFTS(J8,1)<>"Y" THEN GOTO 5.
main program here
1000 PRINT
1010 PRINT
1020 PRINT
1030 PRINT
“SORRY THIS GAME 15"
“ONLY FOR PEOPLE
“WHOSE NAMES BEGIN"
“wiTH J”Here is another one where the
computer dares you to be brave
enough to play.
10 PRINT “VERY SCAREY GAME"
12 PRINT “ARE YOU BRAVE ENOUGH"
14 PRINT “TO TACKLE THE GREEN"
15 PRINT “HAIRY MONSTER?"
INPUT I
IF Isc
IF LEFTS (18,
PRINT “COWARI
49 STOP
THEN GOTO 20
THEN GOTO 20
You could combine this withthe
instruction sub-routine by taking lines
11 to 17 from the instructions section
on this page and putting them at lines
20 to 26 of this program. You canthen
start the main program at line 30and.
add the instruction sub-routine at the
end.
Would you like another go?
Instead of typing RUN each time you
playagame, you can make the
computer ask you if you'd like another
go. Put these lines at the end ofthe
program, just before the last STOP
‘statement.
1000 PRINT "DO YOU WANT ANOTHER GO?"
1010 INPUT I
S$ 2X1020 IF I$ (1)="¥" THEN RUN
9KMA@1020 IF LEFTS (18, 1)="Y" THEN RUN
1030 PRINT “OK THEN - BYE"
1040 STOP
Change line
numbers according
to your program.
Adding sound effects
The BBC, VIC 20, ZX Spectrumand
some Apples are able toproduce
sounds and you can add lines to your
programs to make them do soat
appropriate places. You could addan_
explosion for instance, or alittle tune
which plays if you win. Allthe
computers need different instructions
tomake sounds though, so you will
have to look at your manual. Insome
cases you canadd a single line toyour
program at the place you wantthe
sound. In others, you need several
lines and it is best to put these inasa
sub-routine.
Asan example, here is the sound of
ashot for the BBC. You canexperiment
with where to putit in the program, but
you must give it a line number tomake
itwork:
SOUND 0, -15,5,10
Atthe back of the VIC manual you
will find some useful sub-routines for
sounds such as “laser beam”,
“explosion” and “red alert”. Puta
GOSUB line where you want the sound
toappear, number the sub-routine and
adda RETURN atthe end of it
Special notefor BBC and +
Spectrum users **
Ifyou have a BBC ora ZX Spectrum
you may find that some of the games
inthis book run too fast for you. You
will find a box next to these games
containing instructions for
changing the speed. Remember, to
slow the game up you always need
tousea higher number. Later
models of the BBC may run upto
twice as fast as the earlier models,
and this could make the games
appear impossible on the first run.
Be prepared to make big changes
tothe speed number to correct this.
3738
Writing your own programs
As you work through the games in
the book, you will probably find
yourself making more and more
changes to them and eventually
wanting to write new games of your
own. On these two pages you will
find some hints on how to set about
doing this.
Before you start, it isa good idea to
stop and think about what your
computer can and cannot do.
items of information in various ways.
*Itcan tell you the results ofits
calculations and decisions and also
whatis stored in its memory.
*Itcan make decisions by comparing
*Itcan select numbers at random by
using RND.
*Provided youuse its language
correctly, it can do only exactly what
youtell it, even ifitis silly
Remember, when youare trying to
work outa game, not toinclude
anything which your computer won't
beable todo.Planning agame
Before you can tell the computer how
to play your game, you must know
exactly how to play it and what the
rules are yourself. The computer will
needa series of simple logical
instructions, so work out your game in
your head or on paper first andthen
break it down into simple steps.
Next write a plan (in English— don't
try to use BASIC yet) of all the stages of
the game in order.
Here is a plan for a simple shooting
game, suchas firing cannon balls ata
pirate ship or shooting laser beams at
analien invader, to give you anidea.
PLAN
1) Print TITLE AND
INSTRUCTIONS
2) CHOOSE A TARGET
FOR THIS GAME
3) BEGIN A LOOP To
GIVE THE PLAYER
N GOES
4) GET A SHOT FROM
THE PLAYER
5) CHECK IF SHOT was
ON TARGET
6) PRINT MESSAGE
DEPENDING ON
ACCURACY OF SHOT
7) 40 BACK FOR
ANOTHER Go IF SHOT
WAS UNSUCCESSFUL
Writing the program
‘The next stage is toconvert your plan
into BASIC. Each step in your planmay
need several lines in BASIC. Don't
forget to leave gaps when numbering
your program lines so you can goback
and add extra ones if youneedto.
Doa first draft of the programon
paper first and then start testing on the
computer. Your computer will spot
errors much more quickly than you
will see them yourself and may give
youa clue as to what is wrong.
Remember that debugging programs
is along, tedious process even for
expert programmers, so don't expect
Once you have got the core of the
program working, you can add toit.
Scoring, extra comments, more
targets etc. can all be incorporated
later. You could add sections from the
programs in this book to your games.
Don't expect to be able to write
exciting and original games straight
away. Keep your ideas very simple
and be prepared to adapt them as you
go along. You may find youhave
included something in your game
whichis easy for humans to do but
very difficult for a computer. As you
get more experienced you willbegin
to know instinctively what your
computer can do and find it easierto
write programs for it. 39Summary of BASIC
This section lists some common BASIC words and describes what they
make the computer do and how they are used. Most of them have beenused
in the programs in this book, so you can check back through the book tosee
how they work in a game. Not alll the words can be used on allthe
computers mentioned in this book. The conversion chart on page 46 shows
what you can use instead.
LET tells the computer to label a section ofits
memory and puta particular value in it e.g. LET
A=6means labela section of memory “A” and put
the value 6 in it. “A” is called a “variable” and putting
something in itis called “assigning a value toa
variable”.
Some variable labels are followed by a dollar
sign e.g. AS. This means they are for “strings”,
which can contain any number of characters,
including letters, numbers and symbols.
PRINT tells the computer to display things onthe
screen and you can use it in several ways:
Amessage enclosed in quotation marks with
PRINT in front of it will be displayed on the screen
exactly as you typed it. The section inside quotes
does not have to be in BASIC, it can be anything you
like.
PRINT followed by a variable label e.g. PRINT A
or PRINT A$ tells the computer to display the
contents of that variable on the screen.
PRINT can also do calculations and then display
the results e.g. PRINT 6*4-will make the computer
" Jdisplay 24.
Youcan use PRINT by itself to leave an empty
RND tells the computer to choose a number at
random. Different computers use different forms of
RNDand you can see what these are inthe
conversion chart on page 46. On Sinclair computers
D by itself produces a number between 0and
19999999, You can vary the limits of the number it
chooses by multiplying RND and adding to it. E.g.
RND*20 produces a number between and
19,99999999, while RND*20+ 1 produces anumber
between 1 and 20.99999999.
See INT for how to produce only whole numbers.
See CHR$ for how to produce letters and other
40 keyboard characters at random.INT is short for integer, which means whole
number. For positive numbers, it tells the computer
toignore everything to the right of the decimal
point. E.g. INT(20.999) is 20. For negative numbers,
itignores everything to the right of the decimal
point and “increases” the number to the left of itby
‘one e.g. INT(—3.6) is —4.
INT is often used with RND, like this:
INT(RND*20 + 1) which tells the computer you want
itto choose a whole number between 1 and 20.
CHRS$ converts numbers into letters. Apart fromthe
2X81, all the computers in this book use the
ASCII*set of keyboard characters in which each
character corresponds to a certain number. E.g.
letter A has the code number 65 and PRINT
CHRS(65) will display an A on the screen.
Youcan use CHR$ with INT and RND to make the
computer select random letters, like this:
CHRS(INT(RND*26+65))
This line will produce random letters on aZX
Spectrum (see conversion chart for other
computers).
FOR is used to start a “loop” which will make the
computer repeat part ofa programacertain
number of times. It must be followed by avariable
(such as G to stand for the number of goes allowed
ina game), and the variable must be given start and
end values (suchas 1 TO 10.)
The end of the loop is marked by a NEXT line
(NEXT Gin this example) which increases the value
of the variable by 1 each time and then sendsthe
computer back to the FOR line again. When the
variable reaches its end value, the computer
ignores the NEXT line and carries on to the line
which follows it. Every FOR must have a NEXT or
you will geta bug.
INPUT labels a space in the computer's memory,
prints a question mark and then waits for youto
type something which it can put in this memory
space. It will not carry on with the rest ofthe
program until you press RETURN, ENTER or
NEWLINE.
You can use number or string variables with
INPUT, but if you use a number variable the
computer will not accept letters from you.
* American Standard Code for Information Interchange (see page 45)INKEYS checks the keyboard to see ifa keyis
being pressed and if so which one. It does not wait
for youto press a key like INPUT does. It isusually
used ina loop which makes the computer goround
checking the keyboard lots of times. Thisis
because computers work so quickly, you wouldn't
have achance of pressing a key inthe time ittakes
the computer to do one check.
If you haven't pressed a key before the loop
finishes, the computer carries on witha string
containing nothing (called a “null” string).
NB Apple and VIC do not use INKEYS.
GET is used instead of INKEY$ on VIC and Pet
computers.
GOTO makes the computer jump up or down the
program ignoring the lines in between. You must
put the number of the line you want it to jump to.
after the GOTO instruction.
GOSUB tells the computer to leave the main
program and go toa sub-routine. GOSUB mustbe
folowed by the number of the first line of the sub-
routine. Atthe end of the sub-routine you must have
aRETURN line. This sends the computer back to
the main program to the line immediately following
the GOSUB line. A GOSUB without a RETURN ina
program will give a bug.
IF... THEN tells the computer to decide ifan
expression is true or false, and do different things
depending on the answer. It is used with the
following signs, and also with AND or OR:
=the same as
greater than
<=less than or the same as
> =greater than or the same as
<>not the same as
Ifthe computer decides an expression is true, it
carries on to do the instruction which follows
THEN. If it decides itis false, it ignores the rest of
that line and goes onto the nextone.CLS is used to clear everything off the screen
without removing or changing anything in the
memory. It is useful for removing the listing from
the screen at the beginning of a RUN or ingames
when you want the player to react tosomething
seen fora limited amount of time. (NB Apple and
VIC do not use CLS ~ see conversion chart).
HOME is used by Apple computers instead of CLS
toclear the screen.
ABS ignores plus and minus signs in front of
numbers and takes their “absolute” values. E.g.
ABS(—10)is 10 and ABS( +10) is also 10.
VAL takes the numeric value of numbers writtenas
strings. In effect, it ells the computer to ignore the
dollar sign and treat the string as an ordinary
number variable. E.g. if1$="60" then VAL(S) isthe
number 60.
ASC converts a character into its ASCII code
number e.g. ASC("3") gives 51. The expressionin
brackets must be a string e.g. ASC(A$) or
ASC(‘'20").
NBZX8] and ZX Spectrum do not use ASC, though
the Spectrum does use the ASCII code.
CODE is used by 2X81 and Spectrum in place of
ASC. Like ASC it must always be followed bya
string. Remember that the ZX8] uses different code
numbers from the other computers.
TAB moves the cursor across the screentoa
specified column number. It is usually used with
PRINT to display something in the middle ofthe
screen. The number of spaces you want the cursor
moved is put in brackets after TAB. The maximum
number you can use depends on the screen width
of your computer.SGN tells the computer to find out the sign ofa
number, It produces — 1 fora negative number, 0
for zero and +1 for positive numbers. E.g.
SGN(-—30)is — 1, SGN(7) is + 1 and SGN(0) is 0.
DIM tells the computer how much memory space
will be needed for an “array” (a row ora grid). E.g.
DIM X(6) tells the computer to set aside anarea
large enough to contain a row of 6elementsand
labelled X. DIM A(8,8) means amemory space
labelled A and big enough to take 8 elements
across and 8 downis needed. The number of
elements of data used in the program must
correspond to the numbers in brackets after DIM
or you will get a bug.
SQR takes square roots of numbers. E.g. SOR(16)
gives the answer 4
SIN calculates the sine ofan angle. Ina right-anglec
triangle the length of the side opposite an angle,
divided by the length ofthe hypotenuse (the side
opposite the right angle) is the sine of thatangle.
When youuse SIN ina program, the angle youare
using it with must be measured in radians, not
degrees.
ATNis one of the trig. functions which computers
can calculate (see also SIN above). It stands for
arctangent and it is important to remember that it
gives an answer in radians, not degrees, Youwill
need to use a maths book to find out how this works
ifyoudo not already know about it
STOP tells the computer not to go any further ina
program. Computers other than the ZX8] can use
ENDinstead.
PEEK is a way of finding out whatis in aspecific
area of the computer's memory. Youneed to use it
with a number which specifies an “address” inthe
memory,
NB not used on BBC.
POKE isa special way of putting information inthe
computer's memory by usinga memory “address”.
NBnot used on BBCASCII chart
2X81 code chart
Code jasc | Code |ascut Code | zxe1 Code | 2x81
number | character| number |character | | number | character] number |character
32 space | 62 >| far ” re
33. |! 63 |? | 12 £ 42 iE |
34 x 64 @ [13 | $ 4a iF |
| 35 # 65 A | [44 : 4 1G
[36 | $ 66 B [15 2 45 | H
31 % 67 c 16 | ( a
38 C& 68 | D | [az ) 41
39 "| 69 E 18 > 48K
40 ( 70 F |< 49
[41 >) 1 |G 20 |= | 50 | M
42 : 2 | 21 + 51 | N
43 | 73 I 22 52.0 |
[a4 |? | 74 I 23 z 53 | P
45 15 K [247 54 Q
46 % | L 25 55 |R
47 / 71 M 26 56 |S
48 0 78 N az. 57. | T_
49 1 79 ° 28 [0 58 | U
50 2 | 80 P 29 1 59 |v
51 3 81 Q [30 | 2 60 |W
52 4 82 R 31 [3 61 x
53 5 83 s 32.14 62 ¥
6 a4 TT 33. | 5 6 |Z
7 85 U 34-6
8 86 Vv [35 | 7
9 87 |W 36 (| B : |
: 88 x 37+ 9
; so Y 38 «| A
< 90 Zz 39 |B
7 40 [Cc
Chart of screen sizes
Max. number of Max. number of
characters across lines down
(or number of columns} (or number of rows)
vic 20 22 23
TRS-80 64 16
BBC 20/40/80 16/24/32
2X81 32 22
| 2X Spectrum 32 22,
Apple 40 25
45Conversion chart
This quick reference chart shows some of the variations in the BASIC used by the machines inthis book. Itdoes
not include instructions for graphics, sound or colour as these vary so enormously from machine tomachine.
Note also that although most computers (except the BBC) use PEEK and POKE, they do not use the samesystem
of memory addresses, so the numbers used with PEEK and POKE must be changed for eachcomputer.
BBC VIC/Pet Apple TRS-80 ZX Spectrum
Select random
number between 0 RND(I) RND(!) RND(I) RND(O) RND
and 0,99999999
Select random
number between 1 RND(N) RND()"N+1 | RND()"N+) RND() RND*N+1
andN
Select random letter CHRS(INT(RND(1) | CHRS(INT(RND(1) a a
Select randomletter | cHps(RND(26) +64) 9665); Tye 66) | CHRSCRND(26)+-64)| CHRSCNT(RND*26--65))
Clearscreen CLS PRINT CHR$(147) HOME CLS ‘CLS
Check keyboard to m=" " - a
seeifkey being INKEYS(N) GETX$ IF PEEK(— 16384) INKEY$ INKEY$
pressed > 127 THEN GET XS}
Convert characters | ASC(“X”) ASC(‘X") ASC(‘X") ‘ASC(“X") CODE("X") CODE(“X")
into code numbers (using ASCII code) | (using ASCII code) | (using ASCII code) | (using ASCII code) (using ASCII code) (using ZX81 code)
‘Move cursor up PRINT CHRS(11) | PRINTCHRS(45)| CALL 998 | PRINTCHRS(27) | PRINTCHRS(11) PRINT CHRS(
Move cursor down PRINT CHRS(10) PRINT CHR$(17) PRINT CHRS(10) PRINT CHR$(26) PRINT CHRS(10) PRINT CHRS(;
Move cursorleft PRINT CHRS(®) | PRINTCHRS(157) | PRINTCHRS(®) | PRINTCHRS(24) | — PRINTCHRS() PRINT CHRS(
Movecursorright | PRINTCHRS(9) | PRINTCHRS(@29) | PRINTCHRS(@1) | PRINT CHRS(25) PRINT CHRS(@) PRINT CHRS(115)
Take IstN
TakelstN cing | _LEFTSASN) LEFTS(ASN) LEFTS(AS,N) LEFTS(AS.N) ASTON) AS(TON)
TakelastN ctstring | RIGHTS(ASN) | RIGHTS(ASN) | RIGHTS(ASN) | RIGHTS(AS.N) ASINTO ) AS(NTO )
Take middle N |
datactace deer MIDS(A$,N1,N2) MID$(AS,N1,N2) MIDS(AS,N1,N2) ‘MID$(AS,N1,N2) AS(N1TON2) AS(N1TON2)
46Answers
You may find that your answers to
some of the puzzles are different to
the ones given here. As long as they
work on your computer then this,
doesn’t really matter, but check to ,.
see if they are as neat and simple as
the answers in the book.
Page5
Starship Takeoff
Lines 30 and 40 select the numbers
which determine what the force will
be. To increase the range of possible
forces, you can increase either the 20
in line 30, or the 40 in line 40, or bothof
these numbers. Increasing the range
of forces will obviously make the
game more difficult
Page7
Intergalactic Games
Change lines 222 and 230 as follows:
222 LET B=R+INT (1000/6)
230 GOTO 20
and add anew line 15:
15 LET Bo
Page
Evil Alien
Change lines 20 and 30 and add anew
line 25 as follows:
20
25
x0
PRINT "HOW DIFFICULT? (& TO 30)"
INPUT S
LET G=INT(S/3)
Page11
Beat the Bug Eyes
To make the bugs appear in more than
four places on the screen, you need to
puta higher number than 4 inthe
middle of line 70, change line 80 and
add more sub-routines at the end of
the program—one for eachextra
position
Here are the changes to make the
bugs appear in places:
70 LET REINT(RNDES #1)
$2x80 GOSUP 220+208R
MA@EO ON R GOSUB 240, 240, 280, 300,320
240
245
250
260
265
270
280
2es
290
300
305
S10
320
325
330
LET Des,
LET @=1
SOTO 350
LeT
Ler
GoTo 350
Let
LET Aqie
GoTo 350
LET D=10
LET A=7
GOTO 350
You can use any numbers.
you like for A and D
provided they will fit
on your screen.
GOTO 350
Toadd more bugs, change the 10in
lines 30 and 220 toa higher number.
(Make sure you use the same number
for both lines.)
Page 13
Moonlander
To increase the speed allowed fora
safe landing, you need tomake
changes to lines 230, 240 and 250. You
can use any numbers you like ~ the
higher they are the easier the game
willbe. Inthis example, youare
allowed a speed of 2 for agood
landing and 7 for an OK landing:
250 IF V1D7 THEN PRINT “YOU CRASHED
~ ALL DEAD"
240 IF V1>2 AND V1¢=7 THEN PRINT “OK
“BUT SOME INJURIES"
250 IF V: THEN PRINT “GOOD LANDING"
Page 15
Monsters of Galacticon
Four ways of making this game harder
are:
1 Start the game with less people in
the group by putting a smaller number
than Sin line 40.
2 Increase the number of monsters by
changing the 4 in lines 20 and 30. Add 47extra monster names at lines 81 to 89
using MS(5) and MS(6).
3 Reduce the number of goes allowed
byaltering the 8 in line 160.
4 Increase the chance of the monster
being angered in line 330 by
increasing .4 a little.
Page 17
Alien Snipers
Inthis game, Nis the code number. To
change the scoring to fit the code
number you need to increase the
score by Neach time instead of 1.So,
change line 190 as follows:
S2X190 IF I$=CHR (CODE (L$) +N) THEN
LET S=S+n
HMA@190 IF TS=CHRSCASCILS) +N) THEN
LET S=SeN
Page 19
Asteroid Belt
Youneed to change line 260 so thatthe
computer adds the number of starsto
your score instead of 1. The number of
stars is controlled by the value chosen
for Nin line 70, so, asin the puzzle
above, you need to add Nto thescore.
Youalso need to change line 320.
260 LET 8-5+N
320 PRINT "YOU SCORED “;S;" POINTS"
Page 21
Trip into the Future
1 Toincrease the range of years
which must elapse before youreturn
to Earth, change the 100inline 30 toa
higher number, e.g. 150, like this:
30 LET T=INT(RND#150+25)
2 Toincrease the accuracy from5to2
years, change the §s in lines 180and
19002, like this:
190 IF ABS(T~12)<=2 THEN PRINT “YOU
ARR Me™
IVED ON THI
190 IF _ABS(T-T2)>2 THEN PRINT "NOT
48 EVEN CLOSE"
3 Line 170 contains the number which
determines the length of your lifetime.
Change the 50 toa higher number fora
longer lifetime.
Page 23
Death Valley
Youcan make the valley longer by
changing the number in line 30to
something higher than 200.
Page 25
Space Mines
Add these lines to make the computer
ask if you would like another game:
645 PRINT “ANOTHER GAME? (TYPE Y OR ND“
646 INPUT As
647 IF AS="¥" THEN GOTO 10
You must then a new line at Sand
change line 30 to add the money you
ended up with at the end of the game
tothe money allowed for thenew
game:
5 LET M=0
30 LET M=M+INT (RND850+10) #P
(Make sure youuse the correct
version of RND for your computer.)
First published in 1982 by
Usborne Publishing Ltd, 20
Garrick Street, London WC2E
9B}, England.
© 1982 Usborne Publishing Ltd
‘The name Usborne and the device
= are Trade marks of Usborne
Publishing Ltd.
Allrights reserved. No part of
this publication may be
reproduced, stored in a retrieval
system or transmitted in any form
or by any means, electronic,
mechanical, photocopying,
recording or otherwise, without
the prior permission of the
publisher.Usborne Computer Programs
Each of these colourful new books contains 14 simple games programs to
play on a microcomputer.” Alongside the programs there are
explanations of how théy work and puzzles and suggestions for ways of
changing them. Through playing these games even complete beginners
will quickly begin to understand how a simple program works and be
itching to write their own. There are tips and hints on writing programs
and a summary of BASIC at the back of each book and also a chart which
will help you convert programs in magazines and other books to work on
your micro.
“The programs in these books are suitable for use on the following
micros: ZX81, BBC, TRS-80, VIC 20, Pet, Apples which use Palsoft BASIC
and ZX Spectrum.
omni
MICRO
computers play Space
they work and what they for absolute beginners. —_ Invaders, chess and
can do, with lots ofideas With lots of programsto _other games, with lots of
for things you can do run on any tips on how to beat the
with a micro. microcomputer. computer.
Published in Canada by Hayes Publishing Lad, $812 Mainway, Burington, Ontario, Canada, LTMLA7.
Published in the USA by Hayes Books, 4235 South Memorial Drive, Tulsa, Oklahoma,
ISBN 0 86020 683 1 v282 £1.99
You might also like
Usborne 1984 - Weird Computer Games For Commodore 64, VIC20, Apple, TRS80-32k, BBC and Electron, Spectrum
Usborne 1984 - Weird Computer Games For Commodore 64, VIC20, Apple, TRS80-32k, BBC and Electron, Spectrum
19 pages