Chapter 6
Sprites In-Depth
In this chapter, I’ll focus on working with sprites. There are numerous ways to create sprites from individual image files and texture atlases. I will also explain how to create and play sprite animations.
A texture atlas is a regular texture that contains more than one image. Often it is used to store all animation frames of a single character in one texture, but it is not limited to that. In fact, you can place any image into a texture atlas. The goal is to get as many images as possible into each texture atlas. To help create a texture atlas, a great tool to rely on is TexturePacker, which I’ll also introduce in this chapter.
Sprite batching is a technique for speeding up the drawing of sprites. As the name implies, ...
Get Learn cocos2D Game Development with iOS 5 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.