Book Image

Learning Cocos2d-JS Game Development

By : Emanuele Feronato
Book Image

Learning Cocos2d-JS Game Development

By: Emanuele Feronato

Overview of this book

Table of Contents (18 chapters)
Learning Cocos2d-JS Game Development
Credits
Foreword
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface
9
Creating Your Own Blockbuster Game – A Complete Match 3 Game
Index

Overview of virtual pads


The oldest, simplest, and highly discouraged way to create virtual pads is placing directional buttons on the screen and controlling the character according to the button pressed by the player.

I also used this kind of virtual pad in the first version of my Sokoban game before I made the game playable with swipes, as I showed you during the creation of Cocosban game.

The Sokoban game

In this game, you move the character by clicking or tapping exactly on an arrow button. It can fit in a slow-paced puzzle game, but becomes unplayable in a fast-paced arcade.

That's why famous platform games such as Mikey Shorts use ghost buttons. Ghost buttons act like normal buttons, but the sensible area is way bigger than the icon itself.

Although the buttons aren't bigger than the ones used in my Sokoban game, the sensible area covers the entire screen: the actual red button sensible area is the whole column of the screen covering the red button icon, the blue button sensible area is...