ROM Computer Magazine Archive ROM MAGAZINE ISSUE 8 — OCTOBER/NOVEMBER 1984 / PAGE 54

SKY BOMBER
by Tom Tran

    "So you want to be a bomber pilot, aye?"
    "Yes, that's what I've been training for these past four years."
    "First, you must go through a small test to see if you have what it takes."
    "What kind of test?"
    "You must fly your B-52 bomber over one of our old Canadian warships and sink it. The thing that makes this test so much fun, is that you'll be shot at from the deck of the battleship. Also, a time limit is put on your mission, so you'd better sink the ship quickly, or you'll have to start on a new ship. You got all that?"
    "O.K., sounds great to me, when do I start?" "Right this minute, here's your joystick, and good luck. I'll be the one on the battleship shooting up at you. "

Sky Bomber screen

    "Sky Bomber" is a game that is played simultaneously by two players. One player controls the bomber and the other the battleship. The plane flies across the screen from left to right, and by moving the joystick up and down it can be flown higher and lower above the ship. To drop bombs all you have to do is to push the fire button. This will release a bomb that will plummet to the surface. The bombs fall in an elliptical path because of the plane's speed. When dropping bombs, be careful not to fly down too fast because it is possible to blow up your own plane.
    The object of the player in the plane is to blow a hole directly through the ship. This usually takes about three hits to a single spot on the ship. Once a hole is right through, it only takes one more bomb in the same place and the ship will sink. The sinking of the ship will switch the players positions so that the one who was the plane becomes the ship and vice versa.
    On the ship the strategy is a little different. Your object is to shoot down the bomber with a three directional anti-aircraft gun. To fire it, push the joystick either left, right or up. This will determine the direction. Next push the red button and a bullet will be propelled to wherever the gun was pointed. Remember, the plane's objective is to sink you before the time runs out. If it doesn't, you get a new ship. So try to hit the plane and delay your destruction. Also in the sky is a small helicopter that can be hit for bonus points, but the most points are for hitting the bomber.
    The game begins with a hi-score table showing who won each game. Since your running it for the first time it will not show any score but zero. This can be used if you're playing a number of games. This game was written in BASIC, and by redefining the ATARI'S character set, was made to look quite attractive. Because it was written in BASIC, action is a little slow, but if you had a Basic Compiler you could get this program to run a lot faster. Have fun and happy bombing!


