Book Image

Cocos2d-x Cookbook

By : Akihiro Matsuura
Book Image

Cocos2d-x Cookbook

By: Akihiro Matsuura

Overview of this book

Table of Contents (18 chapters)
Cocos2d-x Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Using encrypted sprite sheets


It is pretty easy for a hacker to extract resource files from the application. This is a huge concern for copyright. Sprite sheets can be encrypted very easily using TexturePacker. In this recipe, you will learn how to encrypt your sprites to protect them from hackers and cheaters.

How to do it...

To encrypt sprite sheets using TexturePacker, you need to set it on the left pane of TexturePacker. Then, you need to follow the steps written here to successfully encrypt your sprite.

  1. Change the Texture format to zlib compr. PVR(.pvr.ccz, Ver.2)

  2. Click on the ContentProtection icon, and you will see the additional window in which to set the password.

  3. Type the encryption key in the text input area as shown in the following screenshot. You can type in your favorite key. However, it is difficult to type in 32 hex digits and thus, you can just click on the Create new key button. After clicking it, you will find that it automatically inputs the Encryption key.

  4. Take a note of...