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, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access