Book Image

Mastering Cocos2d Game Development

By : Alex Ogorek
Book Image

Mastering Cocos2d Game Development

By: Alex Ogorek

Overview of this book

Table of Contents (15 chapters)
Mastering Cocos2d Game Development
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Begin using sprite sheets with TexturePacker


Sprite sheets are used to improve the performance of your game, not only reducing the time it takes for the game to load but also improving the performance while the game is running.

Tip

Unfortunately, TexturePacker works with Cocos2d at the time of writing this book, but its use is not supported by SpriteBuilder directly. However, TexturePacker is a great solution when it comes to building sprite sheets effectively. If you wish to use TexturePacker but are currently using the directory method (the default for SpriteBuilder at the time of writing this book), go back and change your style to file extensions.

As mentioned in Chapter 1, Refreshing Our Cocos2d Knowledge, we will be using TexturePacker as the go-to for our sprite sheet creator. TexturePacker is nice for a few reasons:

  • It allows exporting to Cocos2d with one click

  • It has auto-scaling (up or down) that supports all resolution types

  • It makes updating your images later easier to import the images...