Particle groups

Posts: 1,403
Joined: 2005.07
Post: #1
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?

Sir, e^iπ + 1 = 0, hence God exists; reply!
Quote this message in a reply
Posts: 1,140
Joined: 2005.07
Post: #2
That's what I'd do.
Quote this message in a reply
Posts: 338
Joined: 2004.07
Post: #3
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.

Justin Ficarrotta
"It is better to be The Man than to work for The Man." - Alexander Seropian
Quote this message in a reply
Posts: 5,143
Joined: 2002.04
Post: #4
I've found slightly random lifetimes make a big difference to the look.
Quote this message in a reply
Posts: 131
Joined: 2004.10
Post: #5
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.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  osg::Particle how to change de texture of each particle zinbawe 1 2,927 Jul 14, 2009 12:46 AM
Last Post: DoG
  Particle Engines Nick 18 6,453 Sep 8, 2005 12:24 PM
Last Post: TomorrowPlusX
  How to do (2D) Particle Systems? Taxxodium 8 5,550 Oct 21, 2002 04:16 PM
Last Post: w_reade