Book Image

Mastering Cocos2d Game Development

By : Alex Ogorek
Book Image

Mastering Cocos2d Game Development

By: Alex Ogorek

Overview of this book

Table of Contents (15 chapters)
Mastering Cocos2d Game Development
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Touchscreen controls versus D-pad adaptation (and why it matters so much to know this distinction)


Because we're coding for iOS, it's important to note the uniqueness of the device we're creating games for, that is, the touchscreen itself versus a plastic controller with joysticks and triggers that the user has in their hands. When creating games for iOS (or any smartphone device with a touchscreen), you must create the controls such that they feel natural and fluid on the device, as if the game never existed on another console.

Granted, it's understandable that some games are better suited for D-pad-style movement. However, there's always the accelerometer, swipe controls, or the way that Infinity Blade does it (using small buttons on the screen to block or dodge, and also using swipes across the center of the screen to attack with your sword).

Unfortunately, there's no "how to program" section for the best controls, as it's all based on your individual game. For example, in this book's game...