home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Run Magazine ReRun 1990 Summer
/
rerun-1990-summer.d64
/
recoil
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
3KB
|
84 lines
10 rem recoil/(c) 1989
20 poke53281,.:poke53280,.:print"[147]":gosub750
25 forx=52224to52224+30:readd:pokex,d:next:clr
30 dim u,t,m,z,b,co,p,ss,s,c,v,d:u=1:t=2:m=3:z=5:v=53248
40 dimf,sc,s1,g,x,jy,ss,lv,z1,eg,tt,j,a,ol,tb,l1,ss,j,a$
50 poke53248+22,200:poke214,7:print:printtab(10)"[154][178][195][201] [178][195][174][213][195][201][213][195][201][176][178][174][178] "
60 printtab(10)"[154][219][195][177][201][171][179] [194] [194] [194] [194] [194]":printtab(10)"[159][177] [177][177][195][189][202][195][203][202][195][203][173][177][189][177][195][189]"
70 printtab(12)"[153]by jeff panici":j=56320:print:print:print
90 poke646,int(rnd(1)*16+1):print"[145]"tab(10)"press fire to begin":ifpeek(j)<>111then90
100 printchr$(147)
110 rem initilazation
120 f=4:s=54272:d=3:co=55297:sc=.:ti$="000000":s1=1024:co=co+39:s1=s1+40:g=40
130 forx=1to40:pokes1,87:pokeco,z+z+f:co=co+u:s1=s1+u:next:forx=1to22:pokes1,87
140 pokes1+39,87:pokeco,z+z+f:pokeco+39,z+z+f:s1=s1+40:co=co+40:next
150 forx=1to40:pokes1,87:s1=s1+u:pokeco,z+z+f:co=co+u:next:jy=56320:ss=4
160 pokev+34,11:pokev+35,1:pokev+22,216:print"[158]recoil [159]- jeff panici ";
170 print" score 00000":lv=1:deffnj(x)=(jand15)
190 rem randomly plot bricks
195 z1=.:x=1
200 z1=int(rnd(1)*936+1064):pokez1,87:x=x+1:on-(x=30)goto210:goto200
210 rem distribute egg's
220 sys52224,int(rnd(1)*(15-11)+11):x=1:
230 z1=int(rnd(1)*936+1064):ce=peek(z1):ifce=42orce=87thengoto230
240 pokez1,42:on-(x=lv+u)goto250:x=x+1:goto230
250 co=55297+139:p=1164:pokeco,14:eg=.
260 pokep,33:pokev+34,11:c=.:gosub680:pokes+6,233:pokes+20,233:ol=.:x=.
300 rem main loop
320 j=.:j=peek(jy):a=fnj(.):ifa=15thend=ol:goto390
330 ifa=11thend=1:ol=d:c=c+u:goto400
340 ifa=7thend=2:ol=d:c=c+u:goto400
350 ifa=13thend=3:ol=d:c=c+u:goto400
360 ifa=14thend=4:ol=d:c=c+u:goto400
370 ifa=10ora=6ora=5ora=9thend=ol:goto390
380 goto320
390 ifc>252thenc=1
400 ondgoto430,440,450,460
410 goto300
420 rem move snake in proper direction
430 pokep,81:p=p-u:co=co-u:goto470
440 pokep,81:p=p+u:co=co+u:goto470
450 pokep,81:p=p+g:co=co+g:goto470
460 pokep,81:p=p-g:co=co-g:goto470
470 rem collision detection
480 ifpeek(p)=87orpeek(p)=81then520
490 ifpeek(p)=42then590
491 pokep,33:pokeco,z+z+f
500 ifc>252thenc=1
510 pokes+24,15:pokes+u,c:pokes+4,129:pokes+4,128:goto300
520 rem lose a snake
530 gosub680:pokes+5,15:pokes+23,239:pokes+24,47:pokes+4,33
540 forsw=.to180:pokev+34,int(rnd(1)*16+1):pokes+22,sw:pokes+1,8:next
550 pokes+4,32:ti$="000000":gosub700:poke214,z+m:ss=ss-u:l1=ss:tb=int(40-l1)/2
560 ifss=.thengosub700:poke214,9:print:printtab(15)"[159]game over":forp=1to2000:next:run
570 print:printtab(tb);:forx=1toss:print"@ ";:next:print:print""tab(15);
580 print"press fire":j=56320:waitj,16,16:gosub700:goto190
590 rem capture egg
600 pokes+24,15:pokes+15,35:pokes+18,128+1:pokes+18,128
610 pokeco,14:sc=sc+10:eg=eg+u:gosub730
620 ifeg=lv+uthenlv=lv+u:goto640
630 pokes+6,233:pokes+20,233:goto300
640 gosub700:poke214,z+z-u:print:printtab(11)"[159]prepare for level ";lv
670 print:print:forp=1to2000:next:gosub700:goto190
680 rem clear sid chip
690 q=.:forq=.to23:pokes+q,.:next:pokes+24,15:return
700 rem clear game board
710 poke214,u:print:forx=1to22:print" ":next
720 return
730 a$=str$(sc):print""tab(35);:printright$("00000"+(right$(a$,len(a$)-1)),5);
740 return
750 rem redefined characters
760 poke56334,.:poke1,51:poke781,9:poke782,.:poke90,.:poke91,216:poke88,.
770 poke89,64:sys41964:poke1,55:poke56334,1:poke54272,216:poke53272,30:restore
780 reada:ifa=-1thenreturn
790 forx=.to7:readd:poke14336+a*8+x,d:next:goto780
800 data 42,40,170,170,170,170,170,170,40
810 data 81,60,215,215,215,215,215,215,60
820 data 87,239,239,170,251,251,170,239,239
830 data 0,62,127,227,224,126,15,207,60
840 data 33,60,219,219,215,215,219,219,60
850 data -1
851 rem ml data
852 data32,155,183,138,162,,157,40,216,157,39,217,157,38,218,232,208,244,162,.
853 data157,37,219,232,224,195,240,2,208,246,96