home *** CD-ROM | disk | FTP | other *** search
- 1 rem * lazer maze *
- 2 rem * by tim george *
- 3 rem * (c)2000 j&f publishing *
- 4 poke55,0:poke56,80:clr
- 5 poke53371,1:goto5000
- 7 :
- 8 rem * computer mover *
- 9 rem - set up sound -
- 10 pokes+14,0:pokes+15,10:pokes+19,0:pokes+20,0
- 12 rem - search for destination -
- 14 n=x(cp)+y(cp)*40+1065:a=n:dr=2:j=dr
- 15 if(x(cp)=dx%)and(y(cp)=dy%)then22
- 16 p=n+a(j):ifpeek(p)<>32then20
- 17 n=p:x(cp)=x(cp)-(j=1)+(j=3):y(cp)=y(cp)-(j=0)+(j=2):d(cp)=tr(j)
- 18 j=(j+2)+4*(j>1):sys20480,3,x(cp),y(cp),d(cp),cp
- 19 pokes+18,129:poke162,0:wait162,4:pokes+18,0
- 20 j=(j-1)-4*(j=0):if(n<>a)or(j<>dr)then15
- 22 sys20480,3,dx%,dy%,dr%,cp:x(cp)=dx%:y(cp)=dy%:d(cp)=dr%:return
- 28 :
- 29 rem - human mover -
- 30 x=x(cp):y=y(cp):a=1065+y*40+x:n=a:pokea,32:j=56320-((np=2)and(cp=2))
- 31 pokes+14,0:pokes+15,10:pokes+19,0:pokes+20,0
- 32 poke162,0:wait162,8:a$="":poke198,0
- 33 if(peek(j)and16)=0then50
- 34 geta$:ifa$="q"then5500
- 35 ifcp=1thena$=""
- 36 ifa$=" "then50
- 37 i=notpeek(j)and15:if(i=0)and(a$="")then33
- 38 if(i=1)or(a$="@")thenn=n-40:y=y-1:d=1:goto46
- 40 if(i=2)or(a$=";")thenn=n+40:y=y+1:d=2:goto46
- 42 if(i=4)or(a$=":")thenn=n-1:x=x-1:d=3:goto46
- 44 if(i=8)or(a$="=")thenn=n+1:x=x+1:d=4:goto46
- 45 goto32
- 46 ifpeek(n)<>32thenn=a:x=x(cp):y=y(cp):goto48
- 47 pokes+18,129:poke162,0:wait162,4:pokes+18,0
- 48 a=n:sys20480,3,x,y,d,cp:x(cp)=x:y(cp)=y:d(cp)=d:goto32
- 50 dx%=x:dy%=y:dr%=d(cp):goto140
- 97 :
- 98 rem * new board *
- 99 rem - fade out -
- 100 fori=4to0step-1:sys40006,fd(i):poke162,0:forj=1to10:j=peek(162):next:next
- 102 rem - place center piece? -
- 104 x(0)=30:y(0)=20:ifc0=0then114
- 106 fl=0:fori=1to2:if(x(i)=12)or(x(i)=13)thenif(y(i)=7)or(y(i)=8)thenfl=1
- 107 next:ifflthenpoke53269,15:goto114
- 108 x=int(rnd(ti)*2)+12:y=int(rnd(ti)*2)+7:x(0)=x:y(0)=y
- 110 poke53256,x*12+24:poke53257,y*12+51:poke53269,31
- 112 rem - create on screen 0 - - draw on screen 1 -
- 114 poke648,4:poke646,pc(4)
- 115 sys20480,1,x(1),y(1),x(2),y(2),x(0),y(0):poke648,128
- 116 rem - fade in -
- 118 fori=0to4:sys40006,fd(i):poke162,0:forj=1to10:j=peek(162):next:next
- 119 rem - pre set sound -
- 120 pokes,70:pokes+1,6:pokes+5,0:pokes+6,240:pokes+2,0:pokes+3,8
- 122 pokes+7,0:pokes+8,6:pokes+12,0:pokes+13,240:pokes+9,0:pokes+10,8
- 129 rem - who's turn is it -
- 130 if(np=2)or((np=1)and(cp=2))then30
- 132 rem - computer -
- 134 sys20480,2,x(cp),y(cp):gosub10:geta$:ifa$="q"then5500
- 139 rem - fire! -
- 140 poke214,23:print:poke211,2+33*sgn(cpand2):poke646,pc(cp)
- 142 pokes+4,33:pokes+11,21
- 143 wait53266,128:sys40000,pc(3),pc(cp),pc(4)
- 144 sys49200,dx%,dy%,dr%,sc(cp),dl
- 145 sys40003:pokes+4,0:pokes+11,0
- 146 rem - what happened -
- 147 sc(cp)=sc%:ifsc%>499then200
- 148 ifrc%>2then160
- 149 rem - hit other player -
- 150 sc(op)=sc(op)-10:ifsc(op)<0thensc(op)=0
- 151 poke214,23:print:poke211,1+33*sgn(opand2):poke646,pc(op):printsc(op)"[157] "
- 152 rem - shake -
- 153 n=53248+(opand2)*2:x=peek(n):y=peek(n+1):pokes,255:pokes+4,33:pokes+11,21
- 154 poke53288+(opand2),3:fori=1to16:poken,x+int(rnd(ti)*6)-3:poken+2,peek(n)
- 155 poken+1,y+int(rnd(ti)*6)-3:poken+3,peek(n+1):poke162,2:wait162,8:next
- 156 pokes+4,0:pokes+11,0:poke53288+(opand2),pc(op)
- 157 x(op)=25*sgn(opand2):y(op)=15*sgn(opand2):sys20480,3,x(op),y(op),d(op),op
- 158 c0=1:cp=3-cp:op=3-cp:goto100
- 159 rem - what else -
- 160 ifrc%=160then158:rem hit wall
- 161 ifrc%>3thenop=cp:goto153:rem hit self
- 162 rem hit center
- 163 c0=0:x(cp)=x(0):y(cp)=y(0):poke53269,15:sys20480,3,x(cp),y(cp),d(cp),cp
- 170 pokes,100:pokes+1,9:pokes+7,100:pokes+8,18:pokes+12,0:pokes+13,233
- 172 pokes+11,19:pokes+11,18:goto100
- 199 rem - win! -
- 200 poke162,0:wait162,64
- 201 pokes,0:pokes+5,0:pokes+6,240:x=53280:y=27.5:poke53370,0:poke53275,255
- 202 fori=1to3:forj=110to0step-6:pokex,cl(cp,j/y):pokes+1,j:pokes+4,33
- 204 pokes+4,17:next:pokes+4,16:next:poke53371,1:poke198,0
- 210 poke214,22:print:printtab(3)"[155][208]ress [198][201][210][197] or [211][208][193][195][197] to play again"
- 211 fori=-2to3:poke646,cl(cp,abs(i))
- 212 poke214,12:print:printtab(12)"[208]layer"cp"[215][201][206][211]!"
- 213 poke162,0:forj=0to6:j=peek(162)
- 214 b=peek(56320)andpeek(56321)and16:geta$:if(a$<>"")or(b=0)theni=5:j=6
- 215 next:next:ifi=4then211
- 216 ifa$="q"thenpoke53280,0:poke53269,0:poke53275,0:goto5500
- 218 if(a$<>" ")and(b>0)then211
- 598 :
- 599 rem * begin new game *
- 600 poke53280,0:x(1)=3:y(1)=3:d(1)=4:x(2)=22:y(2)=12:d(2)=3:sc(1)=0:sc(2)=0
- 602 c0=1:cp=1:op=3-cp:poke53265,peek(53265)and239:print"[147]":poke53275,0
- 604 poke33784,149:poke34808,149:poke33786,148:poke34810,148:poke53269,15
- 606 fori=1to2:sys20480,3,x(i),y(i),d(i),i:next
- 608 poke214,23:print:poke646,pc(1):print"* 0";:poke211,12:poke646,pc(0)
- 609 print"[208]ress [209] to quit";:poke211,33:poke646,pc(2):print"* 0"
- 610 poke53265,peek(53265)or16:goto100
- 4998 :
- 4999 rem * move it *
- 5000 poke53280,0:poke53265,peek(53265)and143:poke53281,0:poke648,128:print"[144][147]"
- 5002 poke56578,peek(56578)or3:poke56576,(peek(56576)and252)or1:poke53272,8
- 5004 r=rnd(-ti):gosub60000
- 5006 :
- 5007 rem * initialize *
- 5008 rem - variables -
- 5009 rem colors for player 1, player 2, center, mirrors, screen, laser speed
- 5010 pc(1)=5:pc(2)=4:pc(0)=7:pc(3)=1:pc(4)=0:dl=4
- 5012 s=54272:cp=1:np=1
- 5014 cl(1,3)=1:cl(2,3)=1:cl(1,2)=15:cl(2,2)=15:cl(1,1)=12:cl(2,1)=12
- 5016 cl(1,0)=pc(1):ifpc(1)=5thencl(1,1)=13
- 5018 cl(2,0)=pc(2):ifpc(2)=4thencl(2,1)=10
- 5020 fd(0)=0:fd(1)=11:fd(2)=12:fd(3)=15:fd(4)=pc(3)
- 5022 a(0)=40:a(1)=1:a(2)=-40:a(3)=-1
- 5024 tr(0)=2:tr(1)=4:tr(2)=1:tr(3)=3
- 5048 :
- 5049 rem - set up sid -
- 5050 fori=stos+23:pokei,0:next:pokes+24,15
- 5058 :
- 5059 rem - set up sprites -
- 5060 fori=53248to53264:pokei,0:next:poke53269,0
- 5062 poke53276,0:poke53271,0:poke53275,0:poke53277,0:poke53287,pc(3)
- 5064 poke53288,pc(1):poke53289,pc(3):poke53290,pc(2):poke53291,pc(0)
- 5066 poke33785,145:poke33787,145:poke33788,145
- 5068 poke34809,145:poke34811,145:poke34812,145
- 5098 :
- 5099 rem - laser tables -
- 5100 fori=49152to49175:readq:pokei,q:next
- 5101 data 136,143,137,149,142,148,154,159,139,145,153,158,138,144,150,155,140
- 5102 data 147,152,157,141,146,151,156
- 5489 :
- 5490 wait161,1:wait162,32
- 5498 :
- 5499 rem * main menu *
- 5500 poke53265,peek(53265)and143
- 5502 poke53269,0:print"[147]":gosub5600
- 5512 i=12:poke214,7:print:poke646,pc(0)
- 5514 printtab(i)"[198]1 [208]layers:"np
- 5516 printtab(i)"[198][201][210][197]/[211][208][193][195][197] [208]lay"
- 5518 printtab(i)"[201] [201]nstructions"
- 5520 printtab(i)"[209] [209]uit"
- 5522 poke53265,peek(53265)or16:poke198,0
- 5530 geta$:b=peek(56320)andpeek(56321)and16:if(b=0)or(a$=" ")then600
- 5532 ifa$="[133]"thennp=np+1+3*(np=2):poke214,7:print:printtab(i+12)np:goto5530
- 5534 ifa$="i"then8000
- 5536 ifa$="q"then30000
- 5540 goto5530
- 5598 :
- 5599 rem * print little phazar *
- 5600 i=10:poke646,pc(1)
- 5602 printtab(i)"[193][194][195][196][197][198][199][200][201]";
- 5604 poke646,pc(2)
- 5606 print"[202][203][204][205][206][207][208][209][210][211]"
- 5608 poke646,pc(1)
- 5610 printtab(i)"[161][162][163][164][165][166][167][168][169]";
- 5612 poke646,pc(2)
- 5614 print"[170][171][172][173][174][175][176][177][178][179][180]"
- 5616 return
- 7998 :
- 7999 rem * instructions *
- 8000 gosub8500
- 8002 i=2:printtab(i)"[158][212]he [205][197][206][213]"
- 8004 printtab(i)"[208]ress [198]1 for number of players."
- 8006 printtab(i)"[208]ress [198][201][210][197] or [211][208][193][195][197] to play."
- 8008 printtab(i)"[208]ress [201] for instructions (these)."
- 8010 printtab(i)"[208]ress [209] to return to [204]oadstar":printtab(i)"or exit to [194]asic."
- 8012 gosub8510:gosub8500
- 8014 i=2:printtab(i)"[158][212]he [208][204][193][217]"
- 8016 printtab(i)"[207]ne player: [213]se stick 2 or keyboard."
- 8018 printtab(i)"[212]wo players: [208]layer 1 uses stick 2."
- 8020 printtab(i)"[208]layer 2 uses stick 1 or keyboard."
- 8022 printtab(i)"[212]he keyboard controls are: up":printtab(30)"@"
- 8024 printtab(24)"[158]left :;= [158]right":printtab(30)"down"
- 8026 printtab(i)"[205]ove your piece and":printtab(i)"press [198][201][210][197] or [211][208][193][195][197]."
- 8028 gosub8510:gosub8500
- 8030 i=2:printtab(i)"[158][212]he [215][201][206]"
- 8034 printtab(i)"[197]ach mirror hit scores one point."
- 8036 printtab(i)"[200]it yourself and lose 50 points."
- 8038 printtab(i)"[193] hit by the other player subtracts"
- 8040 printtab(i)"10 points."
- 8042 printtab(i)"[200]it the center block and go again."
- 8044 printtab(i)"[212]he first player to 500 wins."
- 8046 gosub8510:goto5500
- 8500 poke53265,peek(53265)and143
- 8502 print"[147]":gosub5600:printtab(14)"[201]nstructions":return
- 8510 poke214,23:print:printtab(7)"[208][210][197][211][211] [193][206][217] [203][197][217] [212][207] [195][207][206][212][201][206][213][197]"
- 8512 poke53265,peek(53265)or16:poke198,0:wait198,1:geta$:return
- 9997 end
- 9998 :
- 9999 rem * scratch and save *
- 10000 d=peek(186):n$="0:lazer maze":open1,d,15,"s"+n$:close1:saven$,d:end
- 19997 :
- 19998 rem * list to printer *
- 19999 - set to device 4 -
- 20000 p=peek(646):poke646,peek(53281):print"[147]print#1:close1":poke646,p
- 20002 poke631,19:poke632,13:poke198,2:open1,4,7:cmd1:list:end
- 29998 :
- 29999 rem * move it back *
- 30000 print"[144][147]":poke648,4:print"[147][154]";
- 30002 poke56576,(peek(56576)and252)or3:poke53272,23:poke56,160:clr
- 39998 :
- 39999 rem * return to loadstar *
- 40000 f$="hello connect":close2:close15
- 40001 dv=peek(186):ifdv<8thendv=8
- 40002 fori=dvtodv+1:ifi=dvthen40200
- 40003 fori=8to29:if(i=14)or(i=dv)theni=i+1
- 40200 open2,i,2:close2:ifstthen40500
- 40201 open15,i,15,"r0:"+f$+"="+f$:input#15,er:close15:ifer<>63then40500
- 40202 print"[147] "chr$(34)f$chr$(34)","i:poke631,19:poke632,131:poke198,2:end
- 40500 next:poke186,8:poke53280,14:poke53281,6:poke198,0:end
- 59998 :
- 59999 rem * title screen *
- 60000 print"[147]":poke53280,0:poke53281,0:poke53265,peek(53265)or16
- 60002 poke53370,0:sys20480,4,5,4,7,2,2
- 60004 poke214,11:print:printtab(13)"by [212]im [199]eorge"
- 60006 printtab(12)"www.loadstar.com"
- 60008 poke162,0:poke161,0:poke53371,1:return
-