Challenge:
Winner?:
No
Code Snippet:
sync on fastsync autocam off hide mouse color backdrop rgb(0,0,0) position camera 0,0,-30 Dline(7,-7.5,0,-2,-7.5,-3,-2,rgb(0,255,0)) Dline(18,-7.5,-3,-2,-4.5,0,-2,rgb(0,255,0)) Dline(13,-3.5,-1.5,-2,-2.5,-1.5,-2,rgb(0,255,0)) Dline(2,-1.5,3,-2,-1.5,-3,-2,rgb(0,255,0)) Dline(9,-1.5,-3,-2,0.5,-3,-2,rgb(0,255,0)) Dline(15,0.5,-3,-2,1.5,-2,-2,rgb(0,255,0)) Dline(4,1.5,-2,-2,1.5,0,-2,rgb(0,255,0)) Dline(11,1.5,0,-2,-0.5,0,-2,rgb(0,255,0)) Dline(17,-0.5,0,-2,-1.5,-1,-2,rgb(0,255,0)) Dline(10,2.5,0,-2,5.5,0,-2,rgb(0,255,0)) Dline(3,5.5,0,-2,5.5,-3,-2,rgb(0,255,0)) Dline(12,5.5,-1,-2,3.5,-1,-2,rgb(0,255,0)) Dline(16,3.5,-1,-2,2.5,-2,-2,rgb(0,255,0)) Dline(5,2.5,-2,-2,2.5,-3,-2,rgb(0,255,0)) Dline(8,2.5,-3,-2,4.5,-3,-2,rgb(0,255,0)) Dline(14,4.5,-3,-2,5.5,-2,-2,rgb(0,255,0)) Dline(6,6.5,3,-2,6.5,-3,-2,rgb(0,255,0)) Dline(1,7.5,3,-2,7.5,-3,-2,rgb(0,255,0)) `1-7 | `8-13 - `14-18 / lasttime=timer() introtime#=0 for count=1 to 3 position object count,0,30,0 next count for count=4 to 7 position object count,0,-30,0 next count for count=8 to 10 position object count,-30,0,0 next count for count=11 to 13 position object count,30,0,0 next count for count=14 to 16 position object count,21.21,21.21,0 next count for count=17 to 18 position object count,21.21,21.21,0 `20.5 next count while introtime#<4 t=timer() time#=(t-lasttime)/1000.0 lasttime=t introtime#=introtime#+time# if introtime#<0.5 t#=introtime#*2 for count=1 to 3 position object count,0,30-(29.5*t#),0 next count for count=4 to 7 position object count,0,-30+(29.5*t#),0 next count for count=8 to 10 position object count,30-(29.5*t#),0,0 next count for count=11 to 13 position object count,-30+(29.5*t#),0,0 next count for count=14 to 16 position object count,21.21-(20.86*t#),21.21-(20.86*t#),0 next count for count=17 to 18 position object count,-21.21+(20.86*t#),-21.21+(20.86*t#),0 next count else if introtime#<2.5 t#=(introtime#-0.5)/2 for count=1 to 3 position object count,0,0.5-(t#),0 next count for count=4 to 7 position object count,0,-0.5+(t#),0 next count for count=8 to 10 position object count,0.5-(t#),0,0 next count for count=11 to 13 position object count,-0.5+(t#),0,0 next count for count=14 to 16 position object count,0.35-(0.7*t#),0.35-(0.7*t#),0 next count for count=17 to 18 position object count,-0.35+(0.7*t#),-0.35+(0.7*t#),0 next count else if introtime#<3 t#=(introtime#-2.5)*2 for count=1 to 3 position object count,0,-0.5-(29.5*t#),0 next count for count=4 to 7 position object count,0,0.5+(29.5*t#),0 next count for count=8 to 10 position object count,-0.5-(29.5*t#),0,0 next count for count=11 to 13 position object count,0.5+(29.5*t#),0,0 next count for count=14 to 16 position object count,-0.35-(20.86*t#),-0.35-(20.86*t#),0 next count for count=17 to 18 position object count,0.35+(20.86*t#),0.35+(20.86*t#),0 next count endif endif endif sync endwhile for count=1 to 18 delete object count next count global dim sparkobj(0) global dim sparkx#(0) global dim sparky#(0) global dim sparkz#(0) global dim sparkangx#(0) global dim sparkangy#(0) global dim sparkangz#(0) global dim sparkmag#(0) points_per_round=3 p1s=0 p2s=0 p1x#=0 p1y#=0 p1velx#=0 p1vely#=0 p2x#=0 p2y#=0 p2velx#=0 p2vely#=0 bx#=0 by#=0 bz#=15 bcx#=0 bcy#=0 bvelx#=0 bvely#=0 bvelz#=0 brad#=2 curvex#=0 curvey#=0 curving=0 curvelength#=0 powering=0 powerlength#=0 zonethreshhold#=10 scoretime#=-2.5 level=1 remstart 1-15 p1 16-30 p2 31-34 area 43-44 ball 50-58 roundscore remend ink rgb(90,255,90),rgb(0,0,0) make object plain 43,1,1 make object plain 44,1,1 hide object 43 hide object 44 Dline(1,-4,4,0,4,4,0,rgb(0,255,0)) Dline(2,4,4,0,5,3,0,rgb(0,255,0)) Dline(3,5,3,0,5,-3,0,rgb(0,255,0)) Dline(4,5,-3,0,4,-4,0,rgb(0,255,0)) Dline(5,4,-4,0,-4,-4,0,rgb(0,255,0)) Dline(6,-4,-4,0,-5,-3,0,rgb(0,255,0)) Dline(7,-5,-3,0,-5,3,0,rgb(0,255,0)) Dline(8,-5,3,0,-4,4,0,rgb(0,255,0)) Dline(16,-4,4,0,4,4,0,rgb(0,255,0)) Dline(17,4,4,0,5,3,0,rgb(0,255,0)) Dline(18,5,3,0,5,-3,0,rgb(0,255,0)) Dline(19,5,-3,0,4,-4,0,rgb(0,255,0)) Dline(20,4,-4,0,-4,-4,0,rgb(0,255,0)) Dline(21,-4,-4,0,-5,-3,0,rgb(0,255,0)) Dline(22,-5,-3,0,-5,3,0,rgb(0,255,0)) Dline(23,-5,3,0,-4,4,0,rgb(0,255,0)) Dline(31,-17,12,0,-17,12,30,rgb(0,255,0)) Dline(32,17,12,0,17,12,30,rgb(0,255,0)) Dline(33,-17,-12,0,-17,-12,30,rgb(0,255,0)) Dline(34,17,-12,0,17,-12,30,rgb(0,255,0)) Dline(35,-17,12,0,17,12,0,rgb(0,255,0)) Dline(36,17,12,0,17,-12,0,rgb(0,255,0)) Dline(37,17,-12,0,-17,-12,0,rgb(0,255,0)) Dline(38,-17,-12,0,-17,12,0,rgb(0,255,0)) Dline(39,-17,12,30,17,12,30,rgb(0,255,0)) Dline(40,17,12,30,17,-12,30,rgb(0,255,0)) Dline(41,17,-12,30,-17,-12,30,rgb(0,255,0)) Dline(42,-17,-12,30,-17,12,30,rgb(0,255,0)) for count=0 to 1 offset=count*7 Dline(50+offset,-2.5,5,0,3.5,5,0,rgb(0,255,0)) Dline(51+offset,-3,0,0,3,0,0,rgb(0,255,0)) Dline(52+offset,-3.5,-5,0,2.5,-5,0,rgb(0,255,0)) Dline(53+offset,-3,0,0,-2.5,5,0,rgb(0,255,0)) Dline(54+offset,3,0,0,3.5,5,0,rgb(0,255,0)) Dline(55+offset,-3.5,-5,0,-3,0,0,rgb(0,255,0)) Dline(56+offset,2.5,-5,0,3,0,0,rgb(0,255,0)) next count for count=50 to 56 position object count,-9,0,15 scale object count,100,0.1,100 hide object count next count for count=57 to 63 position object count,9,0,15 scale object count,100,0.1,100 hide object count next count Dline(47,0,0,0,0,0,-1,rgb(0,255,0)) Dline(48,0,0,0,0,0,-1,rgb(0,0,255)) Dline(49,0,0,0,0,0,-1,rgb(255,0,0)) hide object 47 hide object 48 hide object 49 lasttime=timer() do ink rgb(90,255,90),rgb(0,0,0) lmb=0 mmb=0 rmb=0 mv=mouseclick() if int(mv/8)=1 mv=mv-8 endif if int(mv/4)=1 mv=mv-4 mmb=1 endif if int(mv/2)=1 mv=mv-2 rmb=1 endif if mv=1 lmb=1 endif t=timer() time#=(t-lasttime)/1000.0 lasttime=t if scoretime#>=0 if (balltime#<1) balltime#=balltime#+time# if balltime#<0 if balltime#<-0.2 if balltime#<-0.4 if balltime#<-1.6 if balltime#<-1.8 if balltime#>-2 if balltime#-time#<-2 showdigits(50,oldp2s) showdigits(57,oldp1s) endif for count=50 to 63 scale object count,100+(((0.2-(balltime#+2.0)))*500),0,100 next count endif else for count=50 to 63 scale object count,100,(balltime#+1.8)*500,100 next count endif else if oldp1s=points_per_round if balltime#-time#<-1.6 p1s=0 p2s=0 endif if int(-balltime#*10)-(int(int(-balltime#*10)/2)*2)=0 if (int(-(balltime#-time#)*10)-(int(int(-(balltime#-time#)*10)/2)*2))<>0 for count=57 to 63 hide object count next count endif else if (int(-(balltime#-time#)*10)-(int(int(-(balltime#-time#)*10)/2)*2))=0 showdigits(57,points_per_round) endif endif else if balltime#-time#<-1.6 for count=50 to 63 scale object count,100,100,100 next count endif if oldp2s=points_per_round if balltime#-time#<-1.6 p1s=0 p2s=0 endif if (int(-balltime#*10)-(int(int(-balltime#*10)/2)*2))=0 if (int(-(balltime#-time#)*10)-(int(int(-(balltime#-time#)*10)/2)*2))<>0 for count=50 to 56 hide object count next count endif else if (int(-(balltime#-time#)*10)-(int(int(-(balltime#-time#)*10)/2)*2))=0 showdigits(50,points_per_round) endif endif endif endif endif else if balltime#-time#<0.4 showdigits(57,oldp1s) showdigits(50,oldp2s) endif for count=50 to 63 scale object count,100,(0.2-(balltime#+0.4))*500,100 next count endif else for count=50 to 63 scale object count,100+(((balltime#+0.2))*500),0,100 next count endif else if balltime#-time#<0 if oldp1s=points_per_round scoretime#=-2.5 level=level+1 endif if oldp2s=points_per_round scoretime#=-2.5 if level>1 then level=level-1 endif for count=50 to 63 hide object count next count endif endif if balltime#>1 select rnd(1) case 0: bvelz#=20 : endcase case 1: bvelz#=-20 : endcase endselect endif endif else scoretime#=scoretime#+time# if scoretime#<0 if scoretime#<-0.2 if scoretime#<-0.4 if scoretime#<-1.6 if scoretime#<-1.8 if scoretime#>-2 if scoretime#-time#<-2 showdigits(50,0) showdigits(57,0) for count=50 to 56 position object count,-5,0,15 next count for count=57 to 63 position object count,5,0,15 next count endif for count=50 to 63 scale object count,100+(((0.2-(scoretime#+2.0)))*500),0,100 next count endif else for count=50 to 63 scale object count,100,(scoretime#+1.8)*500,100 next count endif else i=(scoretime#+1.6)*((level*2.5)/1.2) if i>level then i=level `print i if i<10 digita=0 else digita=int(i/10) endif digitb=i-(int(i/10)*10) showdigits(50,digita) showdigits(57,digitb) endif else for count=50 to 63 scale object count,100,(0.2-(scoretime#+0.4))*500,100 next count endif else for count=50 to 63 scale object count,100+(((scoretime#+0.2))*500),0,100 next count endif else for count=50 to 63 hide object count next count for count=50 to 56 position object count,-9,0,15 next count for count=57 to 63 position object count,9,0,15 next count endif endif p1velx#=p1x# p1vely#=p1y# p2velx#=p2x# p2vely#=p2y# p1x#=p1x#+(mousemovex()/15.0) if p1x#>12 then p1x#=12 if p1x#<-12 then p1x#=-12 p1y#=p1y#-(mousemovey()/15.0) if p1y#>8 then p1y#=8 if p1y#<-8 then p1y#=-8 if bx#>p2x# p2x#=p2x#+((6.0*time#)*level*0.75) if bx#<p2x# then p2x#=bx# endif if bx#<p2x# p2x#=p2x#-((6.0*time#)*level*0.75) if bx#>p2x# then p2x#=bx# endif if by#>p2y# p2y#=p2y#+((6.0*time#)*level*0.75) if by#<p2y# then p2y#=by# endif if by#<p2y# p2y#=p2y#-((6.0*time#)*level*0.75) if by#>p2y# then p2y#=by# endif if p2x#>12 then p2x#=12 if p2x#<-12 then p2x#=-12 if p2y#>8 then p2y#=8 if p2y#<-8 then p2y#=-8 for count=1 to 8 position object count,p1x#,p1y#,0 next count for count=16 to 23 position object count,p2x#,p2y#,30 next count p1velx#=(p1x#-p1velx#)*(1.0/time#) p1vely#=(p1y#-p1vely#)*(1.0/time#) p2velx#=(p2x#-p2velx#)*(1.0/time#) p2vely#=(p2y#-p2vely#)*(1.0/time#) bvelx#=bvelx#+bcx# bvely#=bvely#+bcy# bx#=bx#+(bvelx#*time#) by#=by#+(bvely#*time#) bz#=bz#+(bvelz#*time#) if powered=1 bx#=bx#+(((bvelx#*2)*powerlength#)*time#) by#=by#+(((bvely#*2)*powerlength#)*time#) bz#=bz#+(((bvelz#*2)*powerlength#)*time#) endif if by#>12-brad# by#=(12-brad#)-(by#-(12-brad#)) createsparks(20,bx#,12,bz#,0,360,0,0,360,0,1,20) bvely#=-bvely# endif if by#<(-12)+brad# by#=(brad#-12)+(by#-(brad#-12)) createsparks(20,bx#,-12,bz#,0,360,0,0,360,0,1,20) bvely#=-bvely# endif if bx#>17-brad# bx#=(17-brad#)-(bx#-(17-brad#)) createsparks(20,17,by#,bz#,0,360,0,0,360,0,1,20) bvelx#=-bvelx# endif if bx#<(-17)+brad# bx#=(brad#-17)+(bx#-(brad#-17)) createsparks(20,-17,by#,bz#,0,360,0,0,360,0,1,20) bvelx#=-bvelx# endif if bz#<brad# if ((bx#<p1x#+5.0) AND (bx#>p1x#-5.0)) AND ((by#<p1y#+4.0) AND (by#>p1y#-4.0)) powered=0 bz#=brad#+(brad#-bz#) bvelz#=-bvelz# bvelx#=bvelx#+(p1velx#*0.4) bvely#=bvely#+(p1vely#*0.4) if (curving=0) AND (powering=0) then createsparks(70,bx#,by#,0,-90,90,0,0,360,0,1,20) if curving=1 createsparks(70,bx#,by#,0,-90,90,0,0,360,0,2,20) record#= int(curvelength#*100) bcx#=-((p1velx#*0.05)*curvelength#) bcy#=-((p1vely#*0.05)*curvelength#) curved=1 endif if powering=1 createsparks(70,bx#,by#,0,-90,90,0,0,360,0,3,20) record#= int(powerlength#*100) powered=1 endif curving=0 powering=0 curvex#=0 curvey#=0 else p2s=p2s+1 oldp2s=p2s oldp1s=p1s createsparks(200,bx#,by#,bz#,0,360,0,0,360,0,1,30) bx#=0 by#=0 bz#=15 bcx#=0 bcy#=0 curving=0 powering=0 curvex#=0 curvey#=0 bvelx#=0 bvely#=0 bvelz#=0 balltime#=-3.5 endif endif if bz#>30-brad# if ((bx#<p2x#+5.0) AND (bx#>p2x#-5.0)) AND ((by#<p2y#+4.0) AND (by#>p2y#-4.0)) createsparks(70,bx#,by#,30,90,180,0,0,360,0,1,20) powered=0 curved=0 bz#=(30-brad#)-(bz#-(30-brad#)) bvelz#=-bvelz# bvelx#=bvelx#+(p2velx#*0.4) bvely#=bvely#+(p2vely#*0.4) bcx#=0 bcy#=0 else p1s=p1s+1 oldp2s=p2s oldp1s=p1s createsparks(200,bx#,by#,bz#,0,360,0,0,360,0,1,30) bx#=0 by#=0 bz#=15 bcx#=0 bcy#=0 curving=0 powering=0 curvex#=0 curvey#=0 bvelx#=0 bvely#=0 bvelz#=0 balltime#=-3.5 endif endif zone=0 if (bz#-brad#<zonethreshhold#) AND (bvelz#<0) zone=1 if curving=0 then curvelength#=(bz#-brad#)/zonethreshhold# if powering=0 then powerlength#=(bz#-brad#)/zonethreshhold# else curvelength#=0 endif if curving=1 curvex#=curvex#+p1velx# curvey#=curvey#+p1vely# endif if rmb=1 if ((rightclick=0) AND (zone=1)) AND (powering=0) curving=1 curvex#=0 curvey#=0 endif rightclick=1 else rightclick=0 endif if lmb=1 if ((leftclick=0) AND (zone=1)) AND (curving=0) powering=1 endif leftclick=1 else leftclick=0 endif if (balltime#>=0) AND (scoretime#>=0) if balltime#<1 position object 43,bx#,by#,bz# position object 44,bx#,by#+brad#,bz# bsy=object screen y(44) ink rgb(balltime#*90,balltime#*255,balltime#*90),rgb(0,0,0) circle object screen x(43),object screen y(43),object screen y(43)-bsy else position object 43,bx#,by#,bz# position object 44,bx#,by#+brad#,bz# bsy=object screen y(44) ink rgb(90,255,90),rgb(0,0,0) circle object screen x(43),object screen y(43),object screen y(43)-bsy endif endif ink rgb(90,255,90),rgb(0,0,0) position object 44,bx#+brad#,by#-brad#,bz# bsx=object screen x(44) bsh=object screen y(44)-bsy position object 44,p1x#+4,p1y#+3,0 hudx=object screen x(44) hudy=object screen y(44) position object 44,p1x#+5,p1y#-3,0 hudw=object screen x(44)-hudx hudh=object screen y(44)-hudy position object 44,p1x#-4,p1y#+3,0 hudx2=object screen x(44) hudy2=object screen y(44) position object 44,p1x#-5,p1y#-3,0 hudw2=hudx2-object screen x(44) hudh2=object screen y(44)-hudy2 updatesparks(time#,0.5) sync line (hudx+hudw)-2,hudy+((hudh/(30.0-(brad#*2)))*(bz#-brad#)),(hudx+hudw)-2,hudy+hudh line (hudx+hudw)-2,hudy+((hudh/(30.0-(brad#*2)))*(bz#-brad#)),(hudx+hudw)-5,(hudy-3)+(((hudh+6)/(30.0-(brad#*2)))*(bz#-brad#)) line (hudx+hudw)-5,(hudy-3)+(((hudh+6)/(30.0-(brad#*2)))*(bz#-brad#)),(hudx+hudw)-5,hudy+hudh+3 line (hudx+hudw)-2,hudy+hudh,(hudx+hudw)-5,hudy+hudh+3 line (hudx2-hudw2)+2,hudy2+((hudh2/(30.0-(brad#*2)))*(bz#-brad#)),(hudx2-hudw2)+2,hudy2+hudh2 line (hudx2-hudw2)+2,hudy2+((hudh2/(30.0-(brad#*2)))*(bz#-brad#)),(hudx2-hudw2)+5,(hudy2-3)+(((hudh2+6)/(30.0-(brad#*2)))*(bz#-brad#)) line (hudx2-hudw2)+5,(hudy2-3)+(((hudh2+6)/(30.0-(brad#*2)))*(bz#-brad#)),(hudx2-hudw2)+5,hudy2+hudh2+3 line (hudx2-hudw2)+2,hudy2+hudh2,(hudx2-hudw2)+5,hudy2+hudh2+3 if zone=1 y1=(hudy-5)+(((hudh+10)/(30.0-(brad#*2)))*(bz#-brad#)) y2=((hudy)-(hudw-3))+(((hudh+((hudw-3)*2))/(30.0-(brad#*2)))*(bz#-brad#)) y3=(hudy-5)+(((hudh+10)/(30.0-(brad#*2)))*((bz#+2.5)-brad#)) y4=((hudy)-(hudw-3))+(((hudh+((hudw-3)*2))/(30.0-(brad#*2)))*((bz#+2.5)-brad#)) y21=(hudy2-5)+(((hudh2+10)/(30.0-(brad#*2)))*(bz#-brad#)) y22=((hudy2)-(hudw2-3))+(((hudh2+((hudw2-3)*2))/(30.0-(brad#*2)))*(bz#-brad#)) y23=(hudy2-5)+(((hudh2+10)/(30.0-(brad#*2)))*((bz#+2.5)-brad#)) y24=((hudy2)-(hudw2-3))+(((hudh2+((hudw2-3)*2))/(30.0-(brad#*2)))*((bz#+2.5)-brad#)) if curving=1 length#=zonethreshhold#-(zonethreshhold#*curvelength#) ink rgb(90,90,255),rgb(0,0,0) else length#=zonethreshhold#-(bz#-brad#) endif line (hudx+hudw)-7,(hudy-5)+(((hudh+10)/(zonethreshhold#))*(length#)),(hudx+hudw)-7,hudy+hudh+5 line (hudx+hudw)-7,(hudy-5)+(((hudh+10)/(zonethreshhold#))*(length#)),(hudx+hudw)-10,(hudy-8)+(((hudh+16)/(zonethreshhold#))*(length#)) line (hudx+hudw)-10,(hudy-8)+(((hudh+16)/(zonethreshhold#))*(length#)),(hudx+hudw)-10,hudy+hudh+8 line (hudx+hudw)-7,hudy+hudh+5,(hudx+hudw)-10,hudy+hudh+8 ink rgb(90,255,90),rgb(0,0,0) if powering=1 length#=zonethreshhold#-(zonethreshhold#*powerlength#) ink rgb(255,90,90),rgb(0,0,0) else length#=zonethreshhold#-(bz#-brad#) endif line (hudx2-hudw2)+7,(hudy2-5)+(((hudh2+10)/(zonethreshhold#))*(length#)),(hudx2-hudw2)+7,hudy2+hudh2+5 line (hudx2-hudw2)+7,(hudy2-5)+(((hudh2+10)/(zonethreshhold#))*(length#)),(hudx2-hudw2)+10,(hudy2-8)+(((hudh2+16)/(zonethreshhold#))*(length#)) line (hudx2-hudw2)+10,(hudy2-8)+(((hudh2+16)/(zonethreshhold#))*(length#)),(hudx2-hudw2)+10,hudy2+hudh2+8 line (hudx2-hudw2)+7,hudy2+hudh2+5,(hudx2-hudw2)+10,hudy2+hudh2+8 ink rgb(90,255,90),rgb(0,0,0) endif loop Function Dline(ret,x1#,y1#,z1#,x2#,y2#,z2#,color As DWord) if ret=0 then ret=findobj() Make Object Triangle ret,x1#,y1#,z1#,x2#,y2#,z2#,x2#,y2#,z2#+0.01 Set Object WireFrame ret,1 Color Object ret,color set object specular ret,rgb(255,255,255) set object specular power ret,100 EndFunction ret function findobj() ret=120 while object exist(ret) ret=ret+1 endwhile endfunction ret function createsparks(num,x#,y#,z#,minrangex,maxrangex,deviancex,minrangez,maxrangez,deviancez,colour,maxmag#) for count=1 to num angx=(rnd(maxrangex-minrangex)+minrangex) angz=(rnd(maxrangez-minrangez)+minrangez) mag#=rnd(int(maxmag#*1000.0))/1000.0 array insert at bottom sparkobj() array insert at bottom sparkx#() array insert at bottom sparky#() array insert at bottom sparkz#() array insert at bottom sparkangx#() array insert at bottom sparkangy#() array insert at bottom sparkangz#() array insert at bottom sparkmag#() sparks=array count(sparkobj()) obj=findobj() if colour=2 clone object obj,48 else if colour=3 clone object obj,49 else clone object obj,47 endif endif show object obj position object obj,x#,y#,z# xrotate object obj,angx zrotate object obj,angz scale object obj,mag#*10.0,mag#*10.0,mag#*10.0 sparkobj(sparks)=obj sparkx#(sparks)=x# sparky#(sparks)=y# sparkz#(sparks)=z# sparkangx#(sparks)=angx sparkangy#(sparks)=0 sparkangz#(sparks)=angz sparkmag#(sparks)=mag# next count endfunction function updatesparks(iterationtime#,decay#) sparks=array count(sparkobj()) for count=1 to sparks move object sparkobj(count),sparkmag#(count)*iterationtime# scale object sparkobj(count),sparkmag#(count)*10.0,sparkmag#(count)*10.0,sparkmag#(count)*10.0 if sparkmag#(count)<7 delete object sparkobj(count) array delete element sparkobj(),count array delete element sparkx#(),count array delete element sparky#(),count array delete element sparkz#(),count array delete element sparkangx#(),count array delete element sparkangy#(),count array delete element sparkangz#(),count array delete element sparkmag#(),count count=count-1 sparks=sparks-1 else if sparkmag#(count)<12 set alpha mapping on sparkobj(count),(sparkmag#(count)-7)*20 endif sparkmag#(count)=sparkmag#(count)-(sparkmag#(count)*decay#*iterationtime#) endif next count endfunction function showdigits(startobj,number) if number<10 select number case 0 : restore 0: endcase case 1 : restore 1: endcase case 2 : restore 2: endcase case 3 : restore 3: endcase case 4 : restore 4: endcase case 5 : restore 5: endcase case 6 : restore 6: endcase case 7 : restore 7: endcase case 8 : restore 8: endcase case 9 : restore 9: endcase endselect for obj=startobj to startobj+6 read temp if temp=1 show object obj else hide object obj endif next obj endif endfunction 0: data 1,0,1,1,1,1,1 1: data 0,0,0,1,0,1,0 2: data 1,1,1,0,1,1,0 3: data 1,1,1,0,1,0,1 4: data 0,1,0,1,1,0,1 5: data 1,1,1,1,0,0,1 6: data 1,1,1,1,0,1,1 7: data 1,0,0,0,1,0,1 8: data 1,1,1,1,1,1,1 9: data 1,1,0,1,1,0,1