Book Image

OUYA Game Development by Example

By : John Donovan
Book Image

OUYA Game Development by Example

By: John Donovan

Overview of this book

The OUYA console and development kit gives you the power to publish video games for the players, creating a console marketplace of the gamers, for the gamers, and by the gamers. Using the OUYA developer kit and the Unity3D game engine, even beginners with a captivating game idea can bring it to life with a hint of imagination. OUYA Game Development by Example uses a series of feature-based, step-by-step tutorials that teach beginners how to integrate essential elements into a game engine and then combine them to form a polished gaming experience.
Table of Contents (18 chapters)
OUYA Game Development by Example Beginner's Guide
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Using cursor data to add touch input to games


Gesture touch controls have become increasingly popular with the presence of mobile touchscreen devices, and even though there aren't any gestures built in to the OUYA SDK, the idea behind them is simple enough that we can code a solution ourselves.

Essentially, every touch gesture has a start point, an end point, and a speed at which the player's finger moves between them. In this section, we'll create variables for this data and create a function that fires a cannonball with a speed and angle based on a touch gesture.