0

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.

CuddleBunny
  • 1,941
  • 2
  • 23
  • 45

2 Answers2

1

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.

CodeSmile
  • 64,284
  • 20
  • 132
  • 217
  • I did finally find a version of Zwoptex that works on my 32-bit Mac. – CuddleBunny Feb 13 '12 at 22:30
  • Hi, can we use online tools ? but they generates .css instead of .plist ? how to deal with .css ? or de we need to create manually .plist file ? – Maulik Jul 26 '13 at 08:04
1

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.

bateristt
  • 176
  • 15
  • This looks nice, but I was looking for a free solution since I don't have any money at the moment. I will certainly keep it in mind in the future, especially once I start getting into html5 stuff. – CuddleBunny Feb 13 '12 at 22:31