ZX COMPUTING August/September 1983
==================================


AIR-RAID
by H.T. Davis
from ZX Computing Aug/Sep.1983

AIR RAIDERS

More overhead excitement in this Spectrum program, courtesy
of Mr HT Davis of Hereford.


This program differs a little bit from the normal 'war time'
simulation games in that the shells actually follow a
parabolic trajectory. The equation used to work out their
motion is calculated in line 75 and simulates a projectile
under gravity.


What goes up ...

The initial velocity and angle of projection can either be
selected by the player (mode x) or by the computer (mode z).
The aim of the game is to destroy the overhead aircraft,
launched ICBMs and the ICBM base; the ICBMs and their base
must be destroyed using shells and the aircraft should be
destroyed using rockets. The game stops either after eight
cycles or if you accidentally destroy an allied aircraft
(you can spot them because they're blue!).

Full instructions are included in the program, including
when one can fire a shell or a rocket. The program occupies
virtually all of the 16K memory.


A variable situation

The variables used in this program are:

g	- The number of game cycles.
p	- The game mode.
s	- The score.
r	- The rocket drive.
v	- The rocket control.
w	- The random element in the aircraft and ICBM drive.
x	- The aircraft and ICBM drive.
(x,y)	- The shell trajectory pixels.
(q,m)	- The shell trajectory co-ordinates.
z	- The shell control.
U	- The shell launch velocity (V on display).
A	- The shell launch angle.


--
Another Fine Product transcribed by:
Jim Grimwood, Weardale, England
--


**********************************************************************


ALIENS
------
Can you defend the Earth from the invading aliens in this game written for us
by Andrew Cole of Burnley?

In this game for your 16K Spectrum, you command a missile base which you can
manouevre along the surface of the Earth, using the 'p' key to move right and
the 'o' key to move left. To fire a missile you have to press the 'q' key.

The aliens, in their usual unfriendly way, re-energise at different levels
above the Earth, one at a time. It is your job to shoot them out of the sky
before they get enough ships out of hyperspace to destroy the Earth. Once
they have 10 ships positioned over the surface, they will be in a position to
do this. So, your mission, should you choose to accept it, is to keep down
the number of aliens in the sky to less than 10.

You can only fire one missile at a time on-screen, but if you find it too
difficult to play at one level, you can always choose another - there are
five skill levels in all.


**********************************************************************


APPLE CATCHER
by Russell Morgan
from ZX Computing Aug/Sep.1983

AN APPLE A DAY ...

A program to keep the doctor away, written for us by Russell
Morgan of Clevedon.


Here's a game to set you on the path to health - you collect
apples as they fall off the tree!

Using the '5' key to move left and the '8' key to move
right, you control the figure beneath the branch of apples
at the top of the screen. The apples fall from the tree one
at a time and you have to position your character so that
the basket it holds is directly beneath the falling apple.

When you have caught 15 apples, or a multiple of 15, then
you move up a row - which means the apple has less distance
to fall thus making your task harder. There are three skill
levels, level one being the hardest and level three the
easiest.

Should you miss 10 apples, then the game ends with a few
bars of music and you are invited to have another game.


--
Another Fine Product transcribed by:
Jim Grimwood, Weardale, England
--


**********************************************************************


BATS
----
Here's a batty program for your 16K Spectrum from Colin Gooch of Ilminster.

In this program, you are a bat flying about trying to secure some moths for
your supper. Movement is made via the four "arrow" keys on the Spectrum, and
to make a catch you have to place the centre of the bat character directly
over the moth. Watch out though - the moth moves totally at random.

Because your bat cannot fly in bright light, the moth can escape you by
flying into the lighted window in the top left-hand corner of the screen. All
you have to do is trap the moth before it gets there! The game ends when you
have attempted to catch ten moths, although there is a bonus if you manage to
catch all ten.

Holy bat-catcher!

Initialisation of the graphics is done in lines 2230 and 2250. This leads
straight into the instruction page which is completed by lines 2300 to 3030.
This last section is not repeated when you play subsequent games after your
first.

The main program begins with line 50, which calls the subroutine to print the
screen display, followed by lines 90 to 120 which initialise the screen
co-ordinates for the bat and the moth. Lines 200 to 300 are a loop which
constantly moves the position of the moth, and if the right keys are pressed
this section of the program actually moves the bat.

The conditional statements for the moth make sure that it stays within the
screen area and also reverse its direction should it get too near to the
edge. The moth is moved 'dx' and 'dy' across and up the screen, but it is not
incremented on each pass of the loop. It is the RND value in lines 230 and
240 which look after this latter task, and it is this which gives the moth
its random movement.

The conditional statements for the bat read the keyboard, keep the bat on the
screen and also ensure that it will not move into the area of the window.
Line 320 detects a caught moth and moves on to the scoring section of the
program. Lines 330 to 350 detect the moth in the vicinity of the window, and
once there it is automatically drawn into the window, the moth's home score
is updated and a new moth appears down in the bottom right-hand are of the
screen.

Scoring is carried out from lines 370 and 520. This includes a "high score"
routine, and offers you a bonus "go" if you managed to catch ten moths out of
ten. This invitation comes courtesy of lines 530 to 580.

Flying tonight

The REM at line 20 indicates which lines need letters typed in the graphics
mode. Lines 250 and 260 use keyboard graphics and it is important that you
get four blanks at the end of each string.

Line 3400 looks the most complicated. However, if you decide that you don't
want to put a title or instructions in your listing, you could always rewrite
line 2400 to read:

2400 RETURN

and omit all from thereon.


**********************************************************************


THE HOUSE
by Chris Cox
from ZX Computing Aug/Sep.1983

THE HOUSE OF HORROR

Dare you enter the haunted house? Find out in this program
for your 16K ZX81 from Chris Cox of Truro.


It was a dark and stormy night (as Victorian writer, Edward
Bulwer Lytton, used to say) when Chris Cox decided to write
this program!

The plot of the game is that you have been transported to a
deserted mansion, full of hidden treasure. All of the
treasure was kindly left by the last owner of the house, but
unfortunately he also left a number of his 'pets' to guard
his fortune. And yes, you've guessed it, his 'pets' (in the
shape of monsters!) are none too pleased by your intrusion.
And if that wasn't enough, you have to watch out for the
roaming reaper who has a liking for people's heads - it's
not too interested in the rest of your body though (need I
say more!).

