Book Image

Cocos2d-x by Example: Beginner's Guide

By : Roger Engelbert
Book Image

Cocos2d-x by Example: Beginner's Guide

By: Roger Engelbert

Overview of this book

Table of Contents (19 chapters)
Cocos2d-x by Example Beginner's Guide Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

The game – Victorian Rush Hour


In this game (Victorian Rush Hour), you control a cyclist in Victorian London trying to avoid rush-hour traffic on his way home. For reasons no one can explain, he's riding his bike on top of the buildings. As the player, it is your job to ensure he makes it.

The controls are very simple: you tap the screen to make the cyclist jump and while he's in the air, if you tap the screen again, the cyclist will open his trusty umbrella, either slowing his descent or adding a boost to his jump.

This game is of a type commonly known as a dash game or endless runner, a genre that has become increasingly popular online and on various app stores. Usually in these types of games you, the developer, have two choices: either make the terrain the main obstacle and challenge in the game, or make what's added to the terrain the main challenge (enemies, pick-ups, obstacles, and so on). With this game, I decided on the first option.

So our challenge is to create a game where the terrain...