Particle groups
Generally I will be making 10 particles at a time, for my in game particle effects.
There will be around 10 though, and they will all die out at the same time so would it be a good idea to have a particle group struct and an array of particle groups rather than a straight array?
There will be around 10 though, and they will all die out at the same time so would it be a good idea to have a particle group struct and an array of particle groups rather than a straight array?
Sir, e^iπ + 1 = 0, hence God exists; reply!
That's what I'd do.
For this project, yeah, sounds easier.
But it will also be less robust/reusable for later projects, or if you wanted to make say a missle that left a particle stream one particle at a time, or something.
But it will also be less robust/reusable for later projects, or if you wanted to make say a missle that left a particle stream one particle at a time, or something.
Justin Ficarrotta
http://www.justinfic.com
"It is better to be The Man than to work for The Man." - Alexander Seropian
I've found slightly random lifetimes make a big difference to the look.
Make it simple on yourself. Make an array of structs.
When you start juggling a straight array that has extra meaning to it's contents, you'll start to lose it and end up with some ugly macros for addressing the array contents.
In my opinion the struct approach is more flexible as you can easily change the number or particles or add extra information to the particle group in the future if needed and you won't have to do any ugly machinations to the array that contains the particles.
When you start juggling a straight array that has extra meaning to it's contents, you'll start to lose it and end up with some ugly macros for addressing the array contents.
In my opinion the struct approach is more flexible as you can easily change the number or particles or add extra information to the particle group in the future if needed and you won't have to do any ugly machinations to the array that contains the particles.
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| osg::Particle how to change de texture of each particle | zinbawe | 1 | 2,610 |
Jul 14, 2009 12:46 AM Last Post: DoG |
|

