O'Reilly logo

Learn cocos2d 2: Game Development for iOS by Andreas Löw, Steffen Itterheim

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter    6

Sprites In-Depth

In this chapter, I focus on working with sprites. You can create sprites in numerous ways from individual image files and texture atlases. I also explain how to create and play sprite animations.

A texture atlas is a regular texture that contains more than one image. Often it’s used to store all animation frames of a single character in one texture, but it’s 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, you have a great tool to rely on called TexturePacker, also introduced in this chapter.

Sprite batching is a technique for speeding up the drawing of sprites. As the name implies, batching ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required