home *** CD-ROM | disk | FTP | other *** search
/ UpTime Volume 2 #9 / utv2n9s2.d64 / bunnymain (.txt) < prev    next >
Commodore BASIC  |  2022-08-28  |  5KB  |  158 lines

  1. 10 rem   the bunny hop-by jc hilty-5/87
  2. 15 poke 45,peek(174):poke 46,peek(175):clr:poke53281,0:poke53280,0
  3. 20 poke147,0:sys57812"bunny.ml",8,1:sys62631
  4. 25 poke147,0:sys57812"bunny.sp",8,1:sys62631
  5. 26 poke147,0:sys57812"bunny.font",8,1:sys62631
  6. 30 dims$(4),e(9),c$(4)
  7. 35 c$(0)="[158]":c$(1)="[155]":c$(2)="[150]":c$(3)="[156]":c$(4)="[153]"
  8. 40 a$="#$%[157][157][157]&'([157][157][157])*+"
  9. 45 s$(0)="":forx=1to4:s$(x)=s$(x-1)+"":next
  10. 50 forx=0to9:e(x)=(x*4)+3:next
  11. 52 v=53248:s=54272:sc=0:le=1:li=4:bo=240:l=1:cd=2:hs=0
  12. 54 forx=49601to49616:pokex,0:next:poke49700,255:poke49600,0:sys49376
  13. 59 poke53272,(peek(53272)and240)or14
  14. 60 gosub500
  15. 64 gosub380
  16. 65 w1=peek(v+30):w2=peek(v+32)
  17. 70 poke49600,30
  18. 75 sys49501
  19. 80 onlgosub110,135,110,200,230,205,110,210,110,215,110,230
  20. 85 ifbo=0then290
  21. 90 l=l+1:ifl=13thenl=1
  22. 95 w1=peek(v+30):ifw1and1then245
  23. 100 w2=peek(v+31):ifw2and1then290
  24. 105 goto75
  25. 110 ifpeek(v+5)>100thenpoke49606,254:poke49700,4
  26. 115 ifpeek(v+5)<60thenpoke49606,2:poke49700,4
  27. 120 ifpeek(v+7)<176thenpoke49608,2:poke49700,8
  28. 125 ifpeek(v+7)>220thenpoke49608,254:poke49700,8
  29. 130 return
  30. 135 g=int(09*rnd(9)+1):onggoto140,145,150,155,160,165,170,175,180
  31. 140 poke49603,1:poke49604,0:poke49700,2:poke2041,195:goto185
  32. 145 poke49603,255:poke49604,0:poke49700,2:poke2041,194:goto185
  33. 150 poke49603,0:poke49604,1:poke49700,2:goto185
  34. 155 poke49603,0:poke49604,255:poke49700,2:goto185
  35. 160 poke49603,1:poke49604,1:poke49700,2:poke2041,195:goto185
  36. 165 poke49603,255:poke49604,255:poke49700,2:poke2041,194:goto185
  37. 170 poke49603,1:poke49604,255:poke49700,2:poke2041,195:goto185
  38. 175 poke49603,255:poke49604,1:poke49700,2:poke2041,194:goto185
  39. 180 poke49603,0:poke49604,0:poke49700,2:goto185
  40. 185 ifpeek(v+3)<75thenpoke49604,1:poke49700,2
  41. 190 ifpeek(v+3)>220thenpoke49604,255:poke49700,2
  42. 195 return
  43. 200 forx=2042to2044:pokex,197:next:return
  44. 205 forx=2042to2044:pokex,196:next:return
  45. 210 bo=bo-cd:print"[153]"tab(6)"   ":print""tab(5)bo:return
  46. 215 ifpeek(v+3)<peek(v+1)thenpoke49604,255:poke49700,2:poke2041,194
  47. 220 ifpeek(v+3)>peek(v+1)thenpoke49604,1:poke49700,2:poke2041,195
  48. 225 return
  49. 230 ifpeek(v+2)<40thenpoke49603,1:poke49700,2:return
  50. 231 ifpeek(v+16)and2thenpoke49603,255:poke49700,2:return
  51. 232 return
  52. 245 ifw1=3then255
  53. 250 goto290
  54. 255 sc=sc+bo:bo=240:l=1:y=194:cd=cd+2:ifcd=14thencd=2
  55. 260 le=le+1:ifle=13thensc=sc+(250*li):pokes+4,16:goto335
  56. 265 poke49600,0
  57. 270 forx=0to24:pokes+x,0:next:pokes+24,15:pokes+5,80:pokes+6,243:pokes+3,4
  58. 275 pokes+4,65
  59. 280 forx=20to140step4:pokes+1,x:poke2041,y:y=y+1:ify=196theny=194
  60. 285 next:pokes+4,64:pokev+21,0:goto64
  61. 290 poke49600,0:l=1:li=li-1:bo=240
  62. 295 forx=0to24:pokes+x,0:next:poke2040,193
  63. 300 pokev+23,28:pokev+29,28
  64. 305 y=196:pokes+24,15:pokes+5,80:pokes+6,243:pokes+3,7
  65. 310 forj=60to12step-1:pokes+4,65:pokes+1,j
  66. 315 forx=2042to2044:pokex,y:nextx:y=y+1:ify=198theny=196
  67. 320 pokes+4,64:nextj
  68. 325 ifli=0thenpokev+23,0:pokev+29,0:goto335
  69. 330 pokev+21,0:pokev+23,0:pokev+29,0:goto64
  70. 335 poke49600,0:pokev+21,0
  71. 336 print"[147]<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
  72. 337 print"[129]======================================="
  73. 338 fort=0to9:print"<"tab(38)"<":print"[129]="tab(38)"=":next
  74. 339 print"<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
  75. 340 print"[129]======================================="
  76. 341 print"[155]"tab(15)"game over":print
  77. 345 ifsc>hsthenhs=sc
  78. 350 printtab(16)"score"sc:printtab(16)"high "hs:print
  79. 355 printtab(6)"would you like to play again"
  80. 357 printtab(16)"[y / n]"
  81. 360 poke 198,0
  82. 365 getk$:ifk$=""then365
  83. 366 ifk$="y"thenbo=240:li=4:l=1:le=1:sc=0:cd=2:goto64
  84. 370 ifk$<>"n"then365
  85. 372 open15,8,15:open1,8,2,"0:reboot,p,r":input#15,e:close1:close15
  86. 373 ife=0thenload"reboot",8
  87. 374 print"the uptime disk is not in the drive"
  88. 375 printspc(8);"press space[146] to continue"
  89. 376 getk$:ifk$<>" "then376
  90. 377 goto336
  91. 380 poke53281,0:print"[147][153]bonus      lives  [154],    ,[153]scr      lev"
  92. 385 print"[154],,,,,,,,,,,,,,,,,,,    ,,,,,,,,,,,,,,,,"
  93. 390 forx=0to7:print","tab(38)",":next
  94. 395 forx=0to3:print:next:forx=0to8:print","tab(38)",":next
  95. 400 print",,,,,,,,,,,,,,,,,,,    ,,,,,,,,,,,,,,,,"
  96. 405 print"[153]"tab(5)bo;tab(16)li;tab(27)sc;tab(36)le
  97. 410 gosub465
  98. 411 pokev+37,1:pokev+38,9
  99. 415 pokev+16,9:poke2040,192:pokev+28,29:pokev+39,5:pokev,46:pokev+1,134
  100. 420 poke2041,195:pokev+40,15:pokev+2,160:pokev+3,136
  101. 425 poke2042,196:pokev+41,0:pokev+4,40:pokev+5,80
  102. 430 poke2043,196:pokev+42,0:pokev+6,44:pokev+7,210
  103. 435 poke2044,196:pokev+43,0:pokev+8,50:pokev+9,144
  104. 440 forx=49601to49616:pokex,0:next
  105. 445 poke49605,2:poke49606,2:poke49607,253:poke49608,254:poke49609,1
  106. 450 poke49700,31:w1=peek(v+30):w2=peek(v+31)
  107. 455 pokev+21,31:return
  108. 460 rem    create new forest
  109. 465 qq=int(rnd(9)*10+5)
  110. 470 forx=0toqq
  111. 475 c=int(rnd(9)*5):h=int(rnd(9)*8):ve=int(rnd(9)*5)
  112. 480 printc$(c)s$(ve)tab(e(h))a$:next
  113. 485 return
  114. 499 rem    instructions
  115. 500 print"[147]<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
  116. 502 print"[129]======================================="
  117. 504 fort=0to9:print"<"tab(38)"<":print"[129]="tab(38)"=":next
  118. 505 print"<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
  119. 506 print"[129]======================================="
  120. 507 print"[155]"tab(2)"use a joystick in port 2 to move"
  121. 508 printtab(2)"farmer jones as he chases the bunny"
  122. 509 printtab(2)"who has been eating his carrots."
  123. 510 printtab(2)"your object is to catch the bunny"
  124. 511 printtab(2)"before time runs out on the clock.":print
  125. 512 printtab(2)"you must not run into a tree or fall"
  126. 514 printtab(2)"into the blue creek surrounding the"
  127. 515 printtab(2)"forest.  if you do then you lose one"
  128. 516 printtab(2)"of the four lives that you start"
  129. 517 printtab(2)"the game with."
  130. 518 print:printtab(2)"you are not in the forest alone."
  131. 519 printtab(2)"roaming around are the infamous"
  132. 520 printtab(2)"three bears!  if a bear captures"
  133. 521 printtab(2)"you a life is lost.":print:printtab(9)"please press spacebar"
  134. 522 poke198,0
  135. 523 get k$:if k$<>" " then 523
  136. 524 print"[147]<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
  137. 525 print"[129]======================================="
  138. 526 fort=0to9:print"<"tab(38)"<":print"[129]="tab(38)"=":next
  139. 527 print"<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
  140. 528 print"[129]======================================="
  141. 530 print"[155]"tab(2)"the game consists of 12 levels with"
  142. 531 printtab(2)"the clock counting down faster on"
  143. 532 printtab(2)"each level from 1 to 6 then repeats"
  144. 533 printtab(2)"from levels 7 to 12.  you must"
  145. 534 printtab(2)"capture the bunny on each level"
  146. 535 printtab(2)"before progressing to the next."
  147. 536 print:printtab(2)"your score on each level is the"
  148. 537 printtab(2)"time remaining on the clock when"
  149. 538 printtab(2)"you capture the bunny.  if you"
  150. 539 printtab(2)"complete all 12 levels you receive"
  151. 540 printtab(2)"bonus points for thr lives that"
  152. 541 printtab(2)"you have remaining.":print
  153. 542 printtab(2)"good luck with that cwazy wabbit!!":print
  154. 544 printtab(9)"please press spacebar"
  155. 545 poke198,0
  156. 550 get k$:if k$<>" " then 550
  157. 560 return
  158.