Instructions appear throughout the program telling you in
which direction you can go. You move around the randomly-
generated selection of halls and stairways constantly
exploring until you find treasure, keys to open some of the
locked doors and, of course, a grim selection of monsters.

The more coins you find, the less frequent large finds
become; however, as you come across less coins, you'll find
more keys and have more encounters which means you can
explore more of the house.

The game ends when you have found over 2,500 coins, run out
of strength warding off the monsters or you've had your head
removed by the roaming reaper!

Happy hunting!


--
Another Fine Product transcribed by:
Jim Grimwood, Weardale, England
--


**********************************************************************


LEMONADE STAND
by Michael Guy
from ZX Computing Aug/Sep.1983

GETTING FIZZICAL!

An adaptation of the popular game, Lemonade stand, for the
Spectrum by fourteen year old Michael Guy of Runcorn.


[NOTE: If the cost price is exactly 10p less than the sale price]
[then line 330 gives "Number too big" (dividing by zero).   JimG]


Having seen the program, Lemonade stand, adapted for a
variety of micros, Michael was a little disappointed not to
find a version of the game for the ZX Spectrum. So, like any
enterprising programmer, he sat down and wrote one for
himself. The result of his work follows in the published
listing - you should enjoy it, his computer club liked it so
much they awarded him a small prize!


In the drink

In the program, you are placed in charge of a lemonade stand
in Hyde Park, London. You start off with a mere #10 and your
object, in true capitalist fashion, is to make as much money
as you can. Fortunately, there are only two major decisions
you need make: how many cups to make that day and how much
you intend to charge for each cup of lemonade.

