views:

241

answers:

1

I'm working on an iPhone game using Cocos2d where the main character is approximately 194x114.

the animation consists of 100+ frames making my spritesheets larger than the 1024x1024 limit. The obvious solution would be to separate the animation to several files and swapping spritesheets when necessary. while doable (i guess) i'm not quite sure how to go about implementing this solution, is there a better solution? what is your experience with large animation with Cocos2d?

+1  A: 

Yes, your best bet (and only option, really) is to break up separate animations into separate files. One strategy is to create a helper class that knows which animations live in which source files and swap between them, so your main code can worry about picking the animation and not messing with specific source file names.

I suspect you may be getting confused by CCSprites being added as a child of a CCSpriteSheet. When swapping between sheets to change animations, just remove the sprite from one CCSpriteSheet and add it to the CCSpriteSheet containing the new animation.

jtalarico
thanks! your answer helped, i've managed to get it to work, problem is i have some crazy flickering frames when switching from spritesheet to spritesheet. any idea on what to do with it? thanks!
Hezi Cohen