Reputation: 1233
I need some recommendations how to work better with the same sprites using Cocos2d.
How to improve application performance and memory usage having more than 10 exactly the same sprites on the screen.
The only improvement i've found is not to load them again to memory , but use something like this CCSprite *newSprite = [CCSprite spriteWithTexture:[oldSprite texture]];
Upvotes: 0
Views: 855
Reputation: 2300
I recommend you use CCBatchnode, you can load just 1 image into texture memory and reuse it.
http://www.raywenderlich.com/1271/how-to-use-animations-and-sprite-sheets-in-cocos2d
Ray has a great tutorial here explaining spritesheets.
Upvotes: 2