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 – creating a cannon prefab


Perform the following steps to create a cannon prefab:

  1. Create a new Unity project titled TouchCannon.

    You're probably used to setting up scenes at this point, so we'll start by quickly establishing the base elements we need.

  2. Import your OUYA Core package into the Unity scene.

  3. Set the project to Android from a standalone, and make sure your player settings match the settings we went over in Chapter 2, Installing Unity and the OUYA ODK. We need to actually deploy to the OUYA to test this prototype because it relies on the OUYA controller's touchpad.

  4. Create a new plane positioned at 0, 0, 0 and increase its X scale to 10 because we want the cannon and target to be on opposite ends of a horizontal platform.

  5. Create a directional light with default settings—you may recall that positions of directional lights is irrelevant, so you can put it wherever you like.

  6. Finally, position the main camera at 0, 10, -25 so that the entire platform is in view from above.

    After...