I have an iPad application containing a grid of 400 CCSprites
, some of which contain several sprites already layered together.
I have not used CCSpriteBatchNode
as I believe the ZOrder
needs to be the same for all items in the node, and this isn't the case. Performance is acceptable.
However, I need to optionally overlay a small dot in the centre of each of the 400 sprites (if the user wants a grid displayed to help with layout). The problem is, by adding another CCSprite
(using addChild
) I now have over 800 sprites on the screen and it's hitting the performance hard.
Is there a way to draw the new sprite onto the one that's already there that doesn't affect performance? (I guess like dynamically generating a new sprite made up of the parts, but that isn't a set of stacked CCSprites
)
I'm using Cocos2d V2.3 - I did attempt to convert the project to Cocos2d V3, but found performance slightly worse, and it caused many scaling issues, which, given the project is close to completion, mean it's better to finish this in V2.3.
Many thanks in advance for any suggestions. PS: I found some similar questions but they dealt with how to stack sprites - this isn't a problem, I can do that, it's the drawing a new sprite that I'm struggling with.