www.jupiter-ace.co.uk

Previous Page > Listings Index > Meteor - PCWeekly 20 March 1983.


Meteor


Popular Computing Weekly 24-30 March 1983, page 19.


Meteor
on Ace
You are in a Space Ship where you have accidentally plunged into a meteor storm and as the Space Ship Commander you have to navigate through the storm.
The ship can withstand the impact of two meteorites and is destroyed by the third. A score is then displayed on the screen with random beeps from the computer.
The program can be run in fast or slow mode and the speed  can be adjusted   by  altering the
Beep in the world Game. The word Point can be useful in other programs requiring two numbers on the stack and replaces it by the ascii value of the character occupying that square.
The program is started by entering the word Game. The spaceship is moved from side to side using the 5 and 8 keys. After completion of the game press Break to stop the Bleeps. To play again enter Game.
If the program does not work and the ship does not move correctly, the error will be in the words   Ship   and Move.   If   the
UFO's do not move up the screen, you will most probably have left the CR's off the end of the word UFO.
The game requires a random number generator. A routine is included from the Ace manual. The words Seed, Seedon, Rnd and Rand are used.
First set up the following characters:
: GR 8 * 11263 + DUP 8 + DO I C! -1 + LOOP ;
: SHIP 40 124 84 124 254 186 146 0 1 GR ;
: METEOR 28 62 127 255 255 254 124 56 2 GR ;
This program should be tested, saved and verified, then use Forget GR to allow sufficient memory for the main program.


: POINT AT 152388 @ C@ ; : MOVE INKEY DUP 53 = IF x @ 1- x ! THEN 56 = IF x @ 1+ x THEN ; : END 10 10 AT ." SCORE:"S @ . BEGIN 100 AND 20 + 50 BEEP 0 UNTIL ; : SHIP 0 x @ POINT 2 = IF L @ 1- DUP L ! 0= IF END THEN 300 300   BEEP 200 150 BEEP 250 150 BEEP 300 300 BEEP 400 700 BEEP CLS   THEN I EMIT ; : UFO 22 32 RND AT 2 EMIT CR CR ; : SET 3 L ! 0 S ! 15 x ! CLS ; : GAME SET BEGIN MOVE SHIP 1000 20 BEEP S @ 1+ S ! UFO 0 UNTIL ;

The following variables need to be initialised before typing in the main program:- 15 VARIABLE X 3 VARIABLE L 0 VARIABLE S
Meteor
by G E Richards