8-Bit Software Online Conversion

Froggy Game (BASIC) - Listing

10 REM THIS PROG BY FRANK AND RUPERT DUDLEY. MARCH 1991 20 *FX200,1 30 MODE7 40 VDU23,1,0;0;0;0; 50 PROCINSTRS 60 PROCCLEARTONGUE 70 PROCCLEARBOTTOM 80 PROCLEGS 90 PROCMID 100 wa%=800 110 count%=0 120 count2%=0 130 count3%=0 140 Z%=RND(9000) 150 IF Z%<3000 X%=0 160 IF Z%>3000 AND Z%<6000 X%=17 170 IF Z%>6000 X%=34 180 REPEAT 190 count%=count%+1 200 count2%=count2%+1 210 IF count2%=800 AND count3%<30 PROC DIE:PROCFAIL 220 IF count2%=800 AND count3%>30 PROC RESET2 230 IF count%=10 PROCRESET 240 PRINT TAB(X%,0)"   250 FOR WAIT%=1 TO 100:NEXT WAIT% 260 PRINT TAB(X%,0)" " 270 IF INKEY(-1)AND P%=1 PROCTRIGHT 280 IF INKEY(-1)AND P%=2 PROCTLEFT 290 IF INKEY(-1)AND P%=3 PROCTMID 300 IF INKEY(-98)PROCLEFT 310 IF INKEY(-67)PROCMID 320 IF INKEY(-83)PROCRIGHT 330 PRINTTAB(13,24);" SCORE : ";count3 %;CHR$30 340 UNTIL FALSE 350DEFPROCRIGHT 360 P%=1 370VDU30 380PRINT''''''''"  p" 390PRINT"   " 400PRINT"   ~¾" 410PRINT"   ~5" 420PRINT"   ~" 430PRINT"  ?" 440PRINT"  ?" 450ENDPROC 460DEFPROCLEFT 470 P%=2 480VDU30 490PRINT''''''''"   " 500PRINT"    510PRINT"   ~¾" 520PRINT"   ~5" 530PRINT"   ~" 540PRINT"   ?" 550PRINT"  ?" 560ENDPROC 570DEFPROCMID 580 P%=3 590VDU30 600PRINT''''''''"  p " 610PRINT"   " 620PRINT"   ~¾" 630PRINT"   ~5" 640PRINT"   ~" 650PRINT"  ?" 660PRINT"  ?" 670ENDPROC 680 DEFPROCRESET 690 count%=0 700 Z%=RND(9000) 710 IF Z%<3000 X%=0 720 IF Z%>3000 AND Z%<6000 X%=17 730 IF Z%>6000 X%=34 740 ENDPROC 750DEFPROCTMID 760VDU30 770PRINT"   780PRINT"  790PRINT"  800PRINT"  810PRINT"  820PRINT"  830PRINT"  840PRINT"  850PRINT"   860PRINT"   870PRINT"   ~¾" 880PRINT"   ~5" 890PRINT"    ~" 900PRINT"  ?" 910PRINT"  ?" 920 IF X%=17 PROCSOUND 930 FOR WAIT%=1 TO wa%:NEXT WAIT% 940 PROCCLEARTONGUE 950 PROCMID 960ENDPROC 970DEFPROCTRIGHT 980VDU30 990PRINT"  ?" 1000PRINT" ~?!" 1010PRINT" ~?" 1020PRINT" ~?" 1030PRINT" ?" 1040PRINT"  " 1050PRINT"  1060PRINT"  1070PRINT"   1080PRINT"   1090PRINT"   ~¾" 1100PRINT"   ~5" 1110PRINT"   ~" 1120PRINT"   ?" 1130PRINT"  ?" 1140 IF X%=34 PROCSOUND 1150 FOR WAIT%=1 TO wa%:NEXT WAIT% 1160PROCCLEARTONGUE 1170 PROCRIGHT 1180ENDPROC 1190DEFPROCTLEFT 1200VDU30 1210PRINT"   1220PRINT"  1230PRINT"  1240PRINT"  1250PRINT"  1260PRINT"  1270PRINT"  1280PRINT"  1290PRINT"   1300PRINT"   1310PRINT"   ~¾" 1320PRINT"   ~5" 1330PRINT"   ~" 1340PRINT"    ?" 1350PRINT"  ?" 1360 IF X%=0 PROCSOUND 1370 FOR WAIT%=1 TO wa%:NEXT WAIT% 1380 PROCCLEARTONGUE 1390 PROCLEFT 1400ENDPROC 1410DEFPROCSOUND 1420 SOUND0,-15,20,5 1430 FOR WAIT%=1 TO wa%:NEXT WAIT% 1440 PROCSMILE 1450 FOR WAIT%=1 TO wa%:NEXT WAIT% 1460 count3%=count3%+1 1470PROCRESET 1480ENDPROC 1490DEFPROCSMILE 1500VDU30 1510PROCCLEARTONGUE 1520PRINT"   " 1530PRINT"   ~¾" 1540PRINT"   ~5" 1550PRINT"   ~" 1560PRINT"  ?" 1570PRINT"  ?" 1580 PRINTTAB(13,24);" SCORE : ";count3 %;CHR$30 1590ENDPROC 1600DEFPROCFAIL 1610VDU30 1620PRINT''''''"     of starvation." 1630PRINT"       rvation." 1640PRINT''" Another game? <Y>es <N>o" 1650PRINT''" " 1660PRINT'''''''"  p" 1670PRINT"   1680PRINT"   ~¾" 1690PRINT" Programmed by Frank & Rupe rt Dudley"; 1700 *FX15 1710 IF GET$="Y" RUN ELSE CLS:END 1720ENDPROC 1730 DEFPROCRESET2 1740 count2%=0 1750 count3%=0 1760 ENDPROC 1770DEFPROCINSTRS 1780CLS 1790FORj=1TO2:PRINTCHR$132;CHR$157;CHR$ 141;CHR$131;" YOU ARE A FAT GREEN FRO G!":NEXT 1800PROCblue("In order to survive you m ust catch") 1810PROCblue("at least 30 flies per min ute.") 1820PROCblue(" Z : look left") 1830PROCblue(" X : look up") 1840PROCblue(" C : look right") 1850PROCblue(" SHIFT : stick out you r tongue") 1860PROCMID 1870PROCLEGS 1880PRINT" PRESS SPACE";CHR$3 0; 1890REPEATPROCLEFT:OSCLI"FX19":PROCMID: OSCLI"FX19":PROCRIGHT:OSCLI"FX19":PROCMI D:OSCLI"FX19":UNTILINKEY(0)=32 1900ENDPROC 1910DEFPROCCLEARTONGUE 1920VDU30:FORj=1TO9:PRINTSTRING$(39," " ):NEXT:ENDPROC 1930: 1940DEFPROCblue(a$):PRINTCHR$132;CHR$15 7;CHR$135;a$:ENDPROC 1950DEFPROCCLEARBOTTOM 1960PRINTTAB(0,24);STRING$(39," ");CHR$ 30; 1970ENDPROC 1980DEFPROCDIE 1990SOUND0,-15,3,-1 2000PROCCLEARTONGUE:PROCCLEARBOTTOM 2010PROCMID 2020PROCLEGS 2030FORj=1TO13 2040SOUND1,-0,(130-j)*10,0 2050PRINTTAB(0,24);CHR$132;CHR$157;CHR$ 30; 2060PRINTTAB(0,0);CHR$11 2070*FX19 2080NEXT 2090PRINTTAB(0,24);CHR$132;CHR$157;CHR$ 30; 2100*FX15,0 2110ENDPROC 2120DEFPROCLEGS 2130VDU30 2140PRINT'''''''''''''' 2150PRINT"  ?" 2160PRINT"  ?" 2170PRINT"  ?" 2180PRINT"  " 2190PRINT"  m" 2200PRINT"     ii" 2210PRINT"    mii" 2220PRINT"    mii" 2230PRINT"     2240PRINT" "; 2250ENDPROC