I’m working on my first game using cocos2d-x and I have a problem with Particle System. I use particle system when I destroy an object in my game and I have multiple particle at the same time. My game becomes slowly and crash after some playing times. When I don’t use particle system, my game run ok without crash. I’ve tested on both Iphone and Android device and the game crashed on both of them.
In the game, I loop on my objects array and display particle for each object by this code:
m_emitter~~>setAutoRemoveOnFinish;
if
{
m_emitter~~>setPosition( CCPointMake(posX, posY) );
}
}
}
After I touch too much on the screen, it becomes slowly and force close. It’s only force close on real device. On simulator it run well.
In my game, it doesn’t have much particle as this test. When i touch on the object of the game, that object and all the same objects beside it will be destroyed and particle effects will be displayed. It crashed when I replayed the game many times.