Chapter 6. Sprites In-Depth

In this chapter I'll focus on working with sprites. There are numerous ways to create sprites from single 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, most cocos2d developers rely on the Zwoptex tool, which I'll also introduce in this chapter.

Sprite batching is a technique for speeding up the drawing of sprites. It speeds up drawing identical ...

Get Learn iPhone and iPad cocos2d Game Development now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.