Game Development Reference
In-Depth Information
Before you can save the texture atlas, you need to make adjustments to the Tex-
turePacker Output settings depicted in Figure 6-7 .
Figure 6-7 . TexturePacker Output settings
First make sure that the data format is set to cocos2d because TexturePacker can be
used with other game engines as well.
For the data file, specify a file located in the project's Resources folder. Make sure
the file has the -hd suffix. In the Sprites02 project, the file is named game-art-
hd.plist . TexturePacker will save the HD texture to the given filename but will
omit the -hd suffix for the SD version, which is exactly how cocos2d wants the data.
To have TexturePacker automatically create the SD version of the texture atlas, you
also need to check the AutoSD check box at the bottom.
Finally, choose Texture Format and Image Format for the exported texture atlas. The
recommended Texture Format setting is Compressed PVR ( .pvr.ccz ), which is a
compressed version of the iPhone's native PVR format. This format typically loads a
lot faster than PNG, and if you have images with a 16-bit color depth, the compressed
PVR format will create smaller files than PNG. The PNG file format will always store
32-bit color values, regardless of the actual color bit depth of the image.
Search Nedrilad ::

Custom Search