Learning Cocos2d-x Game Development

Book Description

Learn cross-platform game development with Cocos2d-x

In Detail

Cocos2d-x is one of the most popular cross-platform 2D game engines. It is packed with powerful features that set it apart from other game engines. With so many languages and operating systems, Cocos2d-x provides a one-stop solution for developing games for the operating system of your choice using the language you are most comfortable with. Starting from the basics, this book will show you how to display content on the screen and make it interact as well as move around with various control mechanisms such as actions, accelerometer, and tap onscreen buttons. You will learn about the mechanics of collision detection, their advantages and disadvantages, and how to keep track of the score. You will then create a gameplay cycle, use third-party tools to expedite the development process, and distribute the game through the App Store.

By working through the carefully designed chapters of the book, you will master Cocos2d-x and the various tools so that you can use these skills to make a complete game or a quick prototype.

What You Will Learn

Configure and create a Cocos2d-x project on Windows

Understand the basics of Cocos2d-x classes such as CCScene, CCLayer, and CCSprite

Develop different control schemes using buttons, a gyroscope, and a custom touch area

Implement various methods for collision detection such as circle collision and bounding box collision

Discover how to add and remove objects from the screen and update the score as well as Gameover condition

Get to grips with the tools used to create spritesheets as well as custom fonts and design particles

Integrate ads and in-app purchases in the game to monetize the game

Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.