Optimising Particles - Pooling etc.

BlitzMax Forums/BlitzMax Programming/Optimising Particles - Pooling etc.

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

1. Particles can go offscreen -> useless to update them

They can come back onscreen as well. So you'd better update them.

2. Particles can have alpha <= 0 -> useless to update them

Particles should not reach an alpha of zero until their lifetime is complete. I make mine fade out over the last 25% of their life (and fade in over the first 10%).

The cost of updating a single particle should be negligible. The fillrate of drawing all those blended layers will become a bottleneck long before the CPU processing does.

You should think of a particle emitter as a single dynamic mesh, not as a collection of parts.