I am writing a iOS game using Cocos2d. There are a lot of balls(about 7000 objects) in a screen.
When touch the screen, the balls should be exploded in the area, and it should be filled with around balls.
I created a box2d object for each of them and added it in the physics world.
Problems are as follows.
How can I make the game smoothly?
How can I make the game smoothly?
Reduce the number of balls. 7000 physics enabled, colliding bodies is pure overkill. Even 700 is a lot.
In any case there's no quick fix for this. You can try to reduce the number of position & velocity iterations in the box2d world's timestep and do not use collision callback methods (don't set a collision delegate) but that's about it.