1 REM ....ROM MAGAZINE
2 REM ....SKY BOMBER
3 REM ....WRITTEN BY Tom Tuong Tran
4 REM
10 DIM B$(3):GOTO 1000
50 F1=N0:DIR=40:G=PEEK(GUN):IF G=N11 THEN DIR=41
51 IF G=N7 THEN DIR=39
55 F=GUN-DIR:POKE F,N15:FIRE=N1:FOR W=10 TO 30:SOUND 0,W,10,12:NEXT W:SOUND 0,0,0,0:RETURN
60 POKE F,F1:F=F-DIR*2:F1=PEEK(F):F2=PEEK(F+DIR)
61 IF F1=6 OR F2=6 THEN R1=123:GOTO 70
62 IF F1=4 OR F2=4 THEN R2=123:GOTO 70
63 IF F1=5 OR F2=5 THEN FIRE=N0:E=F:BOMB=N0:POKE BO,N0:SC1=100:GOSUB 700:RETURN
64 IF F2=126 OR F2=127 THEN FIRE=N0:E=H1:H1=SC+160:SC1=20:GOSUB 700:RETURN
65 IF F1<>N0 THEN FIRE=N0:RETURN
66 POKE F,N15:RETURN
70 FI=N1:FIRE=N0:SC1=50:RETURN
100 Y=4+INT(RND(0)*10):X=O:R1=6:R2=4:F1=N0:RETURN
110 SOUND 2,20,8,6:POKE PL,N0:POKE PL1,N0:X=X+1:Y=Y+DY:PL=SC+40*Y+X:PLI=PL+1:PL2=PEEK(PL):PL3=PEEK(PL1)
120 IF PL2=126 OR PL3=126 OR PL2=
127 OR PL3=127 THEN E=PL1+(-40*DY):PL=E:PL1=E+1:GOSUB 100:H1=SC+40*4:GOTO 700
125 IF PL3=15 THEN R2=123:GOTO 70
130 IF PL2<>N0 OR PL3<>N0 THEN E=PL1+(-40*DY):PL=E:PL1=E+1:GOSUB 100:GOTO 700
200 POKE PL,RI:POKE PL1,R2:DY=N0:ST2=STICK(P2):IF ST2=14 THEN DY=-1
205 IF FI THEN I=I+1:IF I>4 THEN I=0:E=PL1:GOSUB 100:FI=N0:GOTO 700
210 IF ST2=13 THEN DY=N1
220 IF PL/2=INT(PL/2) THEN POKE H1,N0:POKE H2,N0:H1=H1+1:H2=H1+1:GOTO 240
230 FOR W=1 TO 10-FIRE*10:NEXT W:SOUND 2,0,0,0:RETURN
240 IF H1>H3 THEN H1=SC+40*4
250 POKE H1,126:POKE H2,127:RETURN
300 S2=10:IN=42:BO=PL+40:POKE BO,5:BOMB=N1:RETURN
310 S2=S2+2:SOUND N0,S2,10,S2/10+2:POKE BO,N0:BO=BO+IN:B1=PEEK(BO)
315 IF B1=27 THEN SOUND 0,0,0,0:GOTO 370
320 IF B1=N15 THEN BOMB=N0:FIRE=N0:E=BO:SOUND N0,0,0,0:GOTO 700
325 IF B1=63 THEN POSITION 12,10:? "SHIP IS SINKING":BOMB=N0:SOUND 0,0,0,0:E=BO:GOSUB 700:GOTO 360
330 IF B1<>N0 THEN BOMB=N0:E=BO:SOUND N0,0,0,0:GOTO 700
340 POKE BO,5:C=C+1:IF C>1 AND IN>40 THEN IN=IN-1:C=0
350 RETURN
360 POSITION 12,10:? "              ":SH(SH)=SH(SH)-1:GOTO 410
370 BOMB=N0:V=BO-IN:POKE V,124:POKE V+1,70:POKE V-1,71:FOR K=1 TO 20:NEXT K:POKE V,0:POKE V+1,0:POKE V-1,0:RETURN
400 POSITION 0,0:? N1$;":0000000 BY: TOM TRAM";N2$;":0000000":D$="      YOU ARE ON SHIP          "
410 D$(121,15)=N1$:GOSUB 900:SH=1:P1=0:P2=1:D$(12,15)=N1$:IF SH(1)<SH(2) THEN P1=1:P2=0:SH=2:D$(12,15)=N2$
415 POSITION 39,1:? SH(SH):IF SH(1)=0 AND SH(2)=0 THEN POSITION 15,10:? "GAME OVER":GOTO 8000
417 SOUND 3,140,12,4:IF C2>1 THEN 460
420 POSITION 0,10:FOR W=1 TO 36:POKE 85,W:? "&$";:FOR K=1 TO 20:NEXT K:POKE 85,W:? D$(W,W);:NEXT W
425 E=SC+437:GOSUB 700:POSITION 37,10:SOUND 3,0,0,0:SOUND 1,4,8,3
430 FOR W=37 TO 1 STEP -1:POKE 85,W:? "½]";:FOR K=1 TO 20:NEXT K:POKE 85,W:? " ";
435 POKE 85,W:? " ";:SOUND 2,20,8,6:NEXT W:C2=C2+I:GOTO 490
460 POSITION 0,10:? D$:FOR K=1 TO 500:NEXT K:POSITION 10,10:? "
490 SOUND 3,140,12,4:POKE 19,O:GOSUB 100
500 REM    ______MAIN PROGRAM
550 GOSUB 110:ST1=STICK(P1):IF ST1<>N15 THEN GOSUB 800
560 IF STRIG(P1)=N0 AND NOT FIRE THEN GOSUB 50
570 IF FIRE THEN GOSUB 60
580 IF STRIG(P2)=N0 AND NOT BOMB THEN GOSUB 300
585 IF BOMB THEN GOSUB 310
595 L=PEEK(19):POKE TI-L,64:IF L>=28 THEN GOSUB 900:POKE 77,0:POKE 19,0
600 GOSUB 110:GOTO 500
700 E(1)=E-39:E(2)=E-41:E(3)=E-40:E(4)=E-80:E(5)=E+80:E(6)=E+2:E(7=E-2:E(8)=E+41:E(9)=E+39:E(10)=E+40:S1=N0
705 FOR K=1 TO 10:T(K)=PEEK(E(K)):NEXT K:V=128:GOSUB 750:V=125:GOSUB 750:V=253:GOSUB 750:V=N0:GOSUB 750
710 FOR K=1 TO 10:POKE E(K),T(K):NEXT K:FOR W=0 TO 2:SOUND W,0,0,0:NEXT W:SC(SH)=SC(SH)+SC1:G=SC(SH):C1=0
730 GOSUB 9000:POSITION PO(SH)-C1,N0:? SC(SH):SC1=0:RETURN
750 POKE E,V:GOSUB 5000:POKE E+1,V:POKE E-1,V:POKE E(3),V:POKE E(10),V:GOSUB 5000
760 FOR K=1 TO 10:POKE E(K),V:NEXT K:FOR Q=1 TO 30:NEXT Q:RETURN
800 IF ST1=14 OR ST1=11 OR ST1=7 THEN POKE GUN,ST1
810 RETURN
900 POSITION 0,1:? "":TIME=SC+40+31 : POKE N82,N11:POSITION N11,16
910 ? ""
920 ? ""
930 ? ""
940 ? ""
950 ? ""
960 ? ""
970 ? "";:POKE N82,N0:POSITION N0,23
980 ? "  ";;;;;;;;;;;;;;_______________________";:RETURN
990 GOTO 990
1000 DIM Pl$(20),D$(45),SH(2),E(11),T(11),SC(2),PO(2),Nl$(3),N2$(3),W$(40),Ll$(40),L2$(40),Hl(10),H2(10),W(10)
1001 CH=PEEK(106)-8:CHSET=CH*256:POKE 204,CH:POKE 206,224
1002 FOR K=1 TO 20:READ B:Pl$(K,K=CHR$(B):NEXT K:K=USR(ADR(Pl$))
1003 DATA 104,162,4,160,0,177,205,145,203,200,208,249,230,206,230,204,202,208,242,96
1004 READ A:IF A=-1 THEN 2000
1005 FOR J=0 TO 7:READ B:POKE CHSET+A*8+J,B:NEXT J
1006 GOTO 1004
1007 DATA 5,65,85,85,34,20,20,20,8
1008 DATA 4,0,0,124,254,175,190,160,128
1009 DATA 5,65,85,85,34,20,20,20,8
1010 DATA 6,0,192,224,225,255,126,10,10
1011 DATA 7,0,0,0,3,7,14,28,60
1012 DATA 11,0,0,0,192,224,112,56,60
1013 DATA 13,0,0,0,0,126,0,0,0
1014 DATA 14,0,0,24,24,24,24,24,60
1015 DATA 15,0,0,0,0,0,24,24,0
1016 DATA 27,136,170,170,170,170,170,170,170
1017 DATA 60,0,255,24,56,124,239,239,127
1018 DATA 61,255,12,12,62,127,255,159,254
1019 DATA 63,119,170,170,170,170,170,170,170
1020 DATA 64,170,170,136,0,0,136,170,170
1021 DATA 80,24,126,24,24,153,219,255,60
1022 DATA 86,208,85,85,85,85,85,85,197
1023 DATA 88,120,239,215,171,85,171,239,135
1024 DATA 89,20,84,84,84,84,84,84,64
1025 DATA 96,170,170,136,85,85,136,170,170
1026 DATA 123,16,20,85,85,85,85,20,0
1027 DATA 125,170,170,170,170,170,170,170,170
1028 DATA 126,255,48,48,120,252,255,248,127
1029 DATA 127,0,255,24,24,124,238,239,254
1030 DATA -1
2000 GRAPHICS 0:POKE 752,1:POKE 756,CH:SC=PEEK(88)+256*PEEK(89):GUN=SC+735:Hl=SC+40*4:H3=Hl+37:Nll=11:N7=7
2005 N0=0:Nl=1:N82=82:N10=10:POKE 752,1:TI=SC+73:PO(1)=11:PO(2)=40
2007 FOR W=1 TO 10:Wl=3*W:W2=W1+2:L1$(Wl,W2)="PL1":L2$(Wl,W2)="PL2":W$(Wl,W2)="NOT":Hl(W)=0:H2(W)=0:W(0)=0:NEXT W
2010 GRAPHICS 0:POKE 756,CH:POKE 752,1:LBYTE=PEEK(560):HBYTE=PEEK(561):SCREEN=LBYTE+HBYTE*256+4
2020 POKE SCREEN-1,64+7
2030 FOR K=1 TO 5:POKE SCREEN+K+1,6:NEXT K
2040 FOR K=1 TO 16:POKE SCREEN+K+6,2:NEXT K
2050 FOR K=1 TO 1:POKE SCREEN+K+22,6:NEXT K
2060 POKE SCREEN+24,65:POKE SCORE N+25,LBYTE:POKE SCREEN+26,HBYTE:SETCOLOR 2,N0,N0
2065 POKE N82,0:POSITION 4,0:? "SKY BOMBER":? " BY: TOM TUONG TRAN":POKE N82,2:? "    score table"
2070 ? "":? "NAME1 SCORE NAME2 SCORE WINNER"
2071 ? ""
2072 FOR W=1 TO 10:W1=3*W:W2=W1+2:? " ";L1$(W1,W2);" 00000 ";L2$(W1,W2);" 00000 ";W$(W1,W2);"":NEXT W
2073 ? ""::POKE N82,0:? :? ""
2074 ? "PRESS START TO BEGIN"
2075 FOR W=1 TO 10:G=H1(W):C1=0:GOSUB 9000:POSITION 15-C1,5+W:? H1(W):G=H2(W):C1=0:GOSUB 9000:POSITION 29-C1,5+W
2076 ? H2(W):NEXT W
2080 D$="    ½] = 10 POINTS    ":GOSUB 3999
2090 D$="    &$ = 50 POINTS    ":GOSUB 3999
2100 D$="    % = 100 POINTS    ":GOSUB 3999:GOTO 2080
2400 POSITION 2,17:? "PLAYER #1 NAME ";:INPUT N1$
2410 POSITION 2,17:? "                          ":POSITION 2,17:? "PLAYER #2 NAME ";:INPUT N2$
2420 IF N1$="" OR N2$="" THEN N1$="PL1":N2$="PL2":C2=0:TRAP 2430
2430 POSITION 2,17:? "HOW MANY SHIP DO YOU WANT (1-9) ";:INPUT Z:SH(2)=Z:SH(1)=Z:IF SH(1)>9 OR SH(1)<1 THEN 2430
2500 N15=15:N14=14:SC(1)=10:SC(2)=10:GRAPHICS 0:SETCOLOR 2,0,0:POKE 752,1:POKE 756,CH:GOTO 400
3999 POSITION 0,17
4000 FOR W=1 TO 36:POKE 85,W:? "&$";:FOR K=1 TO 10
4010 IF PEEK(53279)=6 THEN POSITION N0,17:? "                                   ":GOTO 2400
4020 NEXT K:POKE 85,W:? D$(W,W);:NEXT W:? "←←  ":RETURN
5000 FOR W=1 TO 5:S1=S1+5:VOL=14-S1/20:SOUND N0,S1,0,VOL:SOUND N1,S1,8,VOL:SOUND N2,S1+15,2,VOL:NEXT W:RETURN
8000 FOR W=0 TO 3:SOUND W,0,0,0:NEXT W:WIN=SC(2):B$=N2$:IF SC(1)>SC(2) THEN WIN=SC(1):B$=N1$
8001 IF SC(1)=SC(2) THEN B$="TID"
8002 IF WIN>W(10) THEN W(10)=WIN:L1$(30,33)=N1$:L2$(30,33)=N2$:W$(30,33)=B$:H1(10)=SC(1):H2(10)=SC(2)
8016 REM -SORTING-SUBROTINE---------
8017 REM
8020 FOR W=1 TO 9:MAX=W(W):H=W:FOR J=W TO 10:IF MAX<W(J) THEN MAX=W(J):H=J
8025 NEXT J
8030 T=H1(W):B$=L1$(3*W,W*3+2):H1(W)=H1(H):L1$(3*W,3*W+2)=L1$(H*3,3*H+2):H1(H)=T:L1$(3*H,H*3+2)=B$
8035 T=H2(W):B$=L2$(3*W,W*3+2):H2(W)=H2(H):L2$(3*W,3*W+2)=L2$(H*3,3*H+2):H2(H)=T:L2$(3*H,3*H+2)=B$
8036 T=W(W):W(W)=W(H):W(H)=T:B$=W$(3*W,W*3+2):W$(3*W,3*W+2)=W$(H*3,3*H+2):W$(3*H,3*H+2)=B$
8040 NEXT W:GOTO 2010
9000 IF G>0.99 THEN G=G/N10:C1=C1+N1:GOTO 9000
9005 IF C1=0 THEN C1=1
9010 RETURN

DATA CHECK

0 REM DATA CHECK SKY BOMBER
1 DATA 6946,538,465,788,499,364,127,488,864,107,374,372,164,714,254,494,149,185
110 DATA 7140,681,667,100,816,395,245,599,531,473,754,274,268,160,469,20,199,489
340 DATA 7055,317,851,489,259,592,50,769,233,83,47,995,636,664,462,27, 516,65
570 DATA 8395,697,108,743,448,451,977,484,625,878,83,246,245,852,68,53,989,448
940 DATA 8928,964,109,513,644,341,856,692,506,28,323,779,237,928,884,125,886,113
1011 DATA 7494,662,956,639,860,646,376,190,240,380,166,179,129,346,17,298,987,423
1028 DATA 8835,349,240,791,464,950,737,166,508,745,797,794,392,243,202,173,585,699
2074 DATA 9536,966,917,275,162,832,660,107,80,679,945,728,266,992,654,502,96,675
8001 DATA 6991,8,668,443,655,812,819,440,453,158,427,821,386,901