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

Time for action – importing a Unity input script


The Unity API has values that we can read in a script to tell whether the buttons on a controller are being pressed down. If you were to just use the core OUYA package for Unity, you would have to program your own input manager to act based on those values, but for the purposes of getting the game up and running quickly, you can import an existing script into your game from the OUYA community.

There are several viable input systems that we could find on the Internet, but in this tutorial, we'll use the OuyaInput controller framework by Matthias Titze. Navigate to the GitHub page for the open source project at https://github.com/rendermat/OuyaInputFramework and click on the Download ZIP button to download the files you'll need. When the zipped folder downloads, unzip it and open it to view the contents.

Now that you've acquired all of the necessary files for integrating input into your game, you can put the files into your Unity project by performing...