2D Fire Works by Caleb728th Aug 2008 13:19
|
---|
Summary Fire works is a small program that uses arrays and dots to form beautiful pops of sparkles and such HAHA!!! Description Fire works is a small program that uses arrays and dots to form beautiful pops of sparkles and such HAHA!!! It isn't to special :D Code ` This code was downloaded from The Game Creators ` It is reproduced here with full permission ` http://www.thegamecreators.com rem FIRE WORKS!!! FFFF IIII RRRR EEEEE rem FIRE WORKS!!! F II R R E rem FIRE WORKS!!! FF II RRRR EEE rem FIRE WORKS!!! F IIII R RR EEEEE Works sync on sync rate 100 DIM x(10,10) DIM y(10,10) DIM x2(10,10,10) DIM y2(10,10,10) DIM xt(10) DIM yt(10) DIM dist(10,2) DIM shoot(10) load sound "pop_1.wav",1 load sound "pop_2.wav",2 load sound "pop_3.wav",3 load sound "charge.wav",4 loop sound 4 do cls if mouseclick()=1 then mc=mc+1 else mc=0 `if mc=1 then play sound 4 if mc=1 play sound 1 g=g+1 if g>10 then g=1 dist(g,1)=0 dist(g,2)=0 shoot(g)=1 xt(g)=mousex() yt(g)=mousey() endif for f=1 to 10 if shoot(f)=1 dist(f,1)=dist(f,1)+2 for t=1 to 10 x(f,t)=newxvalue(xt(f),t*36,dist(f,1)) y(f,t)=newzvalue(yt(f),t*36,dist(f,1)) if dist(f,1)>100 then dist(f,2)=dist(f,2)+2 : dist(f,1)=dist(f,1)+1 if dist(f,1)>100 and dist(f,1)<120 and rnd(1)=1 then play sound 2 for a=1 to 10 x2(f,t,a)=newxvalue(x(f,t),a*36,dist(f,2)) y2(f,t,a)=newzvalue(y(f,t),a*36,dist(f,2)) dot x2(f,t,a),y2(f,t,a),RGB(128,0,255) if x2(f,t,a)<0 or x2(f,t,a)>screen width() and rnd(1)=1 then play sound 3 : x2(f,t,a)=xt(f) if y2(f,t,a)<0 or y2(f,t,a)>screen height() and rnd(1)=1 then play sound 3 : y2(f,t,a)=yt(f) next a dot x(f,t),y(f,t),RGB(255,0,0) next t if dist(f,2)>300 then shoot(f)=0 endif next f sync loop |