Once this decision has been made, you will be greeted with a
screen display of two glasses on the counter which slowly
fill up. A clock appears on-screen to tell you the time of
day, and you have to shut up the stand at seven o'clock.
[Eight o'clock, actually. JimG]

At the end of each day, you are shown a report of the day's
takings, and your profit and losses are added and subtracted
from your total spending money. Should you run out of money,
you will be told how well you did and if you manage to last
out the whole week, you will be given some praise.

Take care of the vandals though, if they wreck your stand
you'll have to fork out #20 to get the repairs done!


--
Another Fine Product transcribed by:
Jim Grimwood, Weardale, England
--


**********************************************************************


MOON RESCUE - John Miller - (ZX Computing-Aug/Sep 83-Page 98)

RESCUE THE ASTRONAUTS IN THIS LUNAR LISTING FRO YOUR SPECTRUM, COURTESY OF
JOHN MILLER.

The object of the game is to rescue the ten astronauts stranded on the moon.
You have three rather ancient space craft capable only of left and right
movement, and an initial thrust to clear the surface of the moon.
  At the beginning of the game, you are docked in your mothership traversing
left and right at the top of the screen. Below are asteroid-type objects, and
all you have to do is to get through this layer and you'll find the astronauts
on the surface of the moon.

MOON MADNESS

To start your descent, press the '0'; after that you can only move left and
right using the '5' and '8' keys respectively - you descend automatically.
During your descent you must avoid hitting the asteroids and then attempt to
land your craft on the magenta landing pads. Once down safely, there will be
a short delay while one of the astronauts clambers aboard. You then have to
make your way back to the mothership, this time trying to avoid the cyan enemy
ships which guard the planet.
  To begin your ascent, press the '0' key again and then guide your ship using
the cursor keys to move left and right until you dock with the mothership.
Once docked, you unload your human cargo and head off to rescue another
astronaut.
 The game ends when you have either rescued all ten astronauts or lost all
three of your ships. Should you find the game to easy, you could always alter
the velocities of the asteroids and the enemy space craft by changing the
value of PINC in line 9042.


- All this about keyboard controls, this version has been modified to use the
  Kempston Joystick.


This info file was typed by Michael Bruhn 7/6-1998


**********************************************************************


MOTOR MADNESS
by Keith Ditchburn
from ZX Computing Aug/Sep.1983

Enter the Grand Prix in this program for your ZX81 written
for us by Keith Ditchburn of Danby.


You are a racing driver in the Grand Prix and you must steer
your car using the '5' and '8' keys to move left and right
respectively.

The machine code takes up to 50 bytes and should be located
in a REM statement with the starting address 16514. The
routine you'll need to POKE this into your computer follows
below:

   1 REM 50 Es
  10 LET A=16514
  20 INPUT N
  30 PRINT N;",";
  35 POKE A,N
  40 LET A=A+1
  50 GOTO 20

Once this program has been entered into the computer you
should type in the following numbers. (The commas separating
the numbers represent Newline.)

42, 12, 64, 229, 17, 33, 0, 25, 209, 1, 214, 2, 237,
176, 42, 12, 64, 35, 6, 15, 35, 5, 194, 150, 64, 14,
126, 6, 16, 17, 33, 0, 25, 5, 194, 162, 64, 6, 5, 5, 35,
113, 194, 169, 64, 201,

Okay, you're on your own now - happy racing, and try and
keep out of the fast lane!


--
Another Fine Product transcribed by:
Jim Grimwood, Weardale, England
--


**********************************************************************


NOUGHTS & CROSSES
by S.P. Stratford
from ZX Computing Aug/Sep.1983

NAUGHT BUT A GAME!

The classic game of Noughts and Crosses for your ZX81,
courtesy of SP Stratford of Hemel Hempstead.


This program has the ZX81 playing a pretty mean game of
Noughts and Crosses against a willing opponent. The program
requires about 7K of RAM to operate.

In this game you are the 'noughts' and the computer is the
'crosses'. The program is divided into several parts:

DRAWC	-	Draws the computer's piece
DRAWP	-	Draws the player's piece
WIN	-	Checks to see if someone has won or is a draw.
COMP	-	The computer's move
PLAYER	-	The player's move
CLEAR	-	Clears the player's prompts
GRID	-	Prints the playing grid

Each part of the program is called by the GOSUB command, for
example GOSUB COMP is the subroutine for the computer's
moves.


Three in a row

The following is a brief guide to some of the more important
lines in the program:

5005-5020  Find if one of the players has a row of three counters.
5200       The player gets two points for each win.
5320       The ZX81 gets five points for each win.
6005-6008  Work out the average value of RND.
800        Ensures the print position is in the top left-hand corner.
8200-8210  Make sure that the scores do not run onto the board.


--
Another Fine Product transcribed by:
Jim Grimwood, Weardale, England
--


**********************************************************************


PEEPER
------
Someone's watching you!
A paranoid program from David Wilkins of Liphook in Hampshire.

In this game for your 16K ZX81 you are looking up at a four storey building.
On each floor there are five windows ... and someone keeps looking out of
them at you.

From your vantage point you have a good view of the windows, and whenever a
face appears at one of the windows you have the opportunity to fire a shot at
it before it disappears.

Going stare crazy

A total of thirty heads could look at you, although the window they will
choose will be random each time. When a face appears at a window you must
position your character directly underneath using the '5' key to go left and
the '8' key to go right; then you can fire at the face. To fire a shot at the
head on the first floor press the '1' key, for a shot at the second floor
press the '2' key, and so on.

Each time you hit a head you score a total of 200 points. However, firing at
higher level floors uses up more energy than firing at the lower floors. A
first floor shot will cost you 10 points, a second floor shot will count for
25 points, 50 points for a third floor shot and 100 points for a shot at a
head on the fourth floor.

You start off the game with 1,000 points, but you'll soon find that a few
missed shots at the fourth floor will soon deplete your score. The game ends
after 30 heads have appeared at the window or if you run out of points.

The game also includes a high score feature and instructions for the game's
operation are included within the program.


**********************************************************************


PONTOON
-------
Play Pontoon on your Spectrum with this game written for us by C.Taft of Coventry.

This program simulates the game of Pontoon, in which you get to pit your wits
against the computer.

When RUN, you will be dealt a card and asked to place a bet; bets can only be
made up to a certain amount - within 10% of your credit. You will then be
dealt another card and given the option to "stick", "twist" or "buy". This is
done by pressing the appropriate key on the keyboard; ie. the 's' key to
stick, the 't' key to twist and the 'b' key to buy.

Your deal ...

If you've never played Pontoon before, here is a brief resume. You are dealt
a single card, and on that you have to work out how good your hand might be
and place a suitable bet accordingly. You then receive your next card. The
idea of the game is to make your cards up to a value of 21. Kings, Queens and
Jacks are all worth 10 points each, and an Ace can be worth one or 11. With
the two original cards you hold, you must decide either to "stick" which
means you pick up no more cards, "twist" which means you receive another card
(you can receive up to three more cards), or "buy" which means you receive
another card but you buy it from the dealer so that you effectively increase
your bet.

The winner of a hand of Pontoon is the one who gets their cards to total 21
or the nearest to 21. If you get five cards to total 21 or under, then this
is known as a "five card trick" and this hand beats all. Should the computer
and your hand equal the same, it will depend on who is dealing as to who will
win - in the game of Pontoon, this is known as Banker's privilege.

Twist and shout

When you have settled on your final hand and pressed the 's' key to stick
then the computer deals its own hand, decides whether to stick or not and
finally checks its hand against your own. The computer then either takes your
bet if it has won or returns your original bet plus your winnings if you
managed to have the winning hand.

One nice touch in the program is that the computer doesn't just keep dealing
itself cards until it beats your own hand or "goes bust" (which is
Pontoon-talk for holding cards which total more than 21) but actually makes a
decision whether or not to draw another card. This decision is based on the
value of the cards you have stuck on and the amount of cash you have placed
as your bet. Only when the computer has stuck are the cards displayed and the
winner announced.

Variations on a theme

Although there are copious REM statements throughout the program to help you
follow its intricacies, here is a list of the variables used.

AMT  - Amount of credit.
ITME - The Spectrum or player dealing.
ACEI - An Ace has been dealt.
ME   - Value of the player's final hand.
V    - Current value of the cards.
T    - Number of cards dealt.
ODDS - Calculation for the Spectrum to decide whether to stick or not.
Bet  - Amount bet on the initial card.
Buy  - Total amount for bought cards.
Stake- The stake for each game.
S$   - The suit of each card.
R$   - The Jack, Queen or King.


**********************************************************************


RECONNAISSANCE ALERT
by Stephen Smith
from ZX Computing Aug/Sep.1983

It's action stations all the way in Stephen Smith's program
for your ZX81.


The object of this game is to shoot down the enemy
reconnaissance aircraft before they can relay your secrets
back to their headquarters. The program requires 8K as it
stands, but the PRINT statements after line 650 could easily
be shortened to allow for a smaller memory capacity.


In the air tonight

Displayed on your control panel are the bearing (of the
enemy from you), the distance (between you and the enemy),
the air speed, the heading (degrees from 0 North), altitude
(in metres above the ground), the flaps (which alter the
heading of your 'plane) and the artificial horizon (which
alters the altitude).

When the flaps are set, up to a maximum of +/-3, they will
continue to change the heading until reset at zero.
Likewise, the artificial horizon (A/H) will continue to
change the altitude until reset at the centre.

The first thing to master is the take-off - you need to get
your speed to around 70mph, but if you go too fast before
attempting to take off (arrow keys '+' and '-' will change
your artificial horizon) you will inevitably crash into the
control towers at the end of the runway! It this happens,
the radio crackles and messages appear on the screen (this
is my favourite routine - see lines 700 to 800).

Once the enemy is within distance 20 and bearing 10, the
enemy aircraft will appear in your 'plane's window provided
the craft is at your altitude or up to 10m higher. Your
firing range is within a distance of 10.


In control?

The controls you have at your disposal in your 'plane are:

F	-	Fire.
2	-	Slow down.
1	-	Slow down fast.
9	-	Speed up.
0	-	Speed up fast.
6	-	Decrease artificial horizon.
7	-	Increase artificial horizon.
5	-	Decrease flaps.
8	-	Increase flaps.

The '5', '6', '7' and '8' keys correspond to the arrow keys.
The important variables in the program are:

ES	-	Enemy speed.
S	-	The speed of your 'plane.
H	-	The heading of your 'plane.
EA	-	Enemy altitude.
A	-	The altitude of your 'plane.
F	-	Flaps.
AH	-	Artificial horizon.
AM	-	Ammunition left.
D	-	Distance.
B	-	Bearing.
X	-	Your x-axis value.
Y	-	Your y-axis value.

These last two values are taken from the position of the
enemy craft - your opponent is always at position (0,0)
heading along the y-axis.


Down the line

Here is a breakdown of some of the more important lines in
the program:

48-100	Assign the 'calculating' variables.
110-220	Print the control panel.
230-285	Assign the 'displayed' variables.
300-490	The main program loop.
390	The heading conversion from plot to degrees.
400-460	Calculate the new co-ordinates, bearing and distance.
500	The routine for speed change.
535	The routine for artificial horizon change.
540	The routine for changing the flaps.
600	The fire routine.
700	The routine controlling a crash into the end of  the runway.
800	The routine for no enemy 'planes left.
850	The routine for when your altitude is less than zero.
900	Loading routine.


[NOTE: The correction from the following letter printed in the    ]
[Dec'83/Jan'84 issue has been included, but I haven't been able to]
[test it as I've never managed to catch up with a plane.      JimG]


BUG ALERT

Dear ZX Computing,

I have now been the proud owner of a ZX81 with 16K RAM for
just over a month now, and two weeks ago I bought my first
ever issue of ZX Computing - the Aug/Sept issue, in fact.

Since then, I have had many fun-filled hours of shooting
down enemy spy 'planes in ... yes, you've guessed it ...
Stephen Smith's Reconnaissance Alert. But I could not
understand why I kept getting a great deal of enemy aircraft
on the screen at once. You see, the enemy kept leaving
shadows of themselves on the screen.

Eventually I managed to trace the error to line 415, in
which the '10+B' should in actual fact be altered to read
'10+D'. This then gives one 'plane which rubs itself out as
it moves, instead of leaving a trail of exact replicas
behind!

I hope my small correction helps to make the enjoyment of a
superb game even better.

Yours faithfully,
Neil Wright,
Notts.


--
Another Fine Product transcribed by:
Jim Grimwood, Weardale, England
--


**********************************************************************


REVERSI '80

A splendid adaptation of the popular board game for your ZX80.
written by Kar Wing Wong of Fredericton, Canada.


This program is designed for anyone who doesn't own the board game, but would
like to play a game of Reversi with someone other than the computer.

First up, you should type in the program shown in Listing 1. Once this is
done, you should type, in the immediate mode:
	POKE 16403,20
to get rid of line 1, so that the program won't crash. Now RUN the program
and input the numbers on the right-hand side of Listing 2, treating each
comma as an instruction to press ENTER. After you have finished typing in
the data, go into immediate mode and type PRINT B. If the answer is '7026',
the program should be OK and you should SAVE what you have so far achieved.

Going over board

From now on, do not try to LIST without a line number, RUN, or press Home or
Clear, as you will lose the program. Now type in the BASIC part of the
program as shown in Listing 3.

To save memory space, all the variables used in the program must be assigned
in immediate mode; this will also enable us to find the start of the screen
address in the very beginning of the program. The value and name of each
variable is shown in Table 1.

To RUN the program, simply type GOTO 10 and you'll see a board similar to
that shown in Fig.1. Notice the arrow head indicating which player is next
to play and the number of pieces each player has placed on the screen.

In the move

To move, you type in the co-ordinates as a single number; for example, if
you wanted to place one of your pieces in the bottom right-hand corner, you
would type in '18'. If the move is illegal, the arrow head will stay pointing
to the player who made the illegal move and wait for a legal instruction.
Once a legal move has been made, the arrow head will move to point at the
other player's score.

If you cannot move, you should input '99' and the computer will automatically
go to the next player's move. After each move, the number of pieces each
player has placed will be re-adjusted and printed on the board.

The game will stop automatically when the board is full, but if neither
player can move at any stage of the game you can type in a letter and stop
the game.



Program description

Lines       Description

10        - Activates the machine code program.
20-30     - Assign the number of pieces each player has when the game starts.
35        - The finding of the starting address of the display file.
40        - POKEs the number of pieces each player has.
50-51     - POKE the arrow head on the screen indicating whose turn it is.
52        - INPUTs the move.
53        - Checks to see if a player wants to give up their turn.
55        - Initializes the sub-total of the move.
60        - Finds out the address of the player's choice.
70        - Checks to see if that address is being occupied by other pieces.
90-180    - The checking routine for finding whether the move is legal.
190       - If the sub-total of that move is zero then the player must input
            another move.
200       - Changes to another player's turn.
210       - P0KEs the number of pieces each player has on the screen and
            waits for another move.
1000-1080 - The flipping routine to find out the number of pieces flipped in
            that direction.
1090-1100 - Reads the number of pieces each player has.
1110      - Goes back to check another direction.
2000-2030 - POKE the number of pieces on the screen.
2035      - Checks to see if the board is full.


**********************************************************************


TOURIST TRAP - Colin Gooch (ZX Computing-Aug/Sep 83-Page 50)

GET THE HOLIDAY HORRORS IN THIS SPECTACULAR BOARD GAME FOR YOUR 48K SPECTRUM,
WRITTEN FOR US BY COLIN GOOCH OF ILMINSTER.

This is a 'board game' program for two players to play against each other,
rather than one person against the computer. It is a fairly large program
using a major portion of the 48K RAM available on the larger Spectrum. This
means that SAVEing and LOADing will take quite some time. The playing of
one game usually takes something like 40 minutes.
 You can consider the program as operating in four main parts:

1) The initialisation of values and graphics, the printing of the
instructions and then the playing board display.
2) The dice calling routine to decide your throw.
3) The moving of your piece and the diversion if required at that new
position onto a subroutine which will decide your score for that throw.
4) The end game routine.

