O'Reilly logo

Cocos2d Cross-Platform Game Development Cookbook - Second Edition by Siddharth Shekar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 1. Sprites and Animations

The topics covered in this chapter are as follows:

  • Downloading and installing Cocos2d
  • The 2D coordinate system
  • Getting access to MainScene
  • Adding sprites to scenes
  • Creating a sprite using RenderTexture
  • Creating a custom sprite class
  • Animating sprites
  • Adding actions to sprites
  • Drawing glPrimitives
  • Adding the parallax effect

Introduction

In the first chapter, we will cover some basics of the Cocos2d framework so that everyone is up to speed on the concepts. We will go through the process of downloading and installing SpriteBuilder/Cocos2d. Then we will cover the 2D coordinate system that Cocos2d uses.

After going through the basics, we will cover the basic properties of sprites and how they can be added to a scene. We will take ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required