user3687174
user3687174

Reputation: 11

What are the benefits of using texture atlas in Sprite Kit?

I'm new to ios game development field. I have been going through the following apple tutorial multiple times but not getting the points

https://developer.apple.com/library/ios/documentation/GraphicsAnimation/Conceptual/SpriteKit_PG/Sprites/Sprites.html

thanks

Upvotes: 0

Views: 736

Answers (2)

J. V.
J. V.

Reputation: 376

animation can be hundred of files. atlas puts them in one large file.

reading one file (large with lots of images) is much more efficient then reading hundreds of files (with one image each)

rendering of one large image and then showing only part of it is much more efficient then rendering each file separately.

Upvotes: 0

prototypical
prototypical

Reputation: 6751

Directly from the SKTextureAtlas class reference :

Texture atlases can improve memory usage and rendering performance. For example, if you have a scene with sprites drawn with different textures, Sprite Kit performs one drawing pass for each texture. However, if all of the textures were loaded from the same texture atlas, then Sprite Kit can render the sprites in a single drawing pass—and use less memory to do so. Whenever you have textures that are always used together, you should store them in an atlas.

SKTextureAtlas Class Reference

Upvotes: 2

Related Questions