Check this out. Very simple example of using particles for explosions.
Graphics 800,600 SetBuffer BackBuffer() Type particle Field x#,y# Field speed# Field angle# Field time Field timer End Type While Not KeyHit(1) Cls If MouseHit(1) Then For loop=1 To (Int(Rnd(25,49))) create_particles(MouseX(),MouseY()) Next End If update_particle() Rect MouseX(),MouseY(),2,2 Flip Wend End Function create_particles(x,y) p.particle=New particle p\angle=Rnd(0,359) p\x=x p\y=y p\speed=Rnd(0.2,1.3) p\time=MilliSecs()+Int(Rnd(500,3000)) End Function Function update_particle() For p.particle=Each particle Color Int(Rnd(20,250)),Int(Rnd(50,250)),Int(Rnd(50,250)) Rect p\x,p\y,1,1 p\x=p\x+(Sin(p\angle)*p\speed) p\y=p\y+(Cos(p\angle)*p\speed) If MilliSecs()>=p\time Then Delete p.particle End If Next End Function