City Bomber

In-game screen of City Bomber

Program listing on 48K Spectrum

Text Listing

1 READ i,j:
 FOR f=0 TO 39:
 READ d:
 POKE USR "a"+f,d:
 NEXT f:
 BORDER 5:
 POKE 23693,41:
 CLS :
 FOR m=1 TO 99:
 FOR a=10 TO 27:
 FOR b=-9 TO -RND*8:
 PRINT INK 2*(b>-9);AT 12-b,a;CHR$ (144+b/17);AT 11-b,a;CHR$ 145:
 NEXT b:
 NEXT a:
 FOR y=1 TO 20:
 FOR x=1 TO 25+4*(y<20):
 LET j=(j+1)*(j>0)*(j<21)+(INKEY$>"")*(j=0)*y:
 LET i=i+(x+1-i)*(j=0):
 LET c=ATTR (y,x+3)>41:
 PRINT AT j-(j>0),i;" ";AT j,i;CHR$ 148 AND (j>0)*(j<21);AT y,x;" "; FLASH c;CHR$ 146;CHR$ 147:
 BEEP .01+c,d-j-f*c:
 IF c=0 THEN NEXT x:
 PRINT AT y,28,: NEXT y:
 PRINT INK 0;m;" landed":
 BEEP .5,14:
 BEEP .5,16:
 BEEP .5,18:
 NEXT m:
 DATA 0,0,-1,159,d,d,-1,243,d,-1,0,24,60,126,-1,243,d,-1,0,48,120,124,127,d,63,0,0,0,0,0,-4,-2,-4,0,0,60,24,d,60,d,d,24

About the game

This game is a one-liner version of a well-known game seen in a computer type-in book from the '80s. The game features sound and a significant number of UDGs. The game concept is so simple, which makes it a natural one-liner. There was no danger of exceeding the limit of a single screen of program listing, and as such I was able to be quite liberal with the use of code. Einar Saukas was able to add numerous improvements to this version of the game.

Rules of the Game

Back to documentation index