particles
Hey everyone, i just made a little particle class. By creating an instance of it, you have one particle and you can control the color, gravity, position, velocity, and wind... The way I use it right now is that I have an array.
PARTICLE particles[128];
I find it stupid because i can have only one particle effect at a time.
Now can anyone give me a few tips on how I would alter this class, or create a kind of wrapper class that would allow for infinite particles? And please don''t tell me to make a bigger array.
...go on and live with no regrets, you only have one life...
quote:Original post by untalkative_monkey
I find it stupid because i can have only one particle effect at a time.
Create a ParticleEffect class, which maintains a (circular) list of particles (circular so that particles get recycled rather than continuously created and destroyed). Then have multiple instances of ParticleEffect.
[ GDNet Start Here | GDNet FAQ | MS RTFM | STL | Google ]
Thanks to Kylotan for the idea!
A cool link someone posted yesterday I think:
www.particlesystems.com
Source code, editors, discussion - all you need.
--
Simon O''''Connor
Creative Asylum Ltd
www.creative-asylum.com
www.particlesystems.com
Source code, editors, discussion - all you need.
--
Simon O''''Connor
Creative Asylum Ltd
www.creative-asylum.com
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement