Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Ouya Unity Game Development
Ouya Unity Game Development

Ouya Unity Game Development: Understanding Unity means you can quickly get the know-how to develop games for the Android-based Ouya console. This is the guide that will take you all the way from setting up the software to monetizing your games.

Arrow left icon
Profile Icon Gary Riches
Arrow right icon
$19.99 per month
Full star icon Full star icon Full star icon Full star icon Half star icon 4.6 (9 Ratings)
Paperback Oct 2013 118 pages 1st Edition
eBook
$9.99 $19.99
Paperback
$32.99
Subscription
Free Trial
Renews at $19.99p/m
Arrow left icon
Profile Icon Gary Riches
Arrow right icon
$19.99 per month
Full star icon Full star icon Full star icon Full star icon Half star icon 4.6 (9 Ratings)
Paperback Oct 2013 118 pages 1st Edition
eBook
$9.99 $19.99
Paperback
$32.99
Subscription
Free Trial
Renews at $19.99p/m
eBook
$9.99 $19.99
Paperback
$32.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
Table of content icon View table of contents Preview book icon Preview Book

Ouya Unity Game Development

Chapter 2. Setting Up Unity and the Ouya Plugin

In this chapter, you'll be guided through installing the Android SDK, Android NDK (Native Development Kit), Java, Java JDK (Java Development Kit), and ODK (Ouya Development Kit) and shown how to set up your Unity project so that you can build Ouya. Once this is complete we'll be ready to start our game, Sokoban. Sokoban is a classic crate-moving game where the player has to get all the crates in a warehouse on to their designated goal tiles. Sokoban in Japanese roughly translates to warehouse keeper.

Tip

These instructions have been written for Windows but the installation of the SDK, Java, NDK, and ODK will be similar. Where the process differs greatly we'll include some extra information.

Installing the Android SDK


It may not look like it, but Ouya runs Android so we'll need to install the Android SDK. This is going to allow us to compile from Unity and then add the game to the our Ouya or Android device. Go to http://developer.android.com/sdk/index.html in your browser and you'll see a large, blue button on the right that says Download the SDK followed by ADT Bundle for Windows.

Press the large, blue button and you'll be presented with a Terms and Conditions page and a radio button asking whether you want the 32-bit or 64-bit version. We're going to go with the 32-bit version for this book. Once downloaded, install it on your machine. For the purposes of this book, I'm going to install it to c:\adt-bundle-windows-x86-20130729.

Installing Java


Next you'll need to install Java for your computer. Go to http://www.java.com/en/download/ie_manual.jsp?locale=en in your browser and click on the red button that says Agree and Start Free Download. Download and install the file.

Tip

Be sure to uncheck the boxes where Oracle attempts to get you to install toolbars and other bloatware.

Setting up the Android SDK


Once Java is installed you'll be able to configure your Android SDK. Navigate to the folder where you have installed the Android SDK and you'll see an application called SDK Manager that has the Android mascot as its icon. Open the SDK Manager and you'll see something like this:

Ouya requires certain Android APIs to be installed that are not pre-installed by default. To install the others you'll need to check:

  • Tools

  • Android 4.1.2 (API 16)

  • Android 4.0 (API 14)

  • Extra/Android Support Library

Click on Install Packages and you will be presented with a license window. Click on Accept Licenses. Now is a good time to get yourself a drink as the install can take quite a while.

Note

Google has changed the path of where some of their tools are installed to. So Ouya finds what it expects we need to copy & paste aapt.exe from (your root Android SDK install folder)/build-tools/17.0.0 to (your root Android SDK install folder)/platform-tools. We copy and paste as the Android...

Setting up the Android NDK


No, that's not a typo! Once we have set up the Android SDK we need to install the Android NDK (Native Development Kit). The NDK is a toolset that allows you to implement parts of your app using native-code languages such as C and C++. The ODK will interface with the NDK and will give you optimum performance in your game.

Perform the following steps to set up the Android NDK:

  1. Go to http://developer.android.com/tools/sdk/ndk/index.html in your browser.

  2. Select the correct download for your computer, we're going to go with the 32-bit Windows version for this book, and agree to the licensing terms and conditions.

  3. Once the file is downloaded, unzip it to the same root folder where you installed the Android SDK.

Connecting Ouya to your Windows computer


The process here is different for Windows 7, Windows 8, and OS X. Let's cover Windows first.

Note

Windows 8 users will need to disable driver signature verification to install the unsigned Android driver. This involves restarting your PC, so do this before you start. See https://devs.ouya.tv/developers/docs/windows8.md for step-by-step instructions.

Before we get up and running, we need to make sure that Ouya will be recognized by Windows so that we will be able to build to it. The first step of this is to add some paths to your PATH environment variable. This will enable us to run the executables in the Android SDK folder from directory via the command line.

  1. Open My Computer.

  2. From the left-hand panel, right-click on My Computer and click on Properties.

  3. From the left-hand panel, click on Advanced system settings.

  4. Click on the Environment Variables… button.

  5. If the PATH variable already exists in the User variables table select it and click on the Edit… button...

Connecting Ouya to your Mac computer


While the process for installing the required software is similar, the process for getting Ouya recognized by the OS is different.

Note

You will need to change the paths here to match to your installation process.

We're going to have to add some paths to PATH. Assuming that you have put the SDK folder in the location ~/Development/adt-bundle-mac-x86_64, open up a Terminal window (this is in your Applications/Utilites folder by default). Enter the following command:

open ~/.bash_profile

This will open the .bash_profile file in TextEdit (the default text editor included on your Mac). This file allows you to customize the environment your user runs in. Add the following three lines:

export PATH=$PATH:~/Development/adt-bundle-mac-x86_64/sdk/tools
export PATH=$PATH:~/Development/adt-bundle-mac-x86_64/sdk/platform-tools
export ANDROID_HOME=~/Development/adt-bundle-mac-x86_64/sdk

Save the file and quit TextEdit. Now we've made the changes that are needed to execute...

Ouya Development Kit


We're almost ready to get in to Unity but we still have to install the ODK first. Go to https://devs.ouya.tv/developers/odk in your browser. Press the red button that says Download ODK. Once the file is downloaded, unzip it to the same root folder where you installed the Android SDK.

Go to https://github.com/ouya/ouya-unity-plugin in your browser. The Ouya Unity files are stored in GitHub . If you're comfortable using GitHub you should clone the repository, if you're not comfortable with it then you should use the Download ZIP button on the right-hand side of the page.

Once the file is downloaded, unzip it to the same root folder where you installed the Android SDK.

Tip

Understanding how to use GitHub is a useful skill that will help you in many projects, not just this one. Have a read of the GitHub Help page located at https://help.github.com/

The Unity project


Instead of giving us developers a unitypackage file to download, the Ouya team give us a Unity project and we need to build it ourselves. The benefit of this is that the Ouya team can update the files on GitHub and, if we have cloned the repository, we'll be able to pull an update easily and rebuild the packages. The following steps will guide you through creating the Ouya unitypackage file that, after importing, will enable us to configure the Ouya project settings and allow us to deploy to Ouya itself:

  1. Open Unity and navigate to File | Open Project | Open Other. You'll need to navigate to where you unzipped the Ouya Unity files and press Select Folder. Depending on how up-to-date the files are you may get a message from Unity about upgrading the project, if it asks for an upgrade, then let it proceed.

  2. To generate the unitypackage file, we will need to configure the Ouya project settings which on importing will allow us to deploy to Ouya itself. Click on OUYA | Export Core...

Summary


If you've made it this far then well done! The process of setting up Unity for Ouya development is not a simple one and there are many steps which can fail. Now the required software is installed, setting up Ouya Panel again is a lot less painful. In the next chapter, we'll be getting to the fun stuff. Let's go!

Left arrow icon Right arrow icon

Key benefits

  • Learn how to create and polish your game, and then monetize it with in-app purchases
  • Discover what's required to make your game run on Android phones and tablets
  • A step-by-step guide that will teach you how to build a fun, challenging game from scratch

Description

Ouya is a microconsole running its own version of the Android operating system. The console features an exclusive Ouya store for applications and games designed specifically for the Ouya platform. It runs a modified version of Android 4.1 Jellybean, and is open to rooting without voiding the warranty. All systems can be used as development kits which allow any Ouya owner to be a developer without any licensing fee. Ouya Unity Game Development offers detailed, easy-to-follow, step-by-step instructions which will help you learn the ins and outs of Ouya development in Unity.From connecting your device with Android Debug Bridge to publishing it on the Ouya Developer Portal, this book will explain the processes involved in creating a game from scratch. As you progress through the book, you will learn about scenes, prefabs, sounds, models, and animations. By the end of the seventh chapter, you will have a 3D game with multiple levels, the possibility of in-app purchases, and controller support that runs on both the Ouya and an Android phone. Starting with an introduction to Ouya, you will learn how to set up an environment and render game levels on Ouya. You will learn how to change levels and how to save the current level. You will then dive into Ouya controller integration and character animation. This book will also teach you the workings of audio source components, and will show you how to add textures to prefabs. Finally, you will learn how you can monetize the game. By the end of this book, you will have the game running on Ouya and geared up to create games on your own.

Who is this book for?

This book is for game developers who are interested in developing games for the Ouya console on the Unity game engine. It is assumed that you have a basic understanding of Unity.

What you will learn

  • Download and set up the software to get started with Ouya and explore its features
  • Render levels based on array data, create your character, and move it with the Ouya controller
  • Play sounds, add effects, and improve the virtual experience of the game
  • Implement in-app purchases in the game in order to monetize the game in a more effective manner
  • Port your game to Android phones and tablets

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Oct 23, 2013
Length: 118 pages
Edition : 1st
Language : English
ISBN-13 : 9781783559701
Languages :
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

Publication date : Oct 23, 2013
Length: 118 pages
Edition : 1st
Language : English
ISBN-13 : 9781783559701
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 130.97
Ouya Unity Game Development
$32.99
Unity Android Game Development by Example Beginner's Guide
$48.99
Unity Multiplayer Games
$48.99
Total $ 130.97 Stars icon
Banner background image

Table of Contents

7 Chapters
What Is Ouya and Why Does It Matter? Chevron down icon Chevron up icon
Setting Up Unity and the Ouya Plugin Chevron down icon Chevron up icon
Setting Up Your Game Chevron down icon Chevron up icon
Adding a Character and Making Them Move Chevron down icon Chevron up icon
Adding Finesse to Your Game Chevron down icon Chevron up icon
Show Me the Money! Chevron down icon Chevron up icon
Building Cross-platform Games Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.6
(9 Ratings)
5 star 66.7%
4 star 22.2%
3 star 11.1%
2 star 0%
1 star 0%
Filter icon Filter
Top Reviews

Filter reviews by




