Air Raid 2000

Type
Game
Category
Scrolling rescue shooter
Author
Erik Wolpaw
Published in
Antic, November 1983 (Vol. 2, No. 8), "In the Public Domain"
Year
1983
Language
Atari BASIC
Requirements
16K RAM with cassette or 24K with disk, joystick in port 1, Atari BASIC
A dark blue sky framed by red borders, with black hills and a row of green ground features at the bottom of the window, three ship icons at the top, and GAME OVER, SCORE, LEVEL and RESCUED in the grey area below

About the program

Erik Wolpaw was a high-school junior in Cleveland Heights, Ohio, when Antic printed Air Raid 2000 in November 1983. He had been programming games for about two years, and this was his first published one.

You fly a ship over scrolling ground while enemy batteries fire up at you. Four humans are stranded on the ground. Pick each one up by dipping low enough to touch it with your ship. You can bomb the batteries and other targets with the fire button, but only from above a minimum height, shown by the marks at the sides of the screen. That height goes up with every wave. Once all four humans are aboard, bomb a clear space and land before the fuel runs out. Every second wave is a night mission, when the ground can be seen only under two searchlights.

What you need

A joystick in port 1. The magazine asked for 16K with cassette or 24K with disk. It also apologised to 1200XL owners: on that machine the scrolling terrain is distorted from time to time.

Typing it in

Inverse-video characters ({inv}…{/inv}, typed with the Atari key) appear in the terrain strings in lines 810–830, the DATA in line 310 and the borders in lines 850–860. In the terrain strings each character is a piece of ground, a battery, a human ($) or the runway. Copy them exactly. SAVE before you RUN. The screen stays blank for about 15 seconds while the program sets up. Then you see the "GAME OVER" screen. Press the fire button there to start.

How to play

The ship is always moving. Push left or right to change direction, and up or down to climb or sink. Bombs keep moving sideways with you after you drop them, so you can steer where they land. You start with one ship and two in reserve. When the fuel reaches zero the ship lands by itself in the direction it is flying. If there is no clear ground, it crashes.

How it works

  • Scrolling with a string. The whole battlefield is one 200-character string, B$. Each step, line 220 prints a 10-character slice of it, B$(S,S+9), at the ground row. Moving changes S, so the terrain slides past a ship that stays in the middle of the screen.
  • Two fonts. Lines 650–800 build two redefined character sets, 6 pages apart, with slightly different shapes. Line 220 swaps between them on alternate steps with POKE 756, which animates everything on screen at once.
  • Parallax hills. The hills (or, at night, the searchlights) are the four players, placed behind the playfield. Every sixth step they shift one position, slower than the ground, which gives an early parallax effect.
  • A DLI. The 27-byte routine at 1536 runs partway down the screen. It switches back to the ROM font and new colours for the score area, and it takes one colour from the random-number register.
  • Collisions are found with PEEK on screen memory at SR, the address of the screen.

Listing

