A downloadable game

OBJECTIVE

The objective of the game is to land your airplane without hitting 

obstacles. Pressing any key drops a bomb that destroys the obstacles 

below. At most one bomb can be dropped at a time.

If you hit an obstacle with the plane, the plane explodes and it's game 

over. Pressing any key starts a new game with a new skyline. There is no 

explicit score, but the lower you get, the better.

If the plane comes to a halt at the bottom right corner of the screen, 

you won. Pressing any key starts a new game with a new skyline.


EXPLANANTIONS

These three statements draw a green floor under the playing area:

   10 BORDER 4

    : CLS 

    : BORDER 7

The h() array holds the height map of the obstacles:

    : DIM h(32)

This loop initializes it to ground level:

    : FOR i=1 TO 32

    : LET h(i)=22

    : NEXT i

Variable b is the row of the bomb, or zero, if no bomb is dropped.

    : LET b=0

The following loop (variable i) initializes the random obstacles:

    : FOR i=2 TO 29

    : LET h(i)=22-INT (RND*RND*15)

The inner loop (variable j) draws the obstacle:

   20 FOR j=21 TO h(i) STEP -1

    : PRINT AT j,i;"."

    : NEXT j

    : NEXT i

The following loop initializes the UDG (User Defined Graphics) of

the plane and the bomb:

    : FOR i=0 TO 23

    : READ j

    : POKE USR "a"+i,j

    : NEXT i

The actual game begins here. The outer loop (i) is for the row,

the inner loop (j) is for the column in which the plane is displayed:

   30 FOR i=0 TO 21

    : FOR j=0 TO 30

    : PRINT AT i,j;"\a\b"

Check if we hit an obstacle and jump to line 90 if so:

   40 IF h(j+2)<=i THEN GO TO 90

If a key is pressed and no bomb has been dropped then drop the bomb:

   50 IF INKEY$<>"" AND NOT b AND i<21 THEN LET b=i+1: LET c=j

If a bomb is droped then display it:

   60 IF b THEN PRINT AT b,c;"\c"

If a bomb hits an obstacle, lower it:

    : IF c THEN IF h(c)<=b THEN LET h(c)=b+1

With the probability 1/8 stop the destruction of the obstacle:

    : IF RND<.125 THEN PRINT AT b,c;" ": LET b=0

Wait a bit and syncrhonize with the raster beam:

   70 PAUSE 3

If there is a bomb falling, erase it:

    : IF b THEN PRINT AT b,c;" "

Move it one row lower:

    : LET b=b+1

If it hit the ground, stop it:

    : IF b=22 THEN LET b=0

Erase the airplane:

   80 PRINT AT i,j;"  "

Loop the loops through columns and rows:

    : NEXT j

    : NEXT i

Display the airplane at the end of the landing strip

    : PRINT AT 21,30;"\a\b"

Wait for any key pressed:

    : PAUSE 0

Restart the game after victory:

    : RUN

We come here after hitting an obstacle. Display the explosion: 

   90 PRINT AT i,j;"**"

Wait for half a second:

    : PAUSE 25

Hide the explosion:

    : PRINT AT i,j;"  "

Wait for any key pressed:

    : PAUSE 0

Restart the game after defeat:

    : RUN 

UDG (User Defined Graphics) data for the airplane and the bomb:

  100 DATA 0,1,96,242,247,255,127,64,0,254,72,145,253,255,253,33,124,56,16,124,124,124,124,56




Install instructions

The program works with any model of ZX Spectrum computers or clones.

We recommend using the fuse ZX Spectrum emulator as follows:

fuse blitz10.tap

You can stop the program with Shift + Space and obtain a listing. It can 

be restarted with the RUN command or continued with CONTINUE.

Download

Download
blitz.txt 524 bytes
Download
blitz10.bas 831 bytes
Download
blitz10.tap 852 bytes
Download
explanations.txt 2 kB
Download
running.txt 284 bytes

Leave a comment

Log in with itch.io to leave a comment.