Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
iOS Game Programming Cookbook

You're reading from   iOS Game Programming Cookbook Over 45 interesting game recipes that will help you create your next enthralling game

Arrow left icon
Product type Paperback
Published in Mar 2015
Publisher
ISBN-13 9781784398255
Length 300 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Toc

Table of Contents (14) Chapters Close

Preface 1. iOS Game Development FREE CHAPTER 2. SpriteKit 3. Animations and Texture 4. Particle System and Game Performance 5. Adding Music to iOS Games and an Introduction to iCloud 6. Physics Simulation 7. Adding Reality to Games 8. Introduction to Game Math and Physics 9. Autonomous Moving Agents 10. 3D Game Programming with OpenGL 11. Getting Started with Multiplayer Games 12. Implementing Multiplayer Games Index

Creating a texture atlas

The texture atlas is a way of combining all the app assets (that is, images) into one or more larger images to improve the performance of the app so that the app can draw multiple images in a single draw call of the scene that is rendered. For example, if we have more than one image file to be loaded in the sprite, SpriteKit will perform one drawing call for each sprite. However, if we combine all the required images in one image file, then SpriteKit can render all the sprites in one draw call that uses very less memory to do so. It is recommended to create an atlas of all the required images for any game project.

Xcode has the capability of building texture atlases for your collection of images to make it a larger image, thereby improving the performance. While creating texture atlases, there should be a balance of too many or very few textures, so that the memory load doesn't increase.

Getting ready

To create a texture atlas, we should be aware of what sprites...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image