Preface
[ 2 ]
Chapter 4, Fun with Sprites – Sky Defense, demonstrates the power of acons in Cocos2d-x, and
shows how an enre game could be built with them. It also introduces the concept of sprite
sheets and the steps required to build a universal app targeng dierent screen resoluons.
Chapter 5, On the Line – Rocket Through, adds two new elements to our game development
tool box: how to draw primives such as lines, curves, and circles; and how to use parcle
systems to improve the look of our game through the use of special eects.
Chapter 6, Quick and Easy Sprite – Victorian Rush Hour, shows how you can use Cocos2d-x
to quickly implement game ideas for further tesng and development by rapidly building
game prototypes with place-holder sprites. In the game example used for this chapter,
you'll also learn how to build a side-scrolling plaorm game.
Chapter 7, Adding the Looks – Victorian Rush Hour, connues with the project from
the previous chapter, adding the nal touches to the game, including a menu and a
playable tutorial.
Chapter 8, Geng Physical – Box2D, introduces the popular Box2D API for physics simulaons,
guiding you through the process of using Box2D in the development of a pool game. You learn
how to create bodies and manage the way they interact with each other.
Chapter 9, The Last Game – Eskimo, teaches you how to load external data for game levels,
how to store game-related data locally, and how to structure your games with mulple
scenes. We use a second Box2D game to illustrate these topics, plus a couple of new
concepts, such as using nocaons in your game.
Chapter 10, Code Once. Rere., guides you through the process of using Cocos2d-x to build
an Android project and a hybrid project, targeng both iOS and Android. It teaches how to
set up your development environment and the best pracces for mul-target development.
What you need for this book
In order to run the games developed in this book on Apple devices, you will need Xcode and
a Mac. Although the tutorials describe the development process using Xcode, in the last
chapter of the book, you will also learn how the code can be compiled for Android devices,
by using Eclipse.
Who this book is for
If you have a passion for games, then this book is for you. You may have used Cocos2d already
(the Objecve-C version of the framework) and are eager to learn its C++ ported version. Or you
know a lile bit of some other C-based language like Java, PHP, or Objecve-C, and you want to
learn how to develop 2D games in C++. Or you are a C++ developer already and want to know
what's all the hoopla with Cocos2d-x. If you t any of these scenarios, welcome aboard!