home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1985 September
/
1985-09.d64
/
tracker
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
6KB
|
173 lines
0 rem tracker
5 poke52,48:poke56,48:clr
10 print"[147]please wait for set up..."
15 gosub9000
20 poke53281,1:poke53280,7:poket+24,15:ts=0:tl=3
25 print"[147][144]game instructions (y/n)":poke198,0
30 geta$:ifa$="y"thengosub8000:goto35
32 ifa$="n"thengoto35
33 goto30
35 print"[147][144]":input"skill level (1-5)";sk
40 ifsk<1orsk>5then35
45 bv=10*sk:bs=24*bv:sk=int(30/sk-1.5)
50 p=1065:s=91:a=1064:c=9:y=30:c1=9:sc=0
55 print"[147][144] t[149]+[144]r[149]+[144]a[149]+[144]c[149]+[144]k[149]+[144]e[149]+[144]r"spc(13)"score:"
60 pokea,fc:pokea+t,4:poke2023,160:poke56295,10:pokep,y:pokep+t,6
64 forn=1to5:mn=int(rnd(1)*(1980-1180))+1180:pokemn,q:pokemn+t,5:next
66 forn=1to10:mn=int(rnd(1)*(1980-1180))+1180:pokemn,28:pokemn+t,14:next
68 gosub700:ti$="000000"
70 print""spc(34)sc
80 ifti$>"000159"then465
82 if(int(ti/60)/sk)-int(int(ti/60)/sk)=0then2000
84 print""spc(15)"[151]"(120-int(ti/60))"[157] secs [157] "
86 gosub1000:m=p:iffb=0thens=x:onjvgoto96,104,92,102,98,100,94,106:goto90
88 onjvgoto96,86,92,86,98,86,94,86
90 s=y:c1=6:goto150
92 p=p+1:goto120
94 p=p-1:goto120
96 p=p-40:goto120
98 p=p+40:goto120
100 p=p+39:goto120
102 p=p+41:goto120
104 p=p-39:goto120
106 p=p-41
120 ifp<1064thenp=p+40
130 ifp>2023thenp=p-40
135 ifp=athenp=m:pokem,y:pokem+t,c:goto80
145 ifpeek(p)=86then455
150 ifpeek(p)=qtheny=q:c=5:goto160
155 ifpeek(p)=28theny=28:c=14
160 ifpeek(m)=qthens=q:c1=5:goto170
165 ifpeek(m)=28thens=28:c1=14
170 pokep,y:pokep+t,c:y=30:pokem,s:pokem+t,c1:s=91:c=6:c1=9:ifjv<>0thengosub550
175 ifp<2023thenpoke2023,160:poke56295,10:goto80
210 ifa+40>2023then230
220 if(peek(a+40)=sorpeek(a+40)=qorpeek(a+40)=28)thena=a+40:f=a-40:goto300
230 if(peek(a+1)=sorpeek(a+1)=qorpeek(a+1)=28)thena=a+1:f=a-1:goto300
240 if(peek(a-1)=sorpeek(a-1)=qorpeek(a-1)=28)thena=a-1:f=a+1:goto300
250 if(peek(a-40)=sorpeek(a-40)=qorpeek(a-40)=28)thena=a-40:f=a+40:goto300
260 goto80
300 if(a=1983ora=2022)thenpokea,fc:pokea+t,4:pokef,x:goto440
400 ifa=pthena=f:pokea,fc:pokea+t,4:goto80
410 ifpeek(a)=qthensc=sc+(2*bv):gosub600
420 ifpeek(a)=28thensc=sc+bv:gosub600
430 pokea,fc:pokea+t,4:pokef,x:gosub525:iff=1064thenpokef,86:pokef+t,0
435 goto70
440 poke2023,fc:poke56295,4:pokea,x:sc=sc+(4*bv)
450 print"[147]"spc(6)"hooray! herbie's home safe!":gosub700:goto470
455 print"[147]"spc(6)"ouch! zapped by a deadly x!":gosub900:tl=tl-1
460 goto470
465 print"[147]"spc(6)"oh, no! herbie is stranded!":gosub800:tl=tl-1
470 printtab(14)"[145][145][145][145][145][145][145][145][145]level "bv/10:printtab(12)" high score [146]:[144]"hs
475 ifbv>10andsc<(bs-(4*bv))/2thensc=sc-(4*bv):ifsc<0thensc=0
480 ts=ts+sc:ifsc=bsthents=ts+500
482 printtab(2)"[149]this round:[151]"scspc(2)"[149]game total:[144]"ts
484 ifsc=bsthenprint"[151] special perfect round bonus--500!!!! "
486 ifts>hsthenhs=ts:printtab(10)"a new high score!!!":print"[144]"spc(25)hs
488 iftl=0thenprint"":goto500
490 printtab(10)"[144]trackers left="
492 tc=26:forn=1totl:printtab(tc)"[145]^":tc=tc+2:next
494 forn=1to8000:next:iftl>0then50
500 printtab(10)"[151] sorry, game over. [146]":printtab(11)"[149] play again? [146] [144]y/n"
510 geta$:ifa$=""then510
515 ifa$="y"then20
520 end
525 poket+5,0:poket+6,240:poket,15:poket+1,67
530 poket+4,17:poket+4,16:poket,0:poket+1,0:return
550 poket+5,0:poket+6,240:poket+1,12:poket,143
555 poket+4,129:poket+4,128:poket,0:poket+1,0:return
600 poket+5,96:poket+6,0
605 poket,75:poket+1,34
610 poket+4,33:forn=1to40:nextn:poket+4,32
615 poket,52:poket+1,43:poket+4,33:forn=1to40:nextn:poket+4,32
620 poket,97:poket+1,51:poket+4,33:forn=1to100:nextn:poket+4,32
625 poket,0:poket+1,0:return
700 poket+5,0:poket+6,240:poket+12,0:poket+13,240:poket+19,0:poket+20,240
702 fori=1to3
704 poket,195:poket+1,16:poket+8,4:poket+7,48:poket+15,33:poket+14,135
706 gosub750:forn=1to200:next:gosub760
708 poket,31:poket+1,21:poket+8,5:poket+7,71:poket+15,42:poket+14,62
710 gosub750:forn=1to300:next:gosub760
712 poket,96:poket+1,22:poket+8,5:poket+7,152:poket+15,44:poket+14,193
714 gosub750:forn=1to500:next:gosub760:ns=150
716 forj=1to2:poket,135:poket+1,33:poket+8,8:poket+7,97:poket+15,67:poket+14,15
718 gosub750:forn=1tons:nextn:ns=50:gosub760:nextj:nexti
720 poket,223:poket+1,29:poket+8,7:poket+7,119:poket+15,59:poket+14,190
722 gosub750:forn=1to200:next:gosub760
724 poket,30:poket+1,25:poket+8,6:poket+7,71:poket+15,50:poket+14,60
726 gosub750:forn=1to300:next:gosub760
728 poket,96:poket+1,22:poket+8,44:poket+7,193:poket+15,16:poket+14,195
730 gosub750:forn=1to900:next:gosub760
732 poket,0:poket+1,0:poket+7,0:poket+8,0:poket+14,0:poket+15,0
740 return
750 poket+4,17:poket+11,17:poket+18,17:return
760 poket+4,16:poket+11,16:poket+18,16:return
800 poket+5,o:poket+6,240:forhn=255to1step-2:poket,50:poket+1,hn
810 poket+4,17:poket+4,16:nexthn:poket,0:poket+1,0:return
850 poket+5,9:poket+6,0:poket,246:poket+1,2:poket+4,33
860 forj=1to80:next:poket+4,32:poket,0:poket+1,0:return
900 poket+5,0:poket+6,236:poket,5:poket+1,1:poket+4,129
910 forn=1to1500:next:poket+4,128:return
1000 sn=snand1:js=peek(pa+sn):jv=jsandjm
1010 forji=1to8:ifjv=jv(ji)then1030
1020 next:ji=0
1030 jv=ji:fb=-((jsandfm)=zr):return
2000 mi=int(rnd(1)*(1933-1424))+1424:forn=1to4:xx=x
2010 if(peek(mi)=30orpeek(mi)=31)thenmi=mi+1:goto2010
2020 if(peek(mi)=91orpeek(mi)=28orpeek(mi)=qorpeek(mi)=86)thenxx=86
2030 pokemi,27:forg=11to2step-1:pokemi+t,g:nextg:gosub850:pokemi,xx:pokemi+t,0
2040 mi=mi+1:next:if(peek(mi)<>30andpeek(mi)<>31)thenpokemi,86:pokemi+t,0
2050 goto80
8000 print"[147]"tab(8)"[156]_[149][219][219][219][219][219] [144]tracker [149][219][219][219][219][219]^"
8010 print"[151]use port 2 joystick to move tracker."
8015 print"fire button lays track."
8020 print"when tracker is home, purple herbie"
8025 print"can move on track and collect pts."
8030 print"the meanies leave deadly x's."
8035 print"don't let tracker run into them."
8040 print"tracker & purple herbie are paralyzed"spc(4)"when meanies appear."
8045 print"use tracker to build a new path after":print"meanies attack."
8050 print"don't be too greedy--you're in a race"
8055 print"against the clock to get herbie home!":gosub700
8060 printtab(7)"[144]hit return[146] to continue"
8065 geta$:ifa$=""then8065
8070 ifa$<>chr$(13)then8060
8100 print"[147]"spc(9)"[151] cast of characters [146]"
8110 ln=72:forv=1to8
8115 printtab(12)""cc$(v);ct$(v)" [144]-- ";cn$(v)
8120 poket+5,9:poket+6,210:poket+1,ln:poket,143:ln=ln-3
8125 poket+12,9:poket+13,210:poket+8,ln:poket+7,210:ln=ln-3
8130 poket+19,9:poket+20,210:poket+15,ln:poket+14,209:ln=ln-3
8135 poket+4,17:poket+11,17:poket+18,17
8140 fori=1to500:nexti
8145 poket+4,16:poket+11,16:poket+18,16
8150 forj=1to200:nextj:nextv
8155 forn=ttot+23:poket,0:next
8160 printtab(8)"[151]hit return[146] to continue"
8165 geta$:ifa$=""then8165
8170 ifa$<>chr$(13)then8160
8175 return
9000 pa=56320:jm=15:fm=16:zr=0:t=54272:x=32
9010 fc=31:q=164:forn=ttot+24:poken,0:next
9020 forji=1to8:readjv(ji):next
9030 poke56334,peek(56334)and254:poke1,peek(1)and251
9040 fori=0to2047:poke12288+i,peek(53248+i):nexti
9050 poke1,peek(1)or4:poke56334,peek(56334)or1
9060 poke53272,(peek(53272)and240)+12
9070 forch=0to39:readnw:poke12504+ch,nw:nextch
9080 forv=1to8:readcc$(v),ct$(v),cn$(v):nextv:return
10000 data14,6,7,5,13,9,11,10
10100 data255,195,255,219,219,219,219,219
10200 data60,60,195,219,219,195,60,60
10300 data219,219,219,126,126,219,219,219
10400 data60,36,255,255,255,219,24,126
10500 data255,219,219,255,255,195,231,255
10600 data "","^",tracker
10700 data "[149]","[219]",track
10800 data "[156]","_",purple herbie
10900 data "","$[146]",20-100 pts
11000 data "[154]","\", 10-50 pts
11100 data "[150]"," [146]",home 40-200 pts
11200 data "","[",meanie
11300 data "[144]","[214]",deadly x