Cocos2d-x is an open source cross platform game engine designed to build applications for different platforms such as iOS, Android, Windows Phone, Blackberry and many others. Developers can use C++, JavaScript and Lua to build their applications. The engine has proved to work; at least 25% of the mobile games developed in the world are powered by Cocos2d-x. The main advantage of this engine is that a single source code can be ported to several platforms with little effort.
The goal of this book is to teach you how to build a game using Cocos2d-x. You will learn progressively how to use the different features provided by the engine to put them together in a single application. Using Cocos2d-x by itself is not enough to develop a game; so additional information about the ecosystem that surrounds it is included.
1 Introduction to Cocos2d-x
- What is Cocos2d-x
- What is new on Cocos2d-x version 3.0
- The Book Game - Tap a Plane
2 Getting Started with Cocos2d-x
- Installing Cocos2d-x
- Configuration for iOS and Mac OS X
- Configuration for Android on Mac OS X
- Configuration for Microsoft Windows 7
- Configuration for Android on Microsoft Windows 7
- Creating a new project
- Summary
3 Toolset and Support
- Graphics Tools
- Sprite Sheets and Physics
- Audio
- Layout
- Animation
- Utilities
- CocoStudio
- Summary
4 Sprites and Effects
- Working with Sprites
- Including Actions
- Using Animations
- Summary
5 Multiple Layers and Multiple Scenes
- Game Architecture in Cocos2d-x
- Working with Multiple Layers
- Working with Multiple Scenes
- Summary
6 Game Loop and Events
- Game Scheduler
- Touch Events
- Summary
7 Physics Engines and Cocos2d-x
- Introduction to Box2D
- Configuring Box2d on Cocos2d-x 3.0
- Merging Physics with Sprites
- Moving a Physic Body
- Collision Detection
- Summary
8 Game Layout
- Building the Game Layout
- Scrolling Across a Map
- Adding Parallax Effect
- Summary
9 Sound Effects and Music
- Introduction to SimpleAudioEngine
- Adding Sound Effects and Music
- Controlling Volume
- Summary
10 Saving Game Data
- Using Configuration Files
- Using SQLite3
- Summary
This book provides a game example to give a complete explanation about how Cocos2d-x works. The game is called Tap a Plane. This is side-scrolling game about a plane attempting to dodge a row of pikes throughout a cave.
All resources are provided here.