Cocos2d Cross-Platform Game Development Cookbook(Second Edition)
上QQ阅读APP看书,第一时间看更新

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 a look at how to add an image to a sprite object. We will discuss how to create a sprite that is used as placeholder asset to test basic game mechanics and collision in the prototyping stage of any game. We will then consider how to create basic shapes using glPrimitives. After this, we will move on to discussing how to move, rotate, scale, and combine actions on the sprite object using actions. Next, we will look at how to animate a character using sprite frames. Finally, we will add parallax scrolling to the scene to add more dynamism to it.