home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1985 September / 1985-09.d64 / tracker (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  6KB  |  173 lines

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