0
votes

I have just started using sprite sheets in Cocos2D in an attempted to better utilize the texture memory and the artist generating my assets has a script that he used for some previous games in Unity3D. The tool takes a number of images, removes the transparent and white space and stuffs them into atlases. It returns the "position" and "uvs" for each sprite in a text file. One thing the tool does that we can't seem to disable is that it transposes some of the sprites to fit them better.

I want to load the animations from a plist file in Cocos2D. Is there any way to transpose them back to normal while loading the frames into the Texture cache? If not how would I transpose the individual frames after I've loaded them into a CCAnimation?

If none of this works I'll just cut and paste all of the transposed sprites into more atlases and deal with using a little extra texture memory.

2

2 Answers

1
votes

I can only recommend to use one of the texture tools available for cocos2d. There's Zwoptex, and I personally would recommend TexturePacker. You'll get a lot more options out of it and don't have to worry about any of these issues.

1
votes

You can use Sprite Master. You can export your spritesheet in png,tiff format and also it supports Cocos2D spritesheet .plist format. You can export to Corona, LibGDX, Sparrow game engines and additionally it exports CSS for web developers.

With this solution, It doesn't matter what game engine you are using.