Book Image

Cocos2d-X Game Development Blueprints

By : Karan Sequeira
Book Image

Cocos2d-X Game Development Blueprints

By: Karan Sequeira

Overview of this book

Table of Contents (17 chapters)
Cocos2d-x Game Development Blueprints
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

What is a tile-based game?


Let's answer this question by breaking it down to the bare minimum: the tile. A tile can be considered as a tiny piece of a big jigsaw puzzle. A tile is usually rectangular for orthogonal maps and diamond or hexagonal shaped for isometric maps. A tile contains graphical data and sometimes even level-specific data. A bunch of such tiles arranged together comprise a map. A map can be anything from a small section of a level or may be even an entire level itself, as we will see in this game. Thus, a tile-based game will use this logic of arranging tiles in various layouts to create a level.

One of the most obvious benefits of deciding to go with tile-based logic for a game is saving on images for the graphics of the levels. Since a level will contain multitudes of tiny tiles, all we will ever have to do is design a few tiles and reuse them throughout a given map or level. This has a huge performance gain, since these tiles can be batched together while rendering.

However...