10 REM *** AIR RAID-2000 *** ANTIC MAGAZINE***
20 REM ***** 1983 E.F.WOLPAW ***
30 DIM B$(200),E$(5),OC$(3):Y=5
40 GOSUB 550:GOSUB 1030:GOSUB 1090:GOSUB 1180:SH=3
50 GS=1:EL=0:FU=500:S=1:Y=5:L=0:GOSUB 810
60 J=STICK(0):IF J<>7 AND J<>11 THEN 80
70 GD=(J=7)-(J=11)
80 IF J<>13 AND J<>14 THEN R=PEEK(SR+10+GD+(20*Y)):IF R<>0 AND R<>232 THEN 1150
90 IF J<>13 AND J<>14 THEN DY=0:GOTO 110
100 POKE SR+10+(20*Y),0:DY=(J=13)-(J=14):R=PEEK(SR+10+(20*(Y+DY))):IF R<>0 AND R<>232 OR Y+DY=13 THEN 1150
110 IF R=232 THEN 520
120 FU=FU-1:POSITION 5,15:? #6;"FUEL-";FU;"  ":IF FU=0 THEN 400
130 Y=Y+DY:POKE SR+10+20*Y,172-GD:IF STRIG(0)<>0 AND M=0 THEN 170
140 IF M=1 THEN 290
150 IF Y>HI THEN 170
160 MY=Y+1:POKE SR+10+20*MY,234:M=1:GOTO 290
170 S=S+GD:IF S+9>LEN(B$) THEN S=S-1
180 IF S/6=INT(S/6) AND S<>0 THEN LX=LX-GD:FOR I=0 TO 3:POKE 53248+I,LX+(I*24):NEXT I
190 CH=CH+1:CH=CH-2*(CH=3):IF S<1 THEN S=S+1
200 IF BE<>0 THEN GOSUB 350
210 IF LI=0 THEN SETCOLOR 4,8,INT(FU/33)
220 POSITION 6,12:? #6;B$(S,S+9):POKE 756,PEEK(106)+4+(6*(CH=2))
230 IF B$(S+4,S+4)<>"$" AND EM=0 THEN 60
240 SOUND 3,40+(EY*2),80,14:IF EM=0 THEN EM=1:EX=10:EY=11:ES=GD
250 IF EX=10 AND EY=Y THEN POKE SR+EX+20*EY,0:GOTO 1150
260 POKE SR+EX+20*EY,0:EY=EY-1:EX=EX+ES*(GD<>ES):IF EX=15 OR EX=6 OR EY=1 THEN EM=0:SOUND 3,0,0,0:GOTO 60
270 IF EX=10 AND EY=Y THEN 1150
280 POKE SR+EX+20*EY,139:GOTO 60
290 R=PEEK(SR+10+(20*(MY+1))):IF R<>0 AND R<>139 OR MY=12 THEN B$(BO,BO)=" ":GOSUB 310:GOTO 170
300 POKE SR+10+20*MY,0:MY=MY+1:POKE SR+10+20*MY,170:GOTO 170
310 DATA {inv}'{/inv},{inv}*{/inv},{inv}){/inv},{inv}*{/inv},{inv}'{/inv},{inv}({/inv}
320 RESTORE 310:B$(S+4,S+4)=" ":POKE SR+10+20*MY,0:M=0:BO=S+4:BE=0:M=0:SOUND 0,20,0,14:SOUND 1,255,10,15
330 SC=SC+50*(R=3 OR R=6)+20*(R=1 OR R=5)+5*(R=119 OR R=120 OR R=121)+15*(R=4)
340 POSITION 5,17:? #6;"SCORE-";SC:IF R=232 THEN SH=1:GOTO 1150
350 IF LI=1 THEN SETCOLOR 4,1,14
360 IF BE=2 THEN SOUND 0,0,0,0:SOUND 1,0,0,0
370 BE=(BE+1):READ E$:B$(BO,BO)=E$:IF BE<>5 THEN RETURN
380 B$(BO,BO)=" ":IF LI=1 THEN SETCOLOR 4,0,0
390 BE=0:SOUND 0,0,0,0:SOUND 1,0,0,0:GOTO 170
400 IF MA<>0 THEN 1150
410 IF Y<12 THEN POKE SR+10+20*Y,0
420 SOUND 3,0,0,0:PO=PO+1:SOUND 2,9+PO,64,15
430 Y=Y+1:Y=Y-(Y>12):POKE SR+10+20*Y,172-GD
440 S=S+GD:IF HIT=0 THEN L=L+1:IF L=20 THEN SOUND 2,0,0,0:GOTO 1350
450 IF S/6=INT(S/6) THEN LX=LX-GD:FOR I=0 TO 3:POKE 53248+I,LX+(24*I):NEXT I
460 IF S>1 AND S+9<LEN(B$) THEN 490
470 IF HIT=1 THEN 1210
480 IF HIT=0 THEN 1150
490 POSITION 6,12:? #6;B$(S,S+9):IF Y=12 AND HIT=0 THEN R=PEEK(SR+10+20*12):IF R<>0 THEN 1150
500 IF HIT=1 THEN IF Y=12 THEN 1210
510 GOTO 410
520 MA=MA-1:B$(S+3,S+5)="   ":POKE SR+10+20*12,0:Y=11:SOUND 1,60,10,15:FOR T=1 TO 20:NEXT T:SOUND 1,68,10,15
530 POSITION 5,21:? #6;"RESCUED-";4-MA
540 FOR T=1 TO 30:NEXT T:SOUND 1,0,0,0:GOTO 170
550 DATA 8,96,152,84,52,24,255,153,255,24,0,255,165,255,165,255,165,131
560 DATA 32,0,0,0,0,254,190,230,230,400,0,0,0,0,0,0,85,255,48,0,240,144,240,144,255,153,249
570 DATA 88,129,66,36,24,24,36,66,129,440,80,160,72,74,60,16,16,16
580 DATA 56,0,0,0,0,24,24,24,24,64,0,0,0,0,0,0,24,24,72,24,126,255,153,24,24,24,24,80,24,60,60,24,24,24,24,24
590 DATA 448,0,8,22,25,78,116,84,68,456,2,15,73,167,211,114,34,34,464,255,0,0,0,0,0,0,0
600 DATA 320,0,0,0,24,84,56,16,40
610 DATA 336,0,0,16,12,16,0,0,0,344,128,192,248,228,255,56,112,0,360,1,3,31,39,255,28,14,0
620 DATA 96,255,255,255,255,255,255,255,255
630 DATA 40,0,0,255,170,170,170,170,170
640 DATA -1
650 POKE 106,PEEK(106)-6:GRAPHICS 17:START=PEEK(106)*256:POKE 752,1:RESTORE 550
660 READ X:IF X=-1 THEN 680
670 FOR Y=0 TO 7:READ Z:POKE X+Y+START,Z:NEXT Y:GOTO 660
680 POKE 106,PEEK(106)-6:START=PEEK(106)*256:RESTORE 710
690 READ X:IF X=-1 THEN POKE 756,PEEK(106)+6:RETURN
700 FOR Y=0 TO 7:READ Z:POKE X+Y+START,Z:NEXT Y:GOTO 690
710 DATA 8,12,50,84,88,48,255,153,255,24,0,255,165,255,165,255,165,131
720 DATA 32,0,0,0,0,254,190,230,230,400,0,0,0,0,0,0,170,255,48,0,240,144,240,144,255,153,249
730 DATA 88,0,0,231,24,24,231,0,0,440,80,160,72,74,60,16,16,16
740 DATA 56,0,0,0,0,24,24,24,24,64,0,0,0,0,0,0,24,24,72,24,126,255,153,24,24,24,24,80,24,60,60,24,24,24,24,24
750 DATA 448,0,8,22,25,78,116,84,68,456,2,15,73,167,211,114,34,34,464,255,0,0,0,0,0,0,0
760 DATA 320,0,0,0,24,16,56,84,40
770 DATA 336,0,0,0,28,0,0,0,0,344,128,192,248,228,255,56,112,0,360,1,3,31,39,255,28,14,0
780 DATA 96,255,255,255,255,255,255,255,255
790 DATA 40,0,0,255,170,170,170,170,170
800 DATA -1
810 B$="{inv}rrrr{/inv}!##&! {inv}h{/inv}  wwwx$y {inv}h{/inv} yywxxwy&!#  wy  yxy  xy$ w&$ $# ! $$$ xw {inv}h{/inv} xxywyxxwxww$$$ {inv}h{/inv} $   !xw yw  !{inv}rrrrr{/inv}"
820 IF W<2 THEN 840
830 B$="{inv}rrrr{/inv}!$$ wywwx{inv}h{/inv}$$$$$ $$${inv}h{/inv}$&$$$ wx$$&$$wx{inv}h{/inv}$$$$!$$ $$!$$$$$$$$ wxx$ $$ & ## $$$$$ $!${inv}h{/inv}$$ xwy$$$#&${inv}rrrrr{/inv}"
840 GD=1:POKE 82,0:BO=10:EM=0
850 FOR T=1 TO 12:POSITION 0,T:? #6;"{inv},,,,,,{/inv}":POSITION 16,T:? #6;"{inv},,,,{/inv}":NEXT T:POSITION 0,1:? #6;"{inv},,,,,,,,,,,,,,,,,{/inv}"
860 POSITION 0,1:? #6;"{inv},,,,,,,,,,,,,,,,,,{/inv}"
870 W=W+1:GOSUB 940:HI=10-W:IF HI<1 THEN HI=1
880 MA=4:POSITION 5,HI:? #6;" ":POSITION 16,HI:? #6;" "
890 POSITION 5,21:? #6;"RESCUED-";4-MA
900 FOR I=0 TO 3:POKE 53248+I,95+(I*24):NEXT I
910 POSITION 5,17:? #6;"SCORE-";SC;"     ":POSITION 5,19:? #6;"LEVEL-";W;"   ":LX=95
920 IF LI=0 THEN SETCOLOR 0,0,10:SETCOLOR 1,12,6:SETCOLOR 3,7,6:SETCOLOR 2,3,6:RETURN
930 RETURN
940 DATA 0,6,7,7,15,31,31,31,127,255,255,0,0,128,200,252,252,252,255,255,255,255,0,2,7,15,31,63,127,255,255,255
950 DATA 255,0,0,128,192,224,224,224,225,243,255,255
960 DATA 0,0,0,0,0,0,0,0,0,0,0,30,16,16,56,56,124,124,124,124,124,124
970 DATA 30,16,16,56,56,124,124,124,124,124,124,0,0,0,0,0,0,0,0,0,0,0
980 IF W/2=INT(W/2) THEN RESTORE 960:LI=1:SETCOLOR 0,0,0:SETCOLOR 1,0,0:SETCOLOR 2,3,6:SETCOLOR 3,0,0:SETCOLOR 4,0,0:GOTO 1000
990 RESTORE 940:LI=0:SETCOLOR 4,8,12
1000 FOR H=0 TO 3:READ C:POKE 704+H,C
1010 FOR I=START+512+PY+(128*H) TO START+521+PY+(128*H):READ Z:POKE I,Z:NEXT I:NEXT H
1020 RETURN
1030 X=95:PY=58
1040 A=PEEK(106)-4:POKE 106,A:POKE 54279,A:START=256*A:POKE 559,46:POKE 53277,3
1050 FOR I=START+512 TO START+1024:POKE I,0:NEXT I
1060 FOR H=0 TO 3:POKE 53248+H,X+(H*24):POKE 53256+H,3
1070 NEXT H
1080 POKE 623,4:RETURN
1090 DLIST=PEEK(560)+PEEK(561)*256:POKE DLIST+17,134:RESTORE 1100:FOR I=1536 TO 1562
1100 DATA 72,169,6,141,10,212,141,26,208,169,14,141,22,208,169,224,141,9,212,173,122,210,141,24,208,104,64
1110 READ X:POKE I,X:NEXT I:POKE 512,0
1120 POKE DLIST+28,7:POSITION 3,23:? #6;"{inv}AIR RAID 2000{/inv}"
1130 POKE 513,6:POKE 54286,192:SR=PEEK(88)+256*PEEK(89)
1140 RETURN
1150 GOTO 1190
1160 POKE SR+EX+20*EY,0
1170 POKE SR+10+20*Y,0
1180 POSITION 9,0:? #6;"{inv}KKK{/inv}":GOTO 1350
1190 SH=SH-1:POSITION 9+SH,0:? #6;" "
1200 PO=0:HIT=1:GOTO 410
1210 HIT=0
1220 DL4=DLIST+4:DL5=DLIST+5:NUML=PEEK(DL4):NUMH=PEEK(DL5):PO=-20
1230 POSITION 10,Y:? #6;" ":IF EM=1 THEN POSITION EX,EY:? #6;" "
1240 FOR T=1 TO 32:CO=INT(RND(1)*16)+1:SETCOLOR 4,CO,2
1250 F=F+1:IF F>4 THEN F=1
1260 PO=(F=1)-(F=2)-(F=3)+(F=4)
1270 NUML=NUML+PO:POKE DL4,NUML:POKE DL5,NUMH
1280 SOUND 0,200,4,15:SOUND 1,255,4,15:SOUND 2,225,4,15:SOUND 3,150,4,15:NEXT T:FOR T=0 TO 3:SOUND T,0,0,0:NEXT T
1290 EM=0:FU=500:Y=5
1300 S=S+(S<1)-((S+9)>LEN(B$))
1310 IF LI=0 THEN SETCOLOR 4,8,10
1320 IF LI=1 THEN SETCOLOR 4,0,0
1330 IF SH=0 THEN 1160
1340 GOTO 170
1350 GOSUB 1360:SC=0:W=0:S=1:GOTO 50
1360 IF SH<>0 THEN POP :GOTO 50
1370 POSITION 3,23:? #6;"{inv}AIR RAID 2000{/inv}   ":IF SC>HI THEN HI=SC
1380 POKE 77,254:IF STRIG(0)=1 THEN POSITION 5,15:? #6;"GAME OVER  ":GOTO 1380
1390 SH=3:POKE 77,0
1400 RETURN

Download

The original program from the Antic disk, to LOAD or ENTER instead of typing it: AIRRAID.BAS.

Credits