After the first part has been executed, lines 120 and 130 will keep the pro-
gram looping through the second and third parts, automatically changing the
players, until the end game condition is fulfilled to break out into the
fourth part.

GOING FOURTH

The four sections operate as follows:

PART ONE Lines up to 100 call all the initialisation routines. Line 9000
allows the instructions to be displayed while the user-defined graphics are set
up. These are the two playing pieces, plus a number of odd shaped 'blobs' used
to create pictures in the course of play. The board printout begins at line
8000. The PLOT/DRAW facility draws out a playing track around the outside of
the display area allowing the centre to remain clear for the various graphics
routines. The playing squares are numbered using different combinations of
INK, PAPER and BRIGHTness, these being controlled by the DATA statements at
line 8000. It is the attributes on these squares that will decide the 'fate'
of a player landing on them. It is most important that these are not altered
or you will not be sent to the correct subroutines.
PART TWO The dice routine is a straightforward affair. The variables for the
'pips' are in line 8300 onward and it is printed out as required by GOSUB
8425. To roll the dice you press Enter and keep it pressed until you think you
have the number you want. Removing the pressure will stop the dice.
PART THREE Moving the pieces around the board is more complicated. It is done
by a series of FOR...NEXT statements. These take the value of the dice thrown
as the second control value in the statement and move the piece along that
number of squares. If that line runs out of squares then the next FOR...NEXT
loop will use up the surplus. (I'm usually fond of conditional statements, but
in this case found this system operated in a speedier manner.)
 On arriving at a square, the attributes of the number of that square is read.
