Hello,
As some of you know, I was asking questions about some other stuff earlier and it led me to the suggestion of pre-allocating particles for my ParticleExplosion I am using for my game.
Basically, I am using a bunch of particle explosions when sprites interact. Think of space invaders, but with different types of bullets that interact differently with different enemies. A lot of the time, there will be explosions when two sprites interact. Many explosions can be going on at the same time - in fact, there are usually at least 2 explosions going on at the exact same time.
I figured I would start a thread to help me, and others in search of the same answers, find answers to optimizing particle systems for their games.
After a bunch of explosions happen in my game (there has to be a lot), it slows down to about 30-40fps. It doesn't start slowing down until after about 150-200+ explosions.
It was suggested to pre-allocate the particles. I have gone into particle.m and other files, but haven't been able to figure out how to do this exactly. I'm also new to chipmunk, cocos2d, cocoa and objective-c, so maybe I am missing something simple. I searched google to see if there was anything, but I couldn't find anything.
I'm thinking these answers would help a lot of people, so any information would be greatly appreciated. I'll post what I find as well in here.
Thanks all!