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

Managing resource files


Cocos2d-x has an extension that manages resources. It is called AssetsManagerExtension. This extension is designed for a hot update of resources such as images and audio files. You can update a new version of resources on your games by using this extension without updating your applications.

Getting ready

Before using AssetsManagerExtension, you should learn about it. This extension has many useful features to help you make the hot update. Some of these features are as follows:

  • Multithread downloading support

  • Two-level progression support—File-level and byte-level progression

  • Compressed ZIP file support

  • Resuming download

  • Detailed progression information and error information

  • Possibility to retry failed assets

You have to prepare a web server, and hence, your application will download resources.

How to do it...

You need to upload resources and manifest files. In this case, we will update HelloWorld.png and a .zip file called test.zip. This .zip file includes some new images....