8-Bit Software Online Conversion

Blitz - Listing

10 REM Blitz.Based on a COMMODORE 20 REM VIC20 game I used to have. I 30 REM hope I'm not stepping on 40 REM anyones toes by writing this 50 REM BEEB version. 60 REM Finished 9/1/96 70 REM By Dave Chester D5N. 80 MODE1 90 *KEY0 MODE128|MLIST|M 100 PX=0:PY=1:B=0:BX=0:BY=0 110 REM PX,PY IS PLANE CO-ORDS 120 REM BX,BY IS BOMB CO-ORDS 130 REM B=BOMB FLAG, 140 REM IF B=0,BOMB OFF 150 REM IF B=1,BOMB ON,NO COLLISION 160 REM IF B=2 TO 8 THEN NO OF BLOCKS OF BLDG DESTROYED 170 *FX9,2 180 *FX10,2 190 REM SET FLASH RATE 200 REM PX/Y IS PLANE CO-ORD,B IS FLAG FOR BOMB (ON/OFF) AND BX/Y IS BOMB CO-ORD. 210 VDU 23;8202;0;0;0; 220 VDU 19,1,6,0,0,0 230 VDU 19,2,4,0,0,0 240 VDU 19,3,2,0,0,0 250 REM 251-254 BLDGS 260 REM 241-244 ROOFS(?) 270 REM 240 FLOOR 280 REM 245-246/247 PLANE 290 REM 248 BOMB 300 310 VDU 23,245,24,24,28,31,15,7,0,0 320 VDU 23,246,0,0,2,242,254,242,34,96 330 VDU 23,247,0,0,0,240,254,240,32,96 340 VDU 23,248,0,40,56,16,56,56,56,16 350 VDU23,251,126,78,78,78,126,114,114 ,114 360 VDU23,252,126,0,126,0,126,0,126,0 370 VDU23,253,126,66,126,66,126,66,126 ,66 380 VDU23,254,42,84,42,84,42,84,42,84 390 VDU23,240,255,255,255,238,238,204, 204,146 400 VDU23,241,0,0,24,24,60,114,114,114 410 VDU23,242,0,0,24,0,60,0,126,0 420 VDU23,243,0,0,24,36,60,36,126,66 430 VDU23,244,0,24,24,24,24,126,42,84 440 GOSUB 980:REM TITLE PAGE 450 REM SET UP BLDGS/ FLOOR 460 REM NO OF BLDGS 470 FOR A=10TO 30 480 REM SIZE OF BLDGS 490 S=RND(7)+2 500 S=29-S 510 COLOUR RND(2) 520 T=RND(4) 530 T=T+250:TT=T-10 540 FOR B=29 TO S STEP-1:PRINTTAB(A,B) ;CHR$(T) 542 SOUND 1,-15,B*5,.5 550 NEXTB 560 PRINTTAB(A,B);CHR$(TT) 570 NEXTA 580 REM FLOOR 590 COLOUR3 600 FOR A=0 TO 38 610 PRINTTAB(A,30);CHR$(240) 620 NEXT 630 640 COLOUR1 650 PRINTTAB(PX,PY);:VDU32,245,246 660 CX=(((PX+3)*8)*4)+24:CY=1024-(((PY +2)*8)*4)+36 670 IF POINT(CX,CY)<>0 THEN 810 680 IF B>0 THEN 900 690 IF B>0 THEN 730 700 A$=INKEY$(6) 710 *FX15,1 720 IFA$<>""THEN B=1:BX=PX:BY=PY 730 REM CALCULATE POS 740 PX=PX+1:IF PX<37 THEN 790 750 IF PY<>29 THEN 780 751 VDU 19,1,8,0,0,0 760 PRINTTAB(14,30);" -=LANDED=- " 761 FOR timewaste=1TO5000:NEXT:VDU 19, 1,6,0,0,0 770 GOTO 860 780 PRINTTAB(PX,PY)," ":PX=0:PY=PY+1 790 SOUND 1,-8,3,1:GOTO 650 800 810 FOR timewaste=1TO1000:NEXT 820 VDU 19,0,8,0,0,0 830 SOUND 0,-15,6,50 840 FOR timewaste=1TO5000:NEXT:VDU 19, 0,0,0,0,0 850 CLS 860 PRINTTAB(15,16);"TRY AGAIN" 870 PRINTTAB(14,28);"PRESS A KEY" 880 *FX15,1 890 A$=GET$:IFA$=""THEN 890 ELSE RUN 900 FOR timewaste=1TO70:NEXT 910 IF B=1THEN 930 920 IF B>8THEN B=0:PRINTTAB(BX,BY);" " :GOTO 740 930 BY=BY+1:IFBY> 29 THEN B=0:PRINTTAB (BX,BY-1);" ":GOTO 740 940 PRINTTAB(BX,BY);CHR$(248):PRINTTAB (BX,BY-1);" " 950 CX=(((BX)*8)*4)+24:CY=1024-(((BY+2 )*8)*4)+4 960 IF POINT(CX,CY)<>0 THEN B=B+1:SOUN D0,-15,4,1 970 GOTO 690 980 FORA=0TO 16 990 COLOUR2 991 PRINTTAB(17,3);"÷÷÷÷÷" 999 COLOUR1 1000 PRINTTAB(A,2);" BLITZ";:COLOUR3:VD U245,246 1010 FOR timewaste=1TO100:NEXT 1020 NEXT 1030 FOR A=22 TO 36:PRINTTAB(A,2);:VDU3 2,245,246 1040 FOR timewaste=1TO100:NEXT 1050 NEXT 1060 PRINTTAB(A,2);" " 1070 COLOUR 1 1080 PRINTTAB(0,9);"Bomb";TAB(18);"usin g";TAB(32);"land on" 1090 PRINT"these";TAB(18);"these";TAB(3 3);"this" 1100 COLOUR1 1110 PRINTTAB(1,15);CHR$(241);:COLOUR2: VDU32:COLOUR1:VDU243:COLOUR2:VDU244 1120 COLOUR1 1130 PRINTTAB(1,16);CHR$(251);:COLOUR2: VDU242:COLOUR1:VDU253:COLOUR2:VDU254 1140 FOR A=1TO7 1150 COLOUR1 1160 PRINTTAB(1,16+A);CHR$(251);:COLOUR 2:VDU252:COLOUR1:VDU253:COLOUR2:VDU254 1170 NEXTA 1180 COLOUR3 1190 FOR A=1TO3 1200 PRINTTAB(19,16+(A*2));CHR$(248) 1210 NEXTA 1220 FOR A=1TO3 1230 PRINTTAB(20,15+(A*2));CHR$(248) 1240 NEXTA 1250 FOR A=1TO 6 1260 PRINTTAB(32+A,20);CHR$(240):NEXTA 1270 PRINTTAB(3,28);"Press any key to s tart the bombing." 1280 A$=GET$:IFA$=""THEN 1280 1290 CLS:RETURN