------------------
Lack
a particle engine how to make one and eny math algos
inuse as boolean
x as integer
y as integer
xv as integer
yv as integer
c as color
then create an array of them like this:
dim parts(1000) as part_type;
then to create a particle:
for a=0 to 1000
if parts(a).inuse = false then goto got_one
next a
' Couldn't find a free one!
got_one:
' for each property
parts(a).property = value
then to update & draw the parts, just use
for a=0 to 1000
if parts(a).inuse = true then
' draw at x,y in color c
plot(x,y,c)
' update pos according to velocity
parts(a).x = parts(a).x + parts(a).xv
parts(a).y= parts(a).y + parts(a).yv
end if
next a
this is fine for simple systems, anyway. i've made tons of progs using particle systems in qbasic - if you want the code, ask...
Some of the things you might want to consider are basic physical properties such as speed, mass, elasticity and acceleration. Don't expect a physically correct 10000 particle system to run anyway near 50fps though - especially not when written in Visual Basic.
/Niels
how would i make an animation that would show the velocity changes of the particles?
How would i make an animation using the pset command, i know many dont like this command but i need somewere to start. if you could other examples would also be helpfull.
could you send me those examples
im trying to make a particle engine, how would i do one in vb? Also looking for math algos to set the physics and path of them in any langage thanks