If it is 104 then that turn ends, line 6660 changes over the player and your
opponent will have their turn. If it is anything other than 104 then the value
is converted to a GOSUB line and off you go to see what fate is in store.
 The bulk of the program consists of these subroutines which I will let you
discover for yourself. The operation of these routines is fairly straight-
forward. There are nice things that will happen, not so nice things and, of
course, some disasters - all of which lose or gain you points, lose you money
and use up your petrol. If you run out of petrol, you will have to pay for a
rescue and if you are on the way to a location, you will lose the rest of that
turn. The game ends when one person runs out of money...but the winner is the
one with the most points, so towards the end of a game tactics can become
important!
PART FOUR Brief and simple. Once one person is out of money, line 130 fails to
maintain the loop and the 'game over' signal shows. The final scores are then
displayed. The score display routine is at line 8600 and is used at intervals
throughout the game. Line 8610 ensures that petrol and money are only displayed
to two decimal places; without this line you'll find that as the game progresses
you end up with petrol designated in scientific notation!

EASY TO ENTER?

Debugging a program of this size can be a bit daunting and so I would suggest
it is entered in sections. Enter the program as listed but omitting all the
subroutines from line 1000 to 6490. This will allow you to get the board
display and the piece moving routines all in the working order. To do this enter
a temporary line, 6480 RETURN. RUNning the program will then result in every-
thing happening except any of the scoring subroutines. The subroutines can
then be entered one at a time and tested out. There is no need to keep going
round the board to test these, just let the Spectrum print out the board, then
break into the program and type in GOTO (the appropriate routine) and all will
be well. (The 'Press enter to continue' uses the form 'INPUT:LINE Z$' which
means that the usual Break and Stop keys will not work. Never fear. Use Caps
Shift and '6' and you will get a 'stop in input' message.) The 'out of petrol'
routine is the most difficult to test and may best be left until you are happy
with the others.
 Most of the graphics are straight off the keyboard. The only user-defined
