Effificient particles in 2D

Blitz3D Forums/Blitz3D Programming/Effificient particles in 2D

The Forum Archive is locked. These are the original blitzbasic.com forums, kept so their posts can still be read and searched. No new topics, replies or edits can be made here. To join the conversation, head over to the Blitz3D+ forums.

Hi all,

I'm working on a simple particle engine in 2D, for explosions etc...

Right now when I generate an explosion, I simply have a for loop that generates 100 or more particle objects which are of a particle type which has fields, x#,y#,mx#,my#,life
Then to update and display them I update each particles coords then decrement it's life, it's deleted when life hits zero. I lock the image buffer before drawing the particles as I've found this is quicker.

Is using types a good way to do particles, or would I be better off using an array or memory bank? Also, those of you who know this stuff, is it best to update every particle every frame, or half of them?