thanks aphrodite ... you are really like aphrodite in mythology (saverrrr)
yes this why i was thinking to destroy object when its outside layout maybe will reduce the collisions calculations ... so as i understand i will help (just little but better than nothing ...)
and for reduce polygons collisions on object (as you sad i have object with some parts that not need to be checked for example only their X and not ther Y so ... that will help ??? yes ?
finally i just not understand something ...
when you say "Some collisions maybe could be check only each other ticks."
that mean that i have to add another condition to "when object 1 is on collisions with another object B" for example every tick or every seconde ?
thanks a lot for all
i just finish my game and publish it on appstore ... but i see that its slower on iphone 4
so i would like to improve performance at maximum for iphone 4
For the collisions, C2 already checks only the bounding box first, then if the bounding box are indeed colliding(very fast to calculate), it checks the true collisions, this can be slower depending on the complexity of the collision polygon, also C2 arranges everything in different cells (areas) if it is possible to reduce the collision checks, but other than that, I do not know much about how it is done.
As for not checking every tick, I would say for exemple a large (relatively speaking, testing will tell if it works or not) projectile can checks if it is colliding with the player only one tick out of two for exemple, to achieve that, you can add the system condition "Compare two values: tickcount%2 equal to 0", that may help (it could also cause problems in some cases, but I consider that this kind of projectile will be destroyed right after colliding)
I do not know much about your game so I cannot help a lot, the debugger feature of C2 may help you see what parts are cpu consumming.
Also, it may be possible that graphics are what kneel you game down, but not sure about that