L. R. Nov 29, 2013
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book is intended first for everyone interested in a quick start guide to develop 3D games using Unity, Android and Ouya (Android-based game console). Also for those that want to develop their own video game to be used on a game console. More than home-brew, this book shows you how to develop a true 3D video game that aims to being used in the Ouya game console and therefore being published in the Ouya market place.The book starts with a chapter that contains a brief introduction to video games history, the first days, problems and current days evolution of the video games including the explosion of apps and video games for mobile phones. Including the history of Ouya, that has been created through a successful kick-starter campaign that has made of Ouya an emergent actor in the video game consoles for gamers and for indie developers.The following chapter describes how to install and configure the entire development environment required to develop: Android SDK, Java SDK, Android NDK, Ouya DK and Unity.The book then introduces you to Unity: how to program using Boo, C# or Unity Script, explaining the pros and contras for each one of them. It then describes how to setup the scenes, create scripts with MonoDevelop, define the sequence of the scenes and creating and managing game levels. Therefore the book provides examples that shows you how to use, place, texture and display prefabs within the scenes, how to use the camera, how to create, animate and make a character to move responding to the PC keyboard, Ouya game controls and touchscreens. It also provides examples about how to treat the physics in game like collisions, pushing game objects and other player movements, how to manage the level goals and the navigation between levels.Finally it explores the option to make your game available at the Ouya market place. It describes how to modify your game to provide first a trial that can be upgraded to a full game and also how to make in-app purchases. It also explains how you can port your game using the existing Unity project to Android in a very few and clear steps.Personally I find this book very useful and I get really surprised how fast I can start to use Unity, create a first game and port it to Android only making a few changes. This book has provided me several hints about planned portability that I will employ in my future developments.This book shows you how to game develop using Unity for Ouya nevertheless I've selected this book mainly because I'm interested on Unity development for Android. This book has provided me with a complete step-by-step guide. I recommend this book to everyone that is interested in a fast learning guide to learn how to develop 3D games using Unity with Ouya and Android.
Amazon Verified review Amazon
Tim Dec 10, 2013
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I found the content of this book both fun and enlightening. The author, Gary Riches, does a remarkable job of presenting the topics discussed in a very approachable format, using language that is simple enough for a beginner without making the book unapproachable by an experienced programmer.Overall, the book has very few down points. Personally, I did not like the presentation of the first chapter which gives a very brief look at the history of the video game industry. This seems to be a running trend in game development books and quite frankly I feel it detracts from the book ever so slightly. For anyone that is not interested in the brief lesson in history or those that are already familiar with the history of the video game industry, I would recommend simply skipping the first chapter and moving on to the truly useful content that starts with Chapter 2.From Chapter 2 forward the book really shows its true colors as a useful reference book for both beginners that need to learn the basics of Unity and for more experienced Unity developers that are interested in porting projects to the Ouya console.Experienced users will find the book’s project simple enough that they can have the full project completed and running on an Ouya in a very short amount of time. For complete beginners, the project contains enough material that you should be very comfortable with the Unity editor and its basic capabilities when the project is complete.In regards to the code that is written throughout the book, the author chose the C# programming language; I can’t say enough that this is an amazing choice and I wish that C# would become the standard language for books on developing in Unity. In fact, the author even addresses why C# is a superior choice for developing Unity projects in Chapter 3 as he discusses the basic properties of the three languages you can use with Unity: Boo, UnityScript, and C#.Although the book is short in length, it is by no means lacking in technical details. The author has a nice approach on everything from setting up the software to creating the mechanics for the game, which will leave you very comfortable with the material that was presented. I particularly enjoyed how the author addressed common problems that can arise throughout everything in the book. These quick bits of insight regarding troubleshooting are something that I feel should be included in every book that aims to introduce concepts across multiple portions of an integrated development kit like Unity. Everything from Ouya specific settings to common missteps in creating interactive objects within the game includes these little snippets that point you to the most common problems that can arise so you don’t have to go back through every step along the way to find the problem.All in all, if you are an experienced Unity developer, this book will give you insights you may need for developing for the Ouya console. If you are a beginner, this book will open you up to the possibilities of developing for multiple platforms with Unity in a very short period of time.
Amazon Verified review Amazon
Nicolas Garcia Jan 29, 2016
Full star icon Full star icon Full star icon Full star icon Full star icon 5
No es un libro sobre Unity 3D al uso y es más bien corto pero puede venir muy bien si ya tienes unos conocimientos mínimos de Unity y quieres añadirle ese extra para manejar el controlador de la Ouya, aceptar micropagos y mucho más. Yo lo compré en combinación con otro de Unity y me ha venido muy bien para empezar a probar mis proyectos en el pequeño cubo.
Amazon Verified review Amazon
Corey Blackburn Dec 20, 2013
Full star icon Full star icon Full star icon Full star icon Full star icon 5
You are probably here because you've heard of this new piece of technology called the Ouya, and you want to develop games for it. Unfortunately as is always the case with new technology there isn't much information available out yet. Well this book is for you so if you're looking to deploy your game on Ouya I recommend you check it out.The author starts out with a brief history of how video games came to be. Personally, I think this is best left to it's own book, as there is more information to cover than this book has spare pages for. At the end of this chapter it goes over the history of Ouya and it's release.Next the author goes into a comprehensive set up for getting unity ready to deploy to the Ouya. The author is very through and the guide is easy to follow.Even though the book assumes that you have a basic understanding of Unity this next chapter gives a great overview of Unity. Starting with explaining the three different scripting languages available(Boo, C# and UnityScript) and why the author chooses C#. Then he goes over the project structure, setting up your scenes, scripts with MonoDevelop and ends with creating our first level.Now that the groundwork is laid out the next two chapters we focus on making our game. The author walks us through moving the camera and the player, adding controller support, loading in the player model and adding animation. The code is explained as we go and is even commented. Now that we got a rough playable game, we go over polishing it up. We are taught how to add texture to our prefabs, make a skysphere, how to add more levels and check for level completion and add sounds to our game.In case you were wanting to make some money from inside our game the author now walks us through setting up In-app purchases. This chapter is ended by explaining how to submit our game. Yay, we've done it!As if that wasn't enough the author now guides us through one of Unity's most powerful features, cross-platform development. The author explains platform dependent compilation and then guides us through the changes we need to make so that our game runs on both Ouya and other Android devices.The source code is nicely commented, easy to read and understand. The project runs smoothly right off the bat without having to fix any errors.Overall this was an excellent book. It was complete and topics were explained very well and even cover common fail points. We set up Unity to deploy to Ouya, made a game and polished it, we added in-app purchases, and then we learned how to make our game run cross-platform on other android devices. If you're looking to deploy your game on Ouya or want a comprehensive introduction to development with Unity I would recommend this book.
Amazon Verified review Amazon
RUBEN D. HOYOS U. Dec 07, 2013
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Excellent book, have good content, the technical part is very complete. The source code is very useful. The basic project worked perfect, was able to publish in the console. CONGRATULATIONS!
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.