graphics that are vital are those for the two players pieces and the dots on
the dice. The others are not so vital but if you enter and RUN line 9000 to
9140 fairly early on, it is easy to see which keys are required.

WE'RE OFF

When all is entered and you are ready to play you will first of all see the
instructions, then the Spectrum will choose at random someone to start. The
board is then printed out; the player whose turn it is will be shown on the
right-hand margin. If you throw the dice and land on a square that is not blue
then some graphics and instructions will appear in the centre of the screen.
To continue to play, simply follow all the prompts. To enter in the spirit of
it all, you must imagine that you are on tour in a car, with a tent, and have
the opportunity to visit various places...wild life parks...castles...the sea
and so on.
 So off you go. Happy holidays.

VARIABLES

The main variables used are:

C(x) Cash on hand.
D    Value of dice throw.
H(x) horizontal position of playing piece.
J(x) Total score.
LO   Flag indicating turn to be lost.
MI   Miles to travel.
P(x) Petrol in gallons.
PL   Player.
SUB  Subroutine in use.
TI   Flag to check the number of times the petrol is evaluated.
V(x) Vertical position of playing piece.
Z$   Line input.

        (x) will be one or two according to value of PL.

The subroutines use many more variables, but they are confined within those
routines and are not difficult to trace through. There are also a number of
DIMensioned strings and variables. These are used in several routines and are
reDIMensioned each time that routine is called.


