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