Better Version (Kinda):
Type Vectors
x As Float
y As Float
z As Float
EndType
Type Particle
p As Vectors
v As Vectors
EndType
DIM Particles(50) As Particle
for x=1 to 50
make object sphere x, 4+rnd(6), 8, 8
hide object x
next x
make object sphere 51, 10, 8, 8
position camera 0, 10, -150
point camera 0,0,0
sync on
do
for t=1 to 50
Particles(t).p.x = Particles(t).p.x + Particles(t).v.x
Particles(t).p.y = Particles(t).p.y + Particles(t).v.y
Particles(t).p.z = Particles(t).p.z + Particles(t).v.z
Particles(t).p.x = Particles(t).p.x * 0.99
Particles(t).p.y = Particles(t).p.y * 0.99
Particles(t).p.z = Particles(t).p.z * 0.99
`Position, scale and fade particle object
position object t,Particles(t).p.x,Particles(t).p.y,Particles(t).p.z
yrotate object t,object angle y(t)+0.01
move object t,100
next t
if spacekey() = 1 and bomb = 0 then bomb = 1
if bomb = 1
inc i
if i>50 then bomb = 0 : i=1
`Position
Particles(i).p.x = 0
Particles(i).p.y = 0
Particles(i).p.z = 0
`Velocity (randomize)
Particles(i).v.x = (rnd(400)-200) * 0.005
Particles(i).v.y = (rnd(400)-200) * 0.005
Particles(i).v.z = (rnd(400)-200) * 0.005
`Show the particle
show object i
endif
`if spacekey() = 0 then bomb = 0
text 0,0,"press space to bang"
sync
loop