home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1985 April / 1985-04.d64 / apple_64 (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  5KB  |  137 lines

  1. 100 poke56,48:clr:tp=53280
  2. 110 fori=1to162:reada:x=x+a:next
  3. 120 ifx<>90689thenprint"[147][144]error in data statements.":stop
  4. 130 restore:poketp,12:poketp+1,12:print"[147]"tab(15)"welcome to"
  5. 140 printtab(14)"[144]*apple hunt[144]*":gosub1300:gosub370
  6. 150 print"[144]"tab(6)"need instructions (y or n) ?"
  7. 160 getz$:ifz$=""or(z$<>"y"andz$<>"n")then160
  8. 170 ifz$="n"then440
  9. 180 poketp,1:poketp+1,1
  10. 190 a$="[147][144]":printa$"  you are %. the object of the game is"
  11. 200 print"to eat all the apples(&[144])"
  12. 210 printtab(25)"[145]in the forest. you(%) must avoid the trees([[144]) and the"
  13. 220 print"monster(![144]). use your joystick to move % through the forest."
  14. 230 printtab(20)"[145]% has limited time  to eat all &[144]. the screen will turn";
  15. 240 print" red":print"if % is about to run out of time.":gosub1310
  16. 250 printa$"   ![144] will eat [[144] as well as &[144]. ";
  17. 260 print"if % hits ![144] or [[144] you will lose."
  18. 270 printtab(21)"[145] press the fire    button to release a zap. a zap destroys"
  19. 280 print"[[144] and resets time. if ![144] is hit by a zap "
  20. 290 print"you will be awarded 1000":printtab(25)"[145]points. ";
  21. 300 print"![144] will hover around &[144] until % eats it or ![144] getsit.":gosub1310
  22. 310 printa$"   sometimes a ruby ([156]#[144]) appears on the  screen, you must try ";
  23. 320 print"to get [156]#[144] before ![144]":print"gets it. you can gain 3000 points for"
  24. 330 print"getting [156]#[144]. for each &[144] you can score"
  25. 340 print"between 50 to 500 points."
  26. 350 printtab(26)"[145]an extra % andzap are awarded after waves 5,10,15,20"
  27. 360 print"and 25.":gosub1310:print"[147]":goto440
  28. 370 poke53272,28:sys828
  29. 380 readv:ifv=-1then400
  30. 390 fori=vtov+7:reada:pokei,a:next:goto380
  31. 400 s=54272:forl=stos+24:pokel,0:next
  32. 410 hf=s+1:dimn(16):fori=1to16:readn(i):next:gosub1340
  33. 420 fort=0to8:readdr(t):next
  34. 430 return
  35. 440 print"[147]":so=0:tx=0:sc=1024:zz=45:w=1:me=2:za=2
  36. 450 deffnd(z)=abs((jv=2)*1+(jv=1)*2+(jv=8)*3+(jv=4)*4)
  37. 460 poketp,1:poketp+1,1:forl=1tozz:x=int(rnd(0)*960):pokesc+s+x,5:pokesc+x,27
  38. 470 pokes+24,15:pokes+4,17:pokehf,50:pokes,100:pokes+4,16:next:zz=zz+27
  39. 480 tr=int(rnd(1)*6)+6:forp=1totr:ta=int(rnd(1)*960)+sc
  40. 490 pokes+4,65:pokehf,15:pokes+3,15:pokes+2,20:pokes+4,64:poketa,38:poketa+s,2
  41. 500 ifint(rnd(1)*100)+1<=3thenpoketa,35:poketa+s,4
  42. 510 pokes+4,17:pokehf,50:pokes,200:pokes+4,16:next
  43. 520 sx=int(rnd(1)*960)+sc:pokesx,33:pokesx+s,6
  44. 530 po=int(rnd(1)*960)+sc:pokepo,37:pokepo+s,0
  45. 540 forl=1to3:pokepo,37:forp=1to100:next
  46. 550 pokepo,32:forp=1to100:next:next:pokepo,37
  47. 560 ti$="000000"
  48. 570 ifti=>1100thenpoketp,2:ifti=>1400then710
  49. 580 jv=peek(56320):fr=jvand16:jv=15-(jvand15):iffr=0then970
  50. 590 xx=fnd(z):ifxx=0then650
  51. 600 dr=dr(xx):po=po+dr:ifpo>2023thenpo=po-960:pokepo-dr+960,32
  52. 610 ifpo<1024thenpo=po+960:pokepo-dr-960,32
  53. 620 ifpeek(po)<>32then720
  54. 630 pokes+4,65:pokehf,15:pokepo-dr,32:pokepo,37:pokepo+s,0:pokes+3,15
  55. 640 pokes+2,20:pokes+4,64
  56. 650 pokesx,32:x=int(rnd(1)*8)+1
  57. 660 jj=dr(x)
  58. 670 sx=sx+jj:ifsx<1024thensx=sx+960:pokesx-jj,32
  59. 680 ifsx>2023thensx=sx-960:pokesx-jj,32
  60. 690 ifpeek(sx)=37thenpokesx-jj,33:pokesx+s-jj,6:pokepo,29:pokepo+s,0:goto790
  61. 700 pokesx,33:pokesx+s,6:goto570
  62. 710 print"[144]took too long":pokepo,29:pokepo+s,0:goto800
  63. 720 ifpeek(po)=27orpeek(po)=33thenpokepo-dr,29:pokepo+s-dr,0:goto790
  64. 730 ifpeek(po)<>38then760
  65. 740 pokepo-dr,32:pokepo,37:pokepo+s,0:so=so+int(rnd(1)*10+1)*50:tx=tx+1
  66. 750 gosub1440:iftx>4then890
  67. 760 ifpeek(po)<>35then630
  68. 770 pokepo-dr,32:pokepo,37:pokepo+s,0
  69. 780 print"[144]3000 points.":so=so+3000:goto890
  70. 790 gosub1390:me=me-1:ifme=>1thenzz=zz-27:print"[147]":goto460
  71. 800 print"[144]":forp=1to10
  72. 810 print"[144]game over":forl=1to100:next
  73. 820 print"[145]             [145]":forl=1to100:next:next:ifso>hsthenhs=so
  74. 830 poketp,1:poketp+1,1:print"[147]"tab(12)"[144]score="so:printtab(12)"wave="w
  75. 840 printtab(12)"high score="hs
  76. 850 printtab(8)"[144]wish to play again(y/n)?":poke198,0
  77. 860 getz$:ifz$=""or(z$<>"y"andz$<>"n")then860
  78. 870 ifz$="y"thenprint"[147]":goto440
  79. 880 poke53272,21:end
  80. 890 bo=int(1400-ti)*3:if(peek(tp)and15)=2thenbo=0
  81. 900 print"[144]wave";w;"over":tx=0:tr=0:ifw=5orw=10orw=15orw=20orw=25then940
  82. 910 w=w+1:print"bonus="bo:so=so+bo:print"score="so
  83. 920 print"men=";me:print"zaps=";za
  84. 930 gosub1340:print"[147]":goto460
  85. 940 forp=1to10:print"extra man and zap":forl=1to100:next
  86. 950 print"[145]                 ":forl=1to100:next:next:print""
  87. 960 me=me+1:za=za+1:goto910
  88. 970 ifza=<0then650
  89. 980 za=za-1:poketp+1,4:poketp,3
  90. 990 pokepo+1,64:pokepo-1,64:pokepo-40,93:pokepo+40,93
  91. 1000 pokepo+39,78:pokepo-39,78:pokepo-41,77:pokepo+41,77
  92. 1010 pokepo+1+s,0:pokepo-1+s,2:pokepo-40+s,3:pokepo+40+s,4
  93. 1020 pokepo+39+s,5:pokepo-39+s,6:pokepo-41+s,7:pokepo+41+s,8
  94. 1030 forl=1to100:next
  95. 1040 ifpeek(sx)<>33thenso=so+1000:print"[144]1000 points.":goto890
  96. 1050 pokesx,32:sx=sc+int(rnd(1)*960)+1:pokepo+1,32:pokepo-1,32
  97. 1060 pokepo-40,32:pokepo+40,32
  98. 1070 pokepo+39,32:pokepo-39,32:pokepo-41,32:pokepo+41,32
  99. 1080 poketp,1:poketp+1,1:ti$="000000":goto650
  100. 1090 data 173,14,220,41,254,141,14
  101. 1100 data 220,173,24,208,41,14,10
  102. 1110 data 10,133,167,169,208,133,252
  103. 1120 data 173,0,221,41,3,73,3
  104. 1130 data 10,10,10,10,10,10,5
  105. 1140 data 167,133,254,165,1,41,251
  106. 1150 data 133,1,169,0,133,251,133
  107. 1160 data 253,168,162,8,177,251,145
  108. 1170 data 253,200,208,249,230,252,230
  109. 1180 data 254,202,208,242,165,1,9
  110. 1190 data 4,133,1,173,14,220,9
  111. 1200 data 1,141,14,220,96
  112. 1210 data12584,60,66,165,129,165,153,66,60
  113. 1220 data12552,195,34,20,156,126,29,8,119
  114. 1230 data12520,60,66,165,129,153,165,66,60
  115. 1240 data12504,0,28,62,127,127,62,8,8
  116. 1250 data12592,6,8,60,126,126,126,60,24
  117. 1260 data12568,60,126,255,255,126,60,24,8,-1
  118. 1270 data35,40,45,50,55,60,65,70,75,80,85,90,95,100,105,110
  119. 1280 rem data35,63,75,95,107,109,115,125,131,132,135,140,137,135,137,140
  120. 1290 data0,40,-40,1,-1,-41,41,-39,39
  121. 1300 ad=828:fori=adtoad+81:reada:pokei,a:nexti:return
  122. 1310 printtab(14)"hit any key[146]"
  123. 1320 getz$:ifz$=""then1320
  124. 1330 return
  125. 1340 pokes+24,15:pokes+5,90:pokes+6,240
  126. 1350 pokes+4,17:foro=0to3
  127. 1360 forl=1+oto8+o:pokehf,n(l)
  128. 1370 pokes,110:fort=1to50:next:next:next:forv=15to0step-1:pokes+24,v
  129. 1380 fori=1to50:next:next:pokes+4,16:return
  130. 1390 pokes+24,15:pokes+5,90:pokes+6,240
  131. 1400 pokes+4,17
  132. 1410 forl=50to5step-5:pokehf,l
  133. 1420 pokes,5:fort=1to50:next:next:forv=15to0step-1:pokes+24,v
  134. 1430 fori=1to50:next:next:pokes+4,16:return
  135. 1440 pokes+24,15:pokes+4,65:pokes+3,15:pokes+2,20:fori=1to250step5
  136. 1450 pokehf,i:next:pokes+4,64:return
  137.