Book Image

Cocos2d Game Development Blueprints

By : Jorge Jordán
Book Image

Cocos2d Game Development Blueprints

By: Jorge Jordán

Overview of this book

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

Summary


In this chapter, you learned how to develop a classic beat 'em up game that will only run on iPad devices.

To control the movements of the main character, I have shown you how to create a virtual game pad as a subclass of CCNode to take advantage of its update method. In this class, you also declared a protocol to be implemented by some delegate to define its behavior.

You learned how to reduce the number of sprite drawings with the use of batch nodes and how to create, edit, and load these batch nodes into Cocos2d texture atlases to minimize the memory used to manage images.

Once you knew how to work with a large number of images, you used some of them to animate sprites and virtualize movement.

As our main character will move along the stage, I showed you how to develop a method to move the camera to always keep the zombie in view.

You learned how to add artificial intelligence to the enemies and draw a life bar so you know how much life the main character has.

Using knowledge from previous...