Preface
[ 2 ]
What this book covers
This book is designed to get you familiarized with Cocos2d for iPhone, allowing you to build
your own games. To that end, the book is organized in easy-to-follow examples. Through
the book, we'll be building three dierent types of games that exploit all the power that
Cocos2d has.
Chapter 1, Geng Started with Cocos2d, starts by taking a look at the sample projects that
are included in the source. Then you will learn how to install the templates to easily start
a new project and then you'll make your rst simple project. We'll also talk about some
Cocos2d basic concepts. Finally, we'll take a look at the debugging features of Cocos2d.
Chapter 2, Playing with Sprites, allows you to learn all there is to Sprites. By the end of the
chapter, you will be able to create and manage your own objects. We'll also start building
the rst of the three games that we'll make in the book. We'll take a look at how to begin
developing a simple puzzle game.
Chapter 3, Let's Do Some Acons, allows you to move, scale, nt, and apply a lot more eects
to objects over me. In this chapter, we'll connue enhancing the rst game to make it look
nicer.
Chapter 4, Pasng Labels, explains that every game needs to show some text at some point.
It could be an instrucon text, hints, scores, or a lot of other things. So, this chapter will take
a look at all the ways Cocos2d has to place texts on the screen and modify them.
Chapter 5, Surng Through Scenes, Layers, and Transions, discusses how Scenes and Layers
are where all the content of Cocos2d games is placed. Your game may consist of just one
Scene with one Layer, or as many as you want! This chapter will get into the details of how to
make the best use of them, switch between scenes with Transions, and also how to handle
accelerometer and touch input on the layers.
Chapter 6, Menu Design, highlights the importance of menus, which are a very important
part of any game. Cocos2d comes with several ways to create them. It even let's you animate
them like you would animate any other Sprite. This chapter will also talk about saving
preferences and loading them back.
Chapter 7, Implemenng Parcle Systems, explains the importance of using ashy eects.
This chapter explains how to implement the exisng parcle systems that are included in
Cocos2d and you will even create your own.
Chapter 8, Familiarizing Yourself with Tilemaps, provides informaon about Tilemaps,
which are used to create big levels while using small images to create the maps. You can
use Tilemaps to create games such as Shrumps, plaorm games, or RPGs quite easily. This
chapter will take a look at how to create these Tilemaps with Tiled and how to load and
manipulate them with Cocos2d.