Game Development Reference
In-Depth Information
Using sprite sheets in Cocos2d-x
A sprite sheet is a way to group multiple images together in one image file. In order to tex-
ture a sprite with one of these images, you must have the information of where in the sprite
sheet that particular image is found (its rectangle).
Sprite sheets are often organized in two files: the image one and a data file that describes
where in the image you can find the individual textures.
I used TexturePacker to create these files for the game. You can find them inside the
ipad , ipadhd , and iphone folders inside Resources . There is a
sprite_sheet.png file for the image and a sprite_sheet.plist file that de-
scribes the individual frames inside the image.
This is what the sprite_sheet.png file looks like:
Search WWH ::




Custom Search