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.

It makes absolutely no difference timewise using arrays or lists for your particles. Sure, sometimes arrays are faster, sometimes lists, depends on what you're doing and how. But all the speed tests run over thousands or millions of iterations to see a noticeable difference, so they're "academic" and not real life for a system with <1000 particles on screen (if you need more particles you're really doing something wrong).

I use lists (one for active, one for idle particles) for my particle engine. But there are many other things to optimize that have a bigger impact: The way you're drawing them and how you organize your textures, how you calculate them.

Just by optimizing your calculations and adding/removing if-then-else structures where useful you get a good boost.