Book Image

Learning Cocos2d-x Game Development

By : Siddharth Shekar
Book Image

Learning Cocos2d-x Game Development

By: Siddharth Shekar

Overview of this book

Table of Contents (19 chapters)
Learning Cocos2d-x Game Development
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Summary


So, that concludes the chapter on adding images to the screen and looking at different movement controls. We covered four different ways to control the character in this chapter. We saw how to control the character using the update function by moving them from left to right, and we saw how to move with touch as well as the accelerometer. We also created our own custom controls using buttons. In the next chapter, we will take a look at creating our own custom classes for bullets and the enemy. We will create the AI behavior for the enemy and refine the shooting and movement control mechanisms for the player.

We can still play around with what we learned in this chapter. Let's try doing the following:

  • In the update function, make the character go up instead of going right all the time

  • Make the player follow our finger when we touch and drag her across the screen

  • Using the accelerator, make the character go left and right instead of going up and down

Having fun is part of learning. So, experiment...