Chapter 1. A Colorful Start

We start the journey of game development in Cocos2d-x with a simple, fun, and colorful game. Let's call it ColourSmash. This will serve as a revision of the basic features of the engine and will get us started with some fun development. We will be using the HTML5 version of Cocos2d for this project—Cocos2d-html5-v2.2.3 to be specific. So all the coding in this chapter, and the next, will be done in JavaScript.

Here's what you'll learn in this chapter:

  • How and where to use cc.Scene and cc.Layer
  • How to optimize rendering with a batch node
  • How to use actions and easing
  • How to get touches
  • How to schedule callbacks

An overview of ColourSmash

The game we will discuss here is one of the many famous puzzle games found online. The basic idea of the game is simple: click on a colored tile and all adjacent tiles of the same color disappear. As you may have guessed, the game world consists of a set of colorful tiles. You keep clicking tiles and they disappear. What makes it fun is a bunch of tiles disappearing together yields you a bonus!

This is a glimpse of what we should have at the end of this chapter:

An overview of ColourSmash
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.129.72.176