Bomber Overhead

Developer(s): Ian Logan
Date: 1981
Type: Program
Platform(s): ZX80
Tags: Game

Shoot down an invisible bomber on a 1K ZX80. The computer hides the bomber in one of 30 squares of the middle row of a framed board; enter a square from 1 to 30 to fire. Your shot shows as an M, and a shot within two squares of the bomber hits: the squares around it fill in and A GONER is printed. Par is six shots. Press NEWLINE for a new game.

Ian Logan builds the game step by step in his article Writing Game Programs, showing how to POKE straight into the display file; the file is the finished program with all the steps put together.

Published in Syntax July 1981 (Writing Game Programs).

Related Articles

How do you start writing game programs?

Image Gallery

Source Code

10 PRINT "******  BOMBER OVERHEAD  ******"
20 PRINT
30 GO SUB 140
40 FOR A=1 TO 5
50 PRINT CHR$(128);
60 FOR B=1 TO 30
70 PRINT CHR$(0);
80 NEXT B
90 PRINT CHR$(128)
100 NEXT A
110 GO SUB 140
120 CLEAR
130 GO TO 180
140 FOR C=1 TO 32
150 PRINT CHR$(128);
160 NEXT C
 170 RETURN
180 LET D=RND(30)
190 LET E=0
200 PRINT "SHOOT 1-30"
210 INPUT F
220 POKE E,0
230 IF F<1 OR F>30 THEN GO TO 210
240 LET E=134+PEEK(16396)+PEEK(16397)*256+F
250 POKE E,50
260 IF ABS(D-F)>2 THEN GO TO 210
270 POKE E,20
280 POKE E-33,20
290 POKE E+33,20
300 IF NOT F=1 THEN POKE E-1,20
310 IF NOT F=30 THEN POKE E+1,20
320 PRINT
330 PRINT "**  A GONER  **"
340 INPUT A$
350 CLS
360 RANDOMISE
370 RUN

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.