November 2011
Beginner
532 pages
15h
English
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, ...