KRAKATOA 2012
by John Pitcher
from Computer Gamer, January 1986

The year is 2012 and Earth has been invaded by aliens. These aliens have made
their base within the extinct volcano. The alien UFOs guard the island and
they have mysteriously awoken the volcano from its dormant state.

Your mission is to first rescue the 10 islanders and return them to your
mothership. Secondly you must collect charges which fell from the sky. When
you have 10 charges you must drop them into the volcano and return to your
mother-ship. The game is played over 3 interconnecting screens.

Keys = cursor keys and 0 to pick up/drop/bomb.

Key in Listing 1 first and follow instructions within the program to save the
machine code.



ZAPPER
by C.Winter & R.P.Newman
from Computer Gamer, January 1986

By R P Newman

This month's article is for the Spectrum, as promised. I hope C16 owners
managed to enjoy last month's article and, with any luck, winning against the
computer or an opponent. This month's game is called ZAPPER, named after the
ship you pilot. The theme is from the left-right-shoot style zap-'em game;
the sort where you are the top of the screen, the commander of a starfighter,
escaping from hoards of mindless zombie-like aliens, who seem to be unhappy
and have the sole purpose of destroying all civilised forms of life - ie. YOU!

The sadists amongst you may be upset at not being able to annihilate the
baddies, but you will be able to. A good idea to combine the skill of
avoidance and the pleasure of killing the bad guys.

Scenario

You are in charge of Zapper, a fully-armed flag ship of the expeditionary
force which Earth has sent out. The first expedition out of the solar system.
While there you discover a new civilisation but, while making contact, you
are attacked. The rest of the force is destroyed and you injured. Your life
support systems are working and that's about it. With only 7-warp, on the way
back they ambush you and try to finish you off. You must avoid them or be
destroyed! You can't avoid them, because you're too low on fuel but you have
a desire for revenge.

Instructions

The ship you are commanding is at the top of the screen. It will scroll up
with the aliens. You must avoid them and their bullets. The controls are on
the keyboard: Z = Left, X = Right

Graphics

For simplicity, User Definable Graphics are used, seven in all. Your ship is
two, one on top of the other.

The computer program has a very useful line in it. Line 500 LET CALL=USR
3280. This scrolls the screen upwards. You may think PRINT would suffice, but
this can be slow, so CALL 3280 is used, scrolling in machine code to speed up
the action. Scrolling the screen is quite hard; it needs to be handled with
care. Make sure you save the program before you run it as, if it crashes, you
can reload and check it thoroughly.

On the subject of scrolling, owners of other computers may wish to know how
to scroll, but unfortunately, to do it with any speed requires machine code.
The PRINT is fairly speedy and OK in some games, but machine code is even
faster.


Line

1         Sets the variables for your lives, three at the start, and your
          position, the middle of the top line of the screen.
2         Sets the screen and border colours. The screen is set to green and
          the border to magenta.
10        REM statement. This doesn't have to be typed in, it's just a way to
          know what's happening when typing in. It can be used before a section,
          like titling the program, or just to let people know who the program
          is by, etc.
20        Another REM statement. REM comes from REMark and everything after a
          REM is ignored by the computer. So, if you have written a program and
          you think a certain line is making it crash, you can put REM in front
          of it. Then, if you need the line, you don't have to type it back in
          again.
30        Another REM statement.
40        Clears the screen.
50        Sets up the variables for the game, such as alien positions.
60        Sets up a loop to read the data. Reads the first piece.
70        A loop to make sure it pokes it in the right location.
80        Pokes the data already read into a location in the ROM, so the first
          line of a User Definable Graphic is set up.
90        Goes back to 70 to continue that loop.
100       Goes back to 60 to continue reading the data.
110       Another REM statement, this time saying it's the Data for the User
          Definable Graphics.
120-200   The data for the User Definable Graphics. There is one graphic on
          each line; ie. eight pieces of data.
210       Asks you if you want instructions.
220       Checks if any keys are pressed. If one is pressed, then it goes to
          line 230. If not it goes back to line 220 and continues doing this
          until one is pressed.
230       This checks to see what key was pressed and if the user wants
          instructions. If Y is pressed, it goes to line 1000. If N is pressed
          then it continues; i.e. goes to the next line, 240.
240       Is another REM, telling about the start of the actual game.
250       Clears the screen again.
260       Prints the top half of your ship Zapper, Graphic A, on the top
          line of the screen as defined by the variable originally defined in
          line 10.
270       Prints the second part of Zapper, Graphic B, on the screen, a line
          below the variable.
275-400   Sets the objects to be dodged on the screen. This is done by using
          PRINT AT W,Z; where W and Z are worked out using RND, so the aliens
          appear in different positions each time. This is good as you can't
          work out a routine. It adds to the enjoyment of the game.
470       Another REM for keyboard operations.
480-490   Check to see whether you have pressed a key. It notes what you've
          done; if you have pressed Z, it makes the variable one less, so that
          next time it's printed up, it's one square to the left. If you have
          pressed X it adds one to the variable so it will be printed one
          square to the right next time. If you press the space bar, it fires.
500       This is the line I pointed out earlier which will scroll the screen
          up one line.
510-580   Randomly print an alien on the bottom line of the screen. The reason
          it's on the bottom line of the screen is so that you have a chance
          if one appears straight in front of you.
590-600   Reprint your ship on the top line, but at the new location, worked
          out in lines 480-490. Line 590 prints the top half of Zapper,
          Graphic A, and line 600 prints the bottom half, Graphic B.
595       Checks to see whether you have crashed, by seeing if there is
          something other than a space directly one line ahead on the bottom
          half of Zapper, Graphic B. If so, one of your three lives is removed.
620       Checks to see whether you have any lives left. If not, it goes to
          line 200. If you have, it continues by going to the next line.
630       Sends the computer back to line 470 for the main part of the program.
1000-1060 Are the instructions sub-routine. They print the instructions and
          then ask you to press a key to play the game.
1070      Checks to see if you have pressed a key and, if so, it then returns
          to the program to play the game. If not, it goes back to the beginning
          of the line and continues to do so until you press a key.
2000      Clears the screen.
2010-2030 Print up a message saying you have failed and asks you whether you
          want another game.
