Particle Size

BlitzMax Forums/BlitzMax Beginners Area/Particle Size

Thanks to everyone for their help and all the other interesting info.

I thought I'd follow this up with my findings as I hate it when I'm searching for info on a problem, you find someone who has a problem that matches yours but there's no conclusion from the original poster.

Here's what I did during this phase of optimisation (ie on top of previous optimisations):

1) Where possible I downsized all my images to below the next lowest power of 2
2) I changed two out of three of my particle systems (emitters) to use arrays rather than TLists (with the third it just makes more sense for it to be a list)
3) I changed all my TLists to use RemoveLink

And the result: a minor performance improvement but still plenty of slow down when the screen became busy. Cue a lot of despondency, followed by some head scratching, followed by the thought; when did all this slowdown start anyway?

The answer: after the sound was added. One quick investigation later revealed that my TActiveChannel objects weren't pooled and when there's lots of bouncing going on this can result in many new TActiveChannels being instantiated at once as there's no limit on how many bounce sounds can be created so a new "channel" is always requested. One object pooling exercise later and it's running perfectly!