This info file was typed by Michael Bruhn 13/6-1998


**********************************************************************



Muncher 2
by Robert Turner
from ZX Computing August 1983, page 13

Muncher 2

Robert Turner of Gwent presents the 16K adaptation of his arcade action
game, Muncher.

In the June/July issue of ZX Computing, we were able to publish the
program Muncher -- a Spectrum version of the popular arcade game of the
dot eating kind. For all those of you with 16K 2X81s who have yet to
convert this program for your machine, the original author, Robert Turner,
has done the job for you!

For those not familiar with this "famous" game, you control a small
character, an arrow, which travels around a small maze eating dots as it
goes. That's not quite the end of the story though! As in all good arcade
games there should be the omnipresent monsters -- and this game is no
exception. You are chased around the maze by two monsters eager to halt
your progress.

However, all is not lost as there are power pills situated in the corners
of the maze which, when consumed, give your character the ability to
destroy the monsters. You'll know when the monsters are vulnerable as
they develop 'eyes'. When you have eaten a power pill, don't hang around
as the monsters try to escape.

You score one point each time you eat a dot, and power pills and monsters
are worth 10 points. Every now and then a '' sign will appear under the
monster's den and this too is worth 10 points if consumed.

So, don't just sit there -- type in the program and watch out for the monsters!




3D Mover
by DJ Munro
from ZX Computing August 1983, page 110

3D mover

Creating a three-dimensional image on your 16K ZX81 is not as difficult as you
might imagine with this program from Mr DJ Munro of Coleraine.

I have been interested for some time in trying to get a program to RUN on the
ZX81 which displayed a solid object rotating in space giving a
three-dimensional effect.

The program, once typed in, requires a full five minutes RUNing time to
complete the POKEing of each of the six picture frames. The program will then
automatically begin. The display is quite realistic -- there is no screen
flicker or jumping -- and shows a rotating rectangle, spinning on a fixed axis.
The rotational effect lasts for around 30 seconds and looks something like the
illustration shown in Fig, 1.

Shapes of things

The shape of the figure is easily altered by changing the coordinates, X() and
Y() in lines 140 to 600. (You'll need to do this on plotting paper though)

One restriction of the program is that only the top half (lines 0 to 10) can be
used. When I first developed the program, I tried to use the whole screen but I
ran out of memory (even with the 16K RAM Pack attached!).

Once you have the program entered into the machine, it should be SAVEd before
you attempt to RUN it. Once it has been RUN, any new instructions have to be
typed in "blind" as the PRINT position has been moved down below line 23 of
the screen. If you want to re-RUN the program, you should type in "GOTO 1000";
this will also have to be done "blind".

As a final point, the insertion of a '' sign at lines 630 and 650 is to end
each frame with a code signal for the operating machine code to recognise the
end of a frame, and the end at the last (the Sixth) frame.

BASIC notes

Here is a breakdown of the BASIC part of this listing:

Lines 140-600	Initialisation -- coordinates of the
		Corners of each wire frame (there are Six
		frames altogether).

SUB 4010	Enters the operating machine code
		starting at address 33000 from A$
		leaves A$ as an empty string.

SUB 1500	SUB 2500 and SUB 3000. Prints the
		picture of each of the six frames in turn.

Lines 660-800	Convert the picture frame into Hex code
		and store code in a character string (A$).

SUB 4070	POKEs the Hex code into memory
		starting at the address after the
		operating code (address 30042) and
		leaves A$ as an empty string ready for
		the next frame.

Lines 1010-1060	Calls up the display with RAND USR 30000.