home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1984 July
/
1984-07.d64
/
beekeeper_64
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
3KB
|
92 lines
1 poke56,48:poke55,0:clr
5 poke53280,2:poke53281,0
10 dimsp(8)
20 print"[147]"
30 v=1:sc=0:cm=54272
40 gosub500:gosub800:gosub600
41 pokecm+24,15:pokecm+5,17:pokecm+6,241:pokecm,0:pokecm+12,17:pokecm+13,241
42 pokecm+7,0
45 gosub700
50 s=peek(56320):sw=(sand4)/4:f=(sand16)/16
60 sr=(sand8)/8
70 iff=1then130
80 i=1:a=sh-32:j=p1:pokecm+8,200:pokecm+11,129
90 j=j+sp(a):ifj<saorj>2023then120
100 ifpeek(j)<>32thenpokebn,32:gosub310:goto120
110 pokebn,32:pokej,42:pokebbn+cm,3:bn=j:i=i+1:ifi<8then90
120 pokebn,32:pokecm+11,128
130 ifsw=1thenifsr=1then200
140 cc=1:ifsw=0thencc=-1
150 pokecm+1,50:pokecm+4,33:ifp1=p2thenj=p1:gosub310
160 ifsh=40thenifcc=1thencc=-7
170 ifsh=33thenifcc=-1thencc=7
180 sh=sh+cc:pokep1,sh:pokecm+4,32
200 a=sh-32:mn=p1:p1=p1+sp(a):ifp1<saorp1>sethenp1=mn
210 ifpeek(p1)<>32thenj=p1:pokemn,32:gosub300
220 pokemn,32:pokep1,sh:ifw=1then250
230 p2=int(rnd(1)*21)+1783:mc=int(rnd(1)*6)+1:sx=41:sy=32:bc=3:w=1
240 ifmc=2thensx=44:sy=43:bc=5
250 a=sgn(p2-p1):m0=p2:p2=p2-a*h:ifabs(p2-p1)>25thenp2=p2-a*40
260 ifp2<saorp2>sethenp2=m0
270 ifa=0thenj=p2:gosub310:goto50
280 pokecm+p2,mc:pokem0,sy:pokep2,sx:pokecm+m0,bc:goto50
300 a=peek(j):ifa=43ora<41thenp1=mn:goto480
310 fori=1to5:pokej,42:pokej+cm,2:pokecm+7,50:pokecm+11,129
311 pokecm+1,60:pokecm+4,33:pokej,32:next
320 pokej+cm,3:n=sq:ifj=p2thenw=0:sc=sc+150
330 ifp1=p2ora=41thensq=sq-1:p1=1764:sh=39
340 ifj>1903thensc=sc+50:aq=aq-1
350 sc=sc+50:ifsc>hithenhi=sc
370 print"[158]score:"sc;tab(32)"ships:"sq:pokep1+cm,3:pokep1,sh:pokecm+11,128
380 ifsq=nthen410
390 fori=1to5:fors=10to80step2:pokecm+1,s:pokecm+4,33:fora=1to10:next:next
400 pokecm+4,32:forj=1to100:next:next
410 ifaq=0thenv=v+1:print"[147]swarm"v:fori=1to4000:next:goto45
420 ifsq<>0then480
430 print""spc(14)"* game over *"
435 printspc(11)"try again? [y or n]"
440 geta$:ifa$=""then440
450 ifa$="y"thenrestore:goto20
460 ifa$<>"n"then440
470 print"[147]":end
480 return
500 print"*[159]beekeeper*"
510 print"hi score=[158]"hi
520 fori=1to3000:next:return
600 print"[147]"spc(10)"use joystick to play"
605 printspc(10)"bee"tab(20)")"spc(5)"100"
610 printspc(10)"clover"tab(20)"+"spc(6)"50"
615 printspc(10)"crab"tab(20)","spc(5)"200"
620 printspc(10)"[158]hive"tab(20)"@"spc(6)"50"
625 printspc(10)"difficulty levels..."
630 printspc(14)"[1] beginner"
635 printspc(14)"[2] advanced":printspc(14)"[3] master"
640 printspc(11)"key in your level:"
650 geta$:ifa$=""then650
660 h=val(a$):ifh<1orh>3then650
670 return
700 p1=1764:sh=39:sq=8:sa=1064:se=1823
710 ct=55296:ce=56295:aq=66:bn=sa
720 print"[147]":fori=cttoce:pokei,3:next
730 fori=1to50:a=int(rnd(1)*758)+sa:pokecm+a,5:pokea,43:next
740 fori=1824to1903:pokei+cm,7:pokei,0:next
750 fori=1904to2023:pokei+cm,int(rnd(1)*6)+1:pokei,41:next
760 print"[158]score:"sc;tab(32)"ships:"sq:pokep1+cm,3:pokep1,sh:return
800 fori=1to8:readsp(i):next:ifpeek(251)=123thenpoke53272,29:return
805 print"[145][145][145][145][145][145][145]redefining characters"
807 poke251,123
810 data 1,41,40,39,-1,-41,-40,-39
815 poke56334,peek(56334)and254:poke1,peek(1)and251
816 fori=0to511:pokei+12288,peek(i+53248):next
820 fori=12552to12623:reada:pokei,a:next:fori=12640to12647:reada:pokei,a:next
830 fori=12288to12295:pokei,255:next:fori=12632to12639:reada:pokei,a:next
835 poke1,peek(1)or4:poke56334,peek(56334)or1
836 poke53272,(peek(53272)and240)+12
840 data0,96,112,120,207,120,112,96,8,92,60,108,244,126,6,1
850 data16,254,254,108,56,16,16,16,16,58,60,54,47,126,96,128
860 data0,6,14,30,243,30,14,6,128,96,126,47,54,60,58,16
870 data16,16,16,56,108,254,254,16,1,6,126,244,108,60,92,8
880 data195,231,231,126,60,219,189,36,66,102,129,189,126,219,189,36
885 data24,24,102,102,24,24,60,0
890 return