• Tidak ada hasil yang ditemukan

Getting Started with OUYA Ebook free dowwnload

N/A
N/A
Protected

Academic year: 2019

Membagikan "Getting Started with OUYA Ebook free dowwnload"

Copied!
116
0
0

Teks penuh

(1)
(2)

Getting Started with OUYA

A practical guide to developing games for the

revolutionary OUYA console

Ruben Hoyos

Robinson Moncada

(3)

Copyright © 2014 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

First published: May 2014

Production Reference: 2290514

Published by Packt Publishing Ltd. Livery Place

35 Livery Street

Birmingham B3 2PB, UK.

ISBN 978-1-78355-145-3

www.packtpub.com

(4)
(5)

About the Authors

Ruben Hoyos

is a systems engineer specializing in mobile development, with over 10 years of experience in IT projects, along with skills in project management and software development. He is also interested in video game development, augmented reality, and mobile technologies. He has experience in software development using technologies such as Microsoft .NET, Delphi, SQL Server, MySQL, and PHP. He is also interested in video game development using Unity3D and Vuforia. He is a certified Project Management Professional (PMP) from the PMI Institute. He is also certified in Microsoft Project.

He has participated as a speaker in several events, such as Barcamp 2011, OUYA CREATE 2013, Barcamp 2013, Creative Transmedia 2013, and ViveLabs Ruta N (Medellin, CO).

I would like to thank my wife Beatriz, my son John Paul, and all my family members for supporting me during this process. Also, I would like to thank the entire team at Packt Publishing; without them, this project would not be a reality.

Robinson Moncada

is a multimedia development technologist with over five years of experience in game development for PC and mobile. He has worked on a range of projects in modeling/3D animation, augmented reality, audio and video editing for video games and applications, and multimedia in biotechnology and military applications. He has experience in 3D modeling and animation programs, such as Maya, 3DMax, and Blender. He is also interested in video game development with Unity3D, Unreal UDK, and Vuforia (augmented reality).

He has participated as a speaker in several events, such as Global Game JAM 2010, Expo Shangai 2010, Barcamp 2011, fLiSOL 2011, OUYA CREATE 2013, Barcamp 2013, Creative Transmedia 2013, and ViveLabs Ruta N (Medellin, CO).

(6)

About the Reviewers

Matthew Traylor

has been writing about software and games since the days of the TRS-80 and magazine program listings. He is a former technical writer for the first Linux certification program and a combat veteran. Recently, he founded the Sarissa Game Studio, a game development company that focuses on the implementation of conflict simulation and design using functional programming.

Thanks to Steph, Dan, Hamburguesa, and all the fine folks at Packt Publishing.

(7)

www.PacktPub.com

Support files, eBooks, discount offers and more

You might want to visit www.PacktPub.com for support files and downloads related to your book.

Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at service@packtpub.com for more details.

At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.

TM

http://PacktLib.PacktPub.com

Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can access, read and search across Packt's entire library of books.

Why Subscribe?

• Fully searchable across every book published by Packt • Copy and paste, print and bookmark content

• On demand and accessible via web browser

Free Access for Packt account holders

(8)

Table of Contents

OUYA is more than a console – it's a business model 10 OUYA – content restrictions 11 Marks or branding 12

Content scope, applications, and social networks 12

XBMC 12

Development tools to build video games for OUYA 13

Adobe Air 14

Android SDK/NDK (Java or C language) 14

Corona 14 GameMaker 15 MonoGame 15 Unity3D 16

Summary 16

Chapter 2: Setup Prerequisites

17

(9)

Installing the Android NDK 22

Installing and configuring Eclipse 23

Installing Unity3D 24

Configuring the Android SDK in Unity3D 26

Summary 26

Chapter 3: Setup Instructions for the OUYA ODK

27

Creating an OUYA account 27

Installing the console 28

Downloading the ODK files 29

Setting up the ODK in Windows and Mac OS 30

For Mac OS 30

For Windows 31

Disabling Windows 8 driver signature verification 31

The OUYA emulator (Virtual Device) configuration 32

Executing the OUYA emulator 35 Summary 36

Chapter 4: Guidelines for Setting Up the OUYA ODK

37

Starting with the OUYA Development Kit 37

The ODK plugin within Unity3D 38

Importing the ODK plugin within Unity3D 38

Installing and configuring the ODK plugin 39

Installing and configuring the Java class 42

Identifying the user 42 Starter kit – examples 44 Common errors while working with OUYA 45

Errors with the emulator 45

Errors with Eclipse 46

Errors with the ADB connection USB 47

Errors in the OUYA panel 47

Summary 47

Chapter 5:

Configuring the Controllers

49

Setting the controls 50

Creating the first scene of the game 51

Assigning the OUYA controls 54

The menu or system button 56

Differences between an analog joystick and a touchpad 57

Testing changes in the state of the button 58

(10)

Chapter 6: The OUYA Marketplace

63

Update your user profile 63 Configuring the items of purchase 65

Creating a game in the OUYA store 67

Creating the Key.der file 68

Programming access to the marketplace 69

A general guide to OUYA game content 70

Build settings 71

Testing the project with the emulator 72 Summary 73

Chapter 7: Advanced OUYA Functions – Graphics and Controls

75

Understanding shaders 76

Types of shader processors 78

The CG programming language for Nvidia Tegra 3 80

Characteristics of the Tegra 3 processor 81

Lighting 82

Multiple controls 85

Common problems 89

Controller always pairing as the second controller 90 The second OUYA controller paired as the third controller 90

Summary 90

Chapter 8: The Future

91

Virtual reality – using Oculus Rift 92 Arduino – the peripheral interface 93

Leap Motion 94

Nuidroid – 3D recognition for OUYA 95 OUYA – the Free the Games Fund campaign 96

Summary 98

(11)
(12)

Preface

OUYA is the new video game console, announced in July 2012, based on the Android operating system.

Its main challenge is to be an alternative for independent developers and small businesses that do not have direct access to the major consoles in the market.

Its economy model is based on the freemium scheme, where all the games and content published on the console should have one free component and another that you can monetize.

Welcome to Getting Started with OUYA, a book that will guide you through the wonderful world of this console: its hardware, its configuration, how to build your first project for the console, and how to make money with it.

In the first three chapters, you will learn the general features of the console: origins, business model, technical prerequisites, and preparation of the development environment. In the next four chapters, the book explains the code base used to build video games for OUYA using the Unity3D engine Version 4.x. The last chapter shows the technologies that are being developed for the near future and that directly or indirectly impact the development and advancement of the console: Leap Motion, VR Oculus Rifts, and Arduino, among others.

The aim of this book is to let the reader know all the requirements and the basic tools to start your game development projects for the OUYA console.

(13)

What this book covers

Chapter 1, Why OUYA?, describes the origins of the project, the company, and its business model and gives an overview of the types of content that can be published in the console.

Chapter 2, Setup Prerequisites, shows the readers all the technical prerequisites and basic configurations to prepare the development environment for Android.

Chapter 3, Setup Instructions for the OUYA ODK, explains how to create a new

developer account on OUYA's site, how to download and install the SDK development environment for OUYA (the ODK), and how to configure the emulator.

Chapter 4, Guidelines for Setting Up the OUYA ODK, explains the contents of the ODK, installation and configuration of the ODK plugin to Unity3D, the starter kit, and common mistakes that can be made when starting a development project for the console.

Chapter 5, Configuring the Controllers, explains how to start our first project for the OUYA console and goes over the basic configuration of the main scene and the main character, their animations, and how to associate them with controls.

Chapter 6, The OUYA Marketplace, explains how to program the monetization of our video games using the integration features for OUYA's marketplace.

Chapter 7, Advanced OUYA Functions – Graphics and Controls, explains all the basics that readers need to know to optimize the graphics of their games, leveraging the capabilities of the TEGRA 3 graphics processor by Nvidia.

Chapter 8, The Future, describes all the emerging technologies that will impact the development and advancement of the console.

What you need for this book

(14)

Who this book is for

This book is for beginners and advanced programmers who want to build video games for the OUYA console. From beginners to advanced users, this book allows anyone to address various issues related to development projects for the OUYA console.

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "Open the c:\progs\ adt-bundle-windows-x86\sdk\extras\google\usb_ driver\android_winusb.inf file with the Notepad editor or another text editor."

A block of code is set as follows:

;OUYA Console

%SingleAdbInterface% = USB_Install, USB\VID_2836&PID_0010

%CompositeAdbInterface% = USB_Install, USB\VID_2836&PID_0010&MI_01

Any command-line input or output is written as follows:

adb kill-server

adb devices

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "Run the MANAGE | NETWORK option and configure your Internet connection."

Warnings or important notes appear in a box like this.

(15)

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to feedback@packtpub.com, and mention the book title via the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

Downloading the color images of this book

We also provide you a PDF file that has color images of the screenshots/diagrams used in this book. The color images will help you better understand the changes in the output. You can download this file from: http://www.packtpub.com/sites/ default/files/downloads/1453OT_ColorImages.pdf.

Errata

(16)

Piracy

Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at copyright@packtpub.com with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.

Questions

(17)
(18)

Why OUYA?

OUYA was officially announced on July 10, 2012, on the Kickstarter web portal. The project began with a funding goal of 950,000 USD to develop the console prototype. The project was financed by Kickstarter backers (this is the term that Kickstarter uses to refer to users who sponsor a project). Within 24 hours, they had already raised more than 2 million USD. By the end, they had reached 8.5 million USD. This makes OUYA one of the most popular projects launched on Kickstarter.

In December 2012, the creators began delivering developer versions of the console. The launch of OUYA through Kickstarter was an innovative way to raise funds for financing. The first units were sent out to backers on March 28, 2013. After some delays, the console was thrown open for purchase to the general public on June 25, 2013.

(19)

The publishing system used by major video game companies was one of the motivations behind the OUYA project becoming a reality. The big companies monopolize the market for video games, and independent developers need to pay a lot of money to publish their creations. OUYA changed this situation, allowing small developers to publish their work directly to final buyers without having to pay large sums of money to the big video game publishing companies.

The official website of the company is http://www.ouya.tv.

Technical specifications

The OUYA system has the following technical specifications. The developer versions may vary slightly, but the retail OUYA console has the following standardized specifications.

Hardware

The specifications of the OUYA console unit are as follows:

• It has a NVIDIA Tegra 3 (T33) processor (four cores). The processor is optimized for graphics processing and web browsing. It has a CPU clock speed of 1.6 GHz and a GPU clock speed of 520 MHz. Because it doesn't have to worry about battery life, OUYA runs this processor at the full clock speed all the time.

• Optimized for video games with high graphical quality, including the reproduction of video in 1080p HD.

• 1 GB LPDDR2 RAM.

• 8 GB internal storage (expandable by means of an external hard disk via USB). Only approximately 6 GB of memory will be used. The remaining memory will be used by the Android and the OUYA OS. A 16 GB version has also been launched recently.

• HDMI connection to TV to 1080p HD (one connection). • LAN Ethernet connection via an RJ45 port.

• Wi-Fi 802.11 bgn. • Bluetooth 4.0 LE.

USB 2.0 (one port). This is the port where components such as mice, keyboards, and storage can be hooked up to. It is sometimes called the

(20)

Micro USB (one port). This is the port that you should use for hooking OUYA to your computer for development purposes. It is sometimes called the outbound USB port.

The OUYA pack

Controller

The specifications of the OUYA controller bundled with the console are as follows:

• A wireless controller with a radio frequency of 2.4 GHz. This uses a standard Bluetooth connection.

• A standard game controller layout (two analog joysticks, D-pad, eight action buttons, and one system button).

• A touchpad, so that mobile games that are ported onto the system can be played more easily.

(21)

• OUYA supports up to four controllers, as shown in the following diagram:

The control pad

Software

The default software specifications of OUYA are as follows:

• Android operating system 4.1 Jelly Bean • Custom TV UI

• It has an integrated storage, which allows us to search and download games (and other applications)

• Includes the SDK for development (OUYA ODK), which is available online for download

OUYA is more than a console – it's a

business model

The console is the beginning of an ecosystem of businesses that want to leverage e-commerce systems with the aid of the "micro" transactions system.

(22)

The OUYA console is based on a system of monetization of games, referred to as the

Freemium system, where the business model operates and consists of offering free basic services, combined with the option of purchasing additional items.

The owner of a game published via the console has the opportunity to generate money in the following ways:

• Selling the complete version of the video game (an unlocked version of the game or a version that has some restrictions removed)

• Selling worlds or levels

• Selling elements of the inventory, such as clothes, weapons, shields, and special powers

The following variables are monitored in a Freemium business model:

Daily Active Users (DAU) • Monthly Active Users (MAU)

Index, which combines Daily Active Users versus Monthly Active Users

The OUYA portal offers some basic level of analytics for developers, such as downloads and purchases.

OUYA – content restrictions

The company is very clear about the type of content that is permitted on the OUYA system. Explicit content is not permitted, including the following:

• Any content promoting hatred toward a person or a group of people for their race, ethnicity, religion, disability, gender, age, sexual orientation, or gender identity

• Any content that promotes violence in the real world, in any form • Sexually explicit material is forbidden in the contents of the console and

their applications

• Content that infringes on any copyright; the creators of the content must respect intellectual property and third-party copyright laws, including patents, marks, commercial secrets, and laws of authorship and others laws of property that are guarded

(23)

Marks or branding

You can utilize the OUYA name, logo, and commercial mark, but you must respect that they are the intellectual property of the company, for which they should receive credit.

OUYA has an official manual of corporate identity that should be used. You can find it at https://www.ouya.tv/brand-guidelines/.

The corporate logo

Content scope, applications, and social

networks

Besides the OUYA store, there are various media outlets, applications, and social networks that players and developers can use to reach out and make their games and content more popular. Some of these applications and networks include XBMC, TwitchTV, Onlive, VEVO, PLEX, and Crunchyroll, and we will learn about them in detail in the following sections.

XBMC

The XBMC media center is an open source multimedia entertainment platform under the GNU GPL license. Its official website is http://xbmc.org/.

TwitchTV

TwitchTV is an original service where players enjoy sharing their games with other users. It also offers its own chat tools and channels. This website has been functioning since 2011. In November 2012, Planet Side 2 was released, the first game

(24)

Onlive

Onlive is a video game distribution system that allows rental on demand (this means that you can rent the game for a few days or up to three years). This service is equivalent to cloud computing in the game industry, with the game being computed, rendered, and stored online. Onlive does not officially support OUYA, but you can get it to work by sideloading the APK on your system. Its official website is http://www.onlive.com/.

VEVO

VEVO is a music video site owned by Sony Music Entertainment, Universal Music Group, Abu Dhabi Media Company, and Arthur Music Company. EMI Music has given them the license to reproduce its content. Its official website is http://www.vevo.com/.

PLEX

PLEX is a media center that lets you organize the library of movies, series, and music. We can play it from the OUYA console and create a system of positive feedback for all the items related with high-level interactive content. Its official website is http://www.plexapp.com/.

Crunchyroll

Crunchyroll is an American website and international online community focused on streaming media such as anime, manga, music, video games, and racing from East Asia. Its official website is http://www.crunchyroll.com/.

The important point is that you have software and services that attract users. The OUYA development company is in talks with Hulu, Netflix, Amazon, and Google for their services.

Development tools to build video games

for OUYA

(25)

Adobe Air

Adobe AIR is a free development framework and platform to create games and applications for mobile devices; it allows developers to create games for the OUYA console as it allows the creation of native applications for Android.

Download the software from http://www.adobe.com/devnet/air/air-sdk-download.html.

The official documentation for OUYA can be found at https://devs.ouya.tv/ developers/docs/adobe-air.

Download the examples for OUYA from https://github.com/ouya/ouya-sdk-examples/tree/master/AdobeAir.

Android SDK/NDK (Java or C language)

The Android SDK is a free development framework based on Java that allows developers to make games using development IDEs such as Eclipse. The Android native development kit (NDK) is an alternative development framework that is free and allows you to develop native applications using the C or C++ programming languages.

It is worth mentioning that in an application written with NDK, you may need to use the Java Native Interface (JNI) to make use of only the used functions from Java.

Download the software (Android SDK / Android NDK) from http://developer. android.com/sdk/index.html or http://developer.android.com/tools/sdk/ ndk/index.html.

The official documentation for OUYA can be found at https://devs.ouya.tv/ developers/docs/android.

Download the examples for OUYA from https://github.com/ouya/ouya-sdk-examples/tree/master/Android.

Corona

(26)

The official documentation for OUYA can be found at https://devs.ouya.tv/ developers/docs/corona.

Download the examples for OUYA from https://github.com/ouya/ouya-sdk-examples/tree/master/Corona.

GameMaker

GameMaker is based on an interpreted programming language and software development kit (SDK) to develop video games. The program is designed to allow its users to easily develop games without having to learn a programming language such as C++ or Java.

The program is free. However, there is an extended commercial version with additional features.

Download the software from http://yoyogames.com/gamemaker/download. The official documentation for OUYA can be found at https://devs.ouya.tv/ developers/docs/game-maker.

Download the examples for OUYA from https://github.com/ouya/ouya-sdk-examples/tree/master/GameMaker.

MonoGame

MonoGame is an open source implementation of Microsoft's XNA platform. The goal when developing games using this framework is an additional way to create games and applications for iOS, Android, and Windows Phone 8; Mac OS X, Linux, and Windows 8; and OUYA and PlayStation.

The official documentation for OUYA can be found at https://devs.ouya.tv/ developers/docs/mono-game.

(27)

Unity3D

Unity3D is a platform game engine that works as a development environment that supports OUYA. In the web console, developers can find documentation on how to prepare Unity to work with the console, and the ODK includes the files needed to integrate Unity with OUYA libraries. We also have to consider that programming for Unity is based on scripting, and for that we can use UnityScript languages such as C# or Boo.

Among the engine options for video games development, Unity3D has the highest quality and technical support. In addition to the many applications, development kits, and source code that the Asset Store has, it can also be used to get useful material for projects and development on multiple platforms.

Unity3D is available as a development platform for the Windows and Mac operating systems, and allows you to create games for Windows, iOS, Linux, Xbox 360,

PlayStation 3, Wii, Wii U, iPad, iPhone, Android, and OUYA (actually). Thanks to the Web plugin that comes with Unity3D, you can also develop games for Windows and Mac browsers.

In the following chapters, we will walk you through the process of downloading and installing Unity3D for creating the practice applications and examples mentioned in this book.

Download the Unity3D software from http://unity3d.com/unity/download/. The official documentation for OUYA can be found at https://devs.ouya.tv/ developers/docs/unity.

Download the examples for OUYA from https://github.com/ouya/ouya-unity-plugin.

Summary

In this chapter, we learned how to start a new project, the technical specifications of the console (hardware and software), the contents that are not allowed to be published on the console, and the main development tools that are currently available in the market.

(28)

Setup Prerequisites

OUYA is an interesting console for developers because it allows them to use different tools to create their video games. Everything from Java and the Android SDK to the most popular video game engines, such as Unity3D and UDK, can be used with OUYA, as shown in the following diagram:

I want to make an OUYA Game

Adapt for OUYA

cross-platform tools Make Android Game

OUYA's development tools

Although modern browsers such as Firefox and Chrome automatically download any file in a specific path predetermined by them, we suggest creating a directory where you will download all the necessary installers, for example, C:\installers. We also suggest creating a folder in the root of the hard disk, where all the programs that will be explained in the following sections will be installed. For now, you can create a directory called progs in C:.

(29)

Installing the Java Runtime

The Java Runtime is the first component that must be installed. It should be downloaded from http://www.oracle.com/technetwork/java/javase/ downloads/index.html.

Download the appropriate version for your operating system (Linux, Mac OS, 32-bit Windows, 64-bit Windows) as shown in the following screenshot:

Java download options

The installation process is very simple. Run the downloaded JRE file and follow the instructions using the default options. When finished, restart your computer.

Installing the Android SDK

(30)

Android SDK download options

The Android SDK does not require an installer; simply extract the main directory in the directory previously suggested (C:\progs) to facilitate the configuration later. When finished, restart the computer.

Navigate to <C:\progs\adt-bundle-windows-xXX-xxxxx> and run the SDK Manager.exe file.

(31)

The options that should be selected are mentioned in the following list:

Tools

Android 4.1.2 (API 16)

Extras

° Android Support Library

° Google USB Driver

° Intel x86 emulator Accelerator (HAXM)

The following screenshot also illustrates where the options are provided:

(32)

You do not need to delete the other components of the SDK (such as other versions of Android) if you have them installed already.

The next step is to set the PATH environment variable of the Windows operating system so the Android SDK components can be referenced from any application and run properly. In Windows, this option can be found by navigating to Control Panel | System | Advanced System Settings.

You can edit the path variable as shown in the following screenshot:

Configuring environment variables

In this variable, you must add the following line (if some data already exists, insert a semicolon after the last data; however, we recommend that you write the elements from the beginning):

(33)

Installing the Android NDK

The Android NDK is an additional component that is not mandatorily required for all development environments, but we suggest installing it right now, at the initial stages, for future use.

Download the NDK from http://developer.android.com/tools/sdk/ndk/ index.html and select the version that fits your operating system: 32-bit Windows 32-bit, 64-bit Windows, Mac OS, and Linux.

Android NDK download options

(34)

Directory structure

Installing and configuring Eclipse

The Eclipse IDE is used when you want to program natively with Java and Android SDK, and it can also be used with the NDK via the JNI. So it will be a prerequisite to have the Java Runtime or Java Development Kit (JDK) and the Android SDK installed. Download Eclipse from http://www.eclipse.org/downloads/ (the Eclipse Standard 4.3 option or the Eclipse IDE for Java Developers option is a good choice).

(35)

Android provides an Eclipse plugin called Android Development Tools (ADT) to configure new Android projects. This component must be configured within the Eclipse IDE.

To install the plugin in Eclipse, perform the following steps:

1. Navigate to Help | Install New Software.

2. Go to https://dl-ssl.google.com/android/eclipse and follow the installer instructions and use the default settings. You must then configure the path where the Android SDK was installed so that the Eclipse IDE can reference it. To do this, navigate to the Preferences menu as shown in the following screenshot:

Configuration of the Android SDK in the Eclipse IDE

After performing the preceding steps, the Eclipse IDE will be ready to create Android projects, which is used to create OUYA video games.

Installing Unity3D

From this point onward, we will use the Unity3D engine for implementing a small game. Download the installer Unity Pro (a trial version for 30 days is available) from the following website:

(36)

After you download the file, run the installer and use the default options. After the installation, the program will ask for a Unity3D account. If you do not have one, you can create a new one with your e-mail ID, as shown in the following screenshot:

(37)

Configuring the Android SDK in Unity3D

To configure the Android SDK in Unity3D, you just need to run Unity3D and configure the path to the Android SDK. To do this, you need to navigate to Edit | Preferences | External Tools | Android SDK Location, as shown in the following screenshot:

Configuration of the Android SDK in Unity3D

Summary

By the end of this chapter, you will have installed all the prerequisites to develop a game with OUYA, the Java Runtime or Java Development Kit, Android SDK or NDK, Eclipse, Unity3D Engine, and basic settings in Unity3D.

(38)

Setup Instructions for

the OUYA ODK

This chapter introduces developers to the first steps of setting up their development environment using the OUYA SDK (ODK) and the configuration of the emulator. Also, for those who already have the physical console, this chapter will explain the initial steps of installing it.

Creating an OUYA account

To enjoy the full experience of the console, you must create a user account on the website of the company, http://www.ouya.tv.

There are two types of accounts: gamer and developer. You can create a gamer account on the OUYA device itself, but you will need to create a developer account on the official OUYA website.

For the purposes of this book, you must create a developer account, as that will provide you access to a unique developer code called developer UUID. This code number is used to uniquely identify the developer and is associated with each game released on the console.

(39)

Installing the console

The first step is to open the console package and identify all its components, listed as follows:

• The console • A control pad • An HDMI cable • A power cable

The next task is to perform the physical installation of the console. To do this, perform the following steps:

1. Connect the console directly to your Internet connection (through the cable LAN or Wi-Fi).

2. Connect the console to your TV and turn it on using the OUYA button. 3. Switch on the control pad by pressing the key so that it can be recognized

by the console (the first time takes some time).

4. Go to MANAGE | NETWORK and configure your Internet connection. It's better and highly recommended to use an Ethernet connection as it is more stable.

5. The first time you run the console, the system performs an automatic update of the operating system.

6. Attach the account you have previously created on the website to the console by navigating to MANAGE | ACCOUNT | USER.

7. If you are creating the account for the first time, enter your credit/debit data by navigating to MANAGE | ACCOUNT | PAYMENTS.

8. Download the games of your interest using the DISCOVER option.

(40)

Downloading the ODK files

In the previous chapters, we explained the steps to install the prerequisites to prepare the development environment.

(41)

The latest version of the ODK will be downloaded if you click on the Download ODK button. If you require an earlier version, you can use the following links:

• https://devs-ouya-tv-prod.s3.amazonaws.com/odk/odk-1.0.1.zip • https://devs-ouya-tv-prod.s3.amazonaws.com/odk/odk-1.0.5.zip After downloading the file, unzip the file to the root of the working directory where you installed the Android SDK and Android NDK. We should be left with something like this path: C:\progs\OUYA-ODK.

Setting up the ODK in Windows and

Mac OS

If you want to use the emulator, the prerequisites for the Windows and Mac OS operating systems are the same. The following are the list of prerequisites:

• Java Runtime or Java Development Kit (JDK) preinstalled

• Android SDK and Android NDK preinstalled (Android 4.1 / API 16 with Android Support Library and without Google APIs)

• Configure the installation paths of Android and Java in the PATH environment variable

Then, you must configure the USB driver as explained in the following section.

For Mac OS

1. Locate the ~/.zprofile .bashrc (or ~/.zprofile.zshrc) file and add the following lines of command to it:

export PATH=$PATH:~/android/android-sdk-macosx/tools

export PATH=$PATH:~/android/android-sdk-macosx/platform-tools

export ANDROID_HOME=~/android/android-sdk-macosx

(42)

3. If you want your OUYA console to be recognized by the operating system, add 0x2836 to the ~/.android/adb_usb.ini file.

4. Connect the console through its USB cable and run the following lines of command:

adb kill-server

adb devices

After that, your console should appear in the list of available devices.

For Windows

You can find more information on ODK setup, including detailed instructions and videos, at https://devs.ouya.tv/developers/docs/setup.

Open the c:\progs\ adt-bundle-windows-x86\sdk\extras\google\usb_ driver\android_winusb.inf file with the Notepad editor or any other text editor (note that it's possible that you may need administrator privileges to edit the file).

Disabling Windows 8 driver signature verification

If you are using the Windows 8 operating system, disable driver signature verification. To do this, perform the following steps:

1. Add the following lines of code under the [Google.NTx86] section:

;OUYA Console

%SingleAdbInterface% = USB_Install, USB\VID_2836&PID_0010

%CompositeAdbInterface% = USB_Install, USB\VID_2836&PID_0010&MI_01

2. Now, add the following lines of code under the [Google.NTamd64] section:

;OUYA Console

%SingleAdbInterface% = USB_Install, USB\VID_2836&PID_0010

%CompositeAdbInterface% = USB_Install, USB\VID_2836&PID_0010&MI_01

3. Save the changes.

4. Connect the console through its USB cable and run the following commands:

adb kill-server

echo 0x2836 >> "%USERPROFILE%\.android\adb_usb.ini"

adb start-server

(43)

After that, your console should appear in the list of available devices in the Device Manager menu in Windows. It's possible that you may have to perform additional steps such as updating the driver for the device. This is because as soon as you connect it, Windows will try unsuccessfully to install drivers. The complete steps are in the OUYA Windows setup documentation available at https://devs.ouya.tv/ developers/docs/setup.

After finishing all the steps, you can view the logs generating out of the device. You can do this with the Eclipse tools (LogCat) or using adb on the command line (for more information, visit http://developer.android.com/tools/help/logcat.html).

The OUYA emulator (Virtual Device)

configuration

Before we begin, it is important to clarify that the use of the emulator is optional. It is much better to run games directly on the OUYA because the emulator's performance is generally extremely poor in comparison.

The initial steps are to open the Android SDK Manager, execute the Virtual Device Management option, and create a new device.

The suggested configuration template for the new device is as follows:

Screen Size (in): This should be 32.0Resolution (px): This should be 1920 x 1080Sensors and Cameras: This should be disabled • Input: This should be DPad

(44)

The following screenshot shows the complete configuration of a Virtual Device:

(45)

We can create an OUYA emulator with the preceding template. The suggested configuration for the emulator is shown in the following screenshot:

It is important to note that there are several possibilities to set the resolution of an Android Virtual Device, such as its density and size variables. In the following screenshot, we see the various available options:

(46)

Executing the OUYA emulator

The last step is to run the OUYA emulator. For that, the first thing to do is load the Virtual Device created in the previous step from the Android Virtual Devices handler as shown in the following screenshot:

Running the Android Virtual Device

When you load the desktop's Android operating system, the system is ready to run the OUYA emulator. To do this, run the two applications that are within the OUYA-ODK directory (ouya-framework.apk and ouya-launcher.apk). Type in the following lines of commands:

adb start-server

adb install -r ouya-framework.apk

(47)

The launcher should now appear on the screen. Here, you are presented with two possibilities, the Android application launcher and the application launcher for OUYA. If you select the latter, you can use the OUYA emulator. The following screenshot shows the execution of the OUYA launcher:

From this point, you can install a .apk file on the emulator to see the execution of our own games. To install a game, copy the game's apk file into the root OUYA-ODK directory and then type in the following command:

C:\progs\OUYA-ODK\adb install your_demo_game.apk

Summary

By the end of this chapter, you should have the environment ready to deploy your first project for OUYA, that is, the OUYA SDK (ODK) and the console emulator.

(48)

Guidelines for Setting Up

the OUYA ODK

This chapter will explain the various resources, folders, and libraries in the ODK, and the code that needs to be created to initiate a project for the OUYA console.

Starting with the OUYA Development Kit

The OUYA Development Kit (OUYA ODK) is a tool to create games and applications for the OUYA console, and its extensions and libraries are in the .jar format. It is released under Apache License Version 2.0.

The OUYA ODK contains the following folders:

• Licenses: The SDK games and applications depend on various open source libraries. This folder contains all the necessary authorizations for the successful compilation and publication of the project in the OUYA console or testing in the emulator.

• Samples: This folder has some scene examples, which help to show users how to use the Standard Development Kit.

• Javadoc: This folder contains the documentation of Java classes, methods, and libraries.

• Libs: This folder contains the .jarfiles for the OUYA Java classes and their dependencies for the development of applications for the OUYA console. • OUYA Framework APK file: This file contains the core of the OUYA software

environment that allows visualization of a project based on the environment of OUYA.

(49)

The ODK plugin within Unity3D

Download the Unity3D plugin for OUYA. In the developer portal, you will find these resources at https://github.com/ouya/ouya-unity-plugin.

After downloading the ODK plugin, unzip the file in the desktop and import the ODK plugin for the Unity3D folder in the interface engine of the Assets folder; you will find several folders in it, including the following ones:

• Ouya: This folder contains the Examples, SDK, and StarterKit folders • LitJson: This folder contains libraries that are important for compilation • Plugins: This folder contains the Android folder, which is required for

mobile projects

"The Last Maya" created with the .ngui extension

Importing the ODK plugin within Unity3D

(50)

A complete documentation on the ODK plugin for Unity3D can be found at https://devs.ouya.tv/developers/docs/unity.

Installing and configuring the ODK plugin

First, execute the Unity3D application and navigate to File | Open Project and then select the folder where you need to put the OUYA Unity plugin.

You can check if Ouya Unity Plugin has been successfully imported by having a look at the window menu at the top of Unity3D, where the toolbars are located. In this manner, you can review the various components of the OUYA panel.

While loading the OUYA panel, a window will be displayed with the following sections and buttons:

Build Application: This is the first button and is used to compile, build, and create an Android Application Package file (APK)

Build and Run Application: This is the next button and allows you to compile the application, generate an APK, and then run it on the emulator or publish directly to a device connected to the computer

Compile: This button compiles the entire solution

The lower section displays the paths of different libraries. Before it uses the OUYA plugin, the user ought to edit the fields in the PlayerSettings window (specifically the Bundle Identifier field), set the Minimum API Level field to API level 16, and set the Default Orientation field to Landscape Left. Another button that is mandatory is Bundle Identifier synchronizer, which synchronizes the Android manifest file (XML) and the identifiers of Java packages.

(51)

Also, the OuyaGameObject (shown in the following screenshot) is very important for use in in-app purchases:

The OUYA panel

(52)

The Java JDK tab shows the routes of the Java Runtime installation with all its different components to properly compile a project for Android and OUYA, as shown in the following screenshot:

(53)

Finally, the last tab of the OUYA panel, Android NDK, shows the installation path of C++ scripts for native builds, as shown in the following screenshot:

Installing and configuring the Java class

If at this point you want to perform native development using the NDK or have problems opening or compiling the OUYA project, you need to configure the Java files. To install and configure the Java class, perform the following steps:

1. Download and install the JDK 1.6 and configure the Java Runtime path in the PATH environment variable.

2. Next, you need to set a unique bundle, identifier.com.yourcompany. gametitle.

3. Hit the Sync button so your packages and manifest match.

4. Create a game in the developer portal that uses the bundle ID. Download that signing key (key.der) and save it in Unity.

5. Compile the Java plugin and the Java application.

6. Input your developer UUID from the developer portal into the OuyaGameObject in the scene.

Identifying the user

(54)

You can find your UUID code on the main page of the OUYA developer portal (https://devs.ouya.tv/developers) after you log in.

The UUID code has a structure similar to the following one:

00000000-0000-0000-0000-000000000000

An example UUID code is shown in the following screenshot:

Once you have a developer ID, you must include it within the OuyaSDK.cs and ouyaInputHandler.cs scripts as shown in the following screenshot. This will allow you to access the purchasing system on the console.

(55)

Starter kit – examples

The ODK plugin for Unity3D contains the following four scenes:

• Initial scene • Welcome scene • Main menu scene • Game scene

The preceding scenes are shown in the following screenshot:

(56)

You will find the following three main files inside the Scenes folder:

• SceneInit.Unity: This is the application file that runs at the beginning • SceneSplash.Unity: This is the scene showing the title or cover of the game • SceneMain.Unity: This is the main game scene

The initial scene contains the OuyaGameObject script. This script allows the welcome scene to load.

The main scene is associated with a GUI button that allows the game to load.

Common errors while working with OUYA

In the next section, we'll be covering some errors that are commonly encountered while working on the OUYA system.

Errors with the emulator

The configuration of the emulator with an optimal resolution is one of the greatest hurdles to overcome before we can begin testing with our APK.

(57)

Additionally, you need to install the Intel x86 Atom System package within the Android SDK.

Install Intel x86 Atom System package

It is important to remember that the use of a non-Intel processor for the various tests can affect emulator screen resolutions and configuration processes. This virtualization of Android hardware makes the emulator run much faster, but it is only available to you if you have an Intel CPU.

Errors with Eclipse

(58)

Errors with the ADB connection USB

There should be no carriage return after the hex value. Any blank lines in this file will result in an error. Add ~/ to android/adb_usb.ini.

Create the adb_usb.ini file if it doesn't exist so your OUYA console can be recognized, and then insert the following command:

0x2836

Errors in the OUYA panel

When opening the OUYA panel window, you may receive the Mismatched Bundle Error. It appears because of issues in the synchronization of paths.

To correct this error, click on the Sync Bundle ID button. The error will disappear after a few seconds.

Other errors may occur when compiling Android from Unity. To correct this, you can download the 32-bit version of the Java Runtime at the following link (this alternative procedure can only be used in the Windows platform):

http://download.oracle.com/otn/java/jdk/6u45-b06/jdk-6u45-windowsi586.exe

Summary

In this chapter, we explained the most important ODK plugin settings for Unity3D as well as the importance of using the UUID identification code developed for the OUYA project. Integrating the UUID code with your code in order to implement in-game purchases will be covered later in the book.

We also identified the most common mistakes when working on the development environment for OUYA.

(59)
(60)

Configuring the Controllers

This chapter will assess the main features of the buttons for the controls and the hardware for the OUYA console.

The OUYA Controller

The control pad has the following features:

• It is a 2.4 GHz RF wireless controller and a standard Bluetooth controller • Two (2) AA batteries for each controller

• A touchpad that works like a mouse • Four digital buttons (O, U, Y, and A)

• A directional pad (D-Pad) that supports four direction buttons • Two analog sticks (LS and RS)

• Two digital buttons that activate when the analog sticks are pushed straight down (L3 and R3)

(61)

• The OUYA (U) button (used to bring you back to the OUYA main menu).

A description of buttons

Setting the controls

For this book, we will use a limited version of "The Last Maya" as our game is about the actual origin of Maya culture.

The Assets folder of Project Unity contains 3D models that include pyramids, characters, scripts, and the main scene maya.unity.

If you purchase this book, all these resources will be present in the code bundle, in the Mayan_Project1.zip file. Open Mayan_Project1.zip and unzip the project, including Asset/maya, and open the main stage by double-clicking on the maya. unity file.

(62)

To change the settings in our scene, you need to use the OuyaInputHandler.cs script and the InputManager.asset file. To do this, you need to execute the following steps:

1. Copy the InputManager.asset file to the ProjectSetting folder of your project. In this section, it is very important to check the variables present in the OuyaInputManager.cs file with the configuration of the buttons. This will overwrite any custom changes to the input preferences.

2. Copy the OuyaInputHandlerExample.cs file to the Scripts folder, which is located in the Asset/Ouya/Example/Scripts directory, and rename the script as OuyaInputHandler.cs.

3. Place the OuyaGameObject.cs script in the opening scene that is in the Asset/Ouya/SDK folder and write your developer UUID in the beginning of the section. The SDK comes with an OuyaGameObject prefab, and the developer ID can be set using the inspector of Unity.

4. Another optional script is OuyaInputTest.cs, which is useful for connecting any OuyaGameObject with the GUI's interaction. If not required in your project, you can remove the OuyaInputTest.cs script from the Scripts folder.

Creating the first scene of the game

In the project that is open, it identifies the entire directory structure, including the OUYA SDK directory structure, NGUI, and The Last Maya files.

(63)

Inside the mayan directory, you will find all of the main 3D objects of the project: pyramids, oracle, animations, and the main character.

3D models of The Last Maya file

Next, to ensure that our character can move around within the scene, perform the following steps:

1. Insert a terrain in the scene and our character can collide with this terrain. This allows the character to interact with what is basically the "ground" of the scene. Another option could be to add a floor (plane) that interacts with the character.

2. Add a light to the scene. This light allows the player to see the details of the imported models. The light source is needed to illuminate the objects that are present in the scene.

3. Select the main mayan character on the hierarchy window with the F key on the keyboard. Find it in the "script third person" controller contained in the Standard Assets folder and drag the script to the character.

4. The Maya.unity project contains Standard Assets/Character Controllers assets by default. Make sure the controller (the green cylinder) covers the whole body of the character.

5. Click on the Project window and place yourself in Standard Assets/ Character Controllers and drag the "third person" code to our character imported as maya.unitypackage.

(64)

A character imported in the scene would look like what is shown in the following screenshot:

The character has six basic animations that can be seen from the inspector's window of Unity3D. These are walk, run, stand, idle, active, and attack. Each of these animations must be configured in the OuyaInputHandler.cs file linked to a button. It uses the legacy animation system in Unity.

You can find the animations in the mayan folder and drag them to the controller script that appears in the project window section. Each animation contains a logical sequence of frames linked to the character.

(65)

The character must contain the character controller scripts and have associated the OuyaInputHandler.cs file (refer to the following screenshot):

Assigning the scripts for a character's controller

To ensure that the character can move through the scenario, you need to locate the controller script in the positions of the X, Y, and Z axes, completely covering the 3D model of the character. It is also necessary for the controller script to be integrated with the OuyaInputHandler.cs file.

Assigning the OUYA controls

The primary code to be amended is present in the OuyaInputManager.cs file where you put the developer UUID and the OuyaInputHandler file, which sets the coordinates and animations of the Ouya control buttons.

(66)

In OUYA's analog command, the X and Y values are generated in the range of -1 to +1 with zero being neutral.

The axis joystick and D-pad

The next step is to configure animations and buttons for the character. Before proceeding, we must consider the state of the button.

Each button calls OUYA's control animations such as walk or run. For the following example, the run and idle animations are observed in detail in the Update()

function of the OuyaInputHandler.cs script, linked to the character, as shown in the following code:

//ATTACK STANCE:

if (b.Equals(OuyaSDK.KeyEnum.BUTTON_Y) && bs.Equals(OuyaSDK. InputAction.KeyDown))

{

if (!isBattleStance) {

//Set Battle stance.

this.animation.Play("idle"); isBattleStance = true; }

else {

(67)

this.animation.Play("idle");

if (b.Equals(OuyaSDK.KeyEnum.BUTTON_U) && bs.Equals(OuyaSDK. InputAction.KeyDown))

{

this.animation.Play("attack_1"); }

//RUN:

if (b.Equals(OuyaSDK.KeyEnum.BUTTON_Y) && bs.Equals(OuyaSDK. InputAction.KeyDown))

{

this.animation.Play("run"); }

//FAKE READY:

if (b.Equals(OuyaSDK.KeyEnum.BUTTON_A) && bs.Equals(OuyaSDK. InputAction.KeyDown))

{

this.animation.Play("ready"); }

}

The menu or system button

The SDK includes interfaces for the OUYA menu button. To use the menu or system OUYA button (U), remember to press the menu button twice or press and hold it to go back to OuyaController.Button_menu.

A single press will now send an OuyaController.BUTTON_MENU (KEYCODE_MENU) keycode to the app, emulating a normal menu button. To bring up the system menu, you may now tap the OUYA button twice or press the OUYA buttons on newer controllers for a long time.

When the system button is pressed, the pause menu will be shown:

public void OuyaMenuButtonUp() {

(68)

The menu or system button

Differences between an analog joystick

and a touchpad

Both the analog stick and the touchpad use the OnGenericMotionEvent event to report a state. To differentiate them, we must assess the input source.

In order to assess the input source, we query the InputDevice class. Depending on the value returned, we can tell if the input is provided by the joystick or the touchpad. The values returned for the specific device are shown as follows:

Joystick == InputDevice.SOURCE_CLASS_JOYSTICK Touchpad == InputDevice.SOURCE_CLASS_POINTER

This querying can be illustrated with the following example:

@Override

public boolean onGenericMotionEvent(final MotionEvent event) { //Get the player event

int player = OuyaController.getPlayerNumByDeviceId(event. getDeviceId());

//Joystick

(69)

//do other things with joystick }

//Touchpad

if((event.getSource() & InputDevice.SOURCE_CLASS_POINTER) != 0) { //Print the pixel coordinates of the cursor

The difference between using the analog stick and the touchpad is the level of sensitivity and the degrees of freedom for the controls. The joystick is efficient for 3D games and the touchpad is not good for 2D gaming; it is more like using a mouse pointing device. In general, using the touchpad to control a character is more difficult than using the analog stick. It is a great feature that can be used to great effect in the right context, but it needs to be implemented with care.

Testing changes in the state of the button

There is a function within the script that detects when a button is pressed or released, so it can process its current state.

The following is the first section of code that shows the state of the button in use, that is, when an action is executed:

if (c.buttonChangedThisFrame(OuyaController.BUTTON_O)) { if (c.buttonPressedThisFrame(OuyaController.BUTTON_O)) { Execute_Action();

The second part of the code (the action is suspended) is as follows:

}

else if (c.buttonReleasedThisFrame(OuyaController.BUTTON_O) { End_Action();

} }

The OuyaController class contains OUYA-specific constants for buttons and axes. A small selection is shown in the following code:

(70)

The following are the three basic events to check the status of the onKeyDown, onKeyUp, or onGenericMotionEvent buttons:

@Override

public boolean onKeyDown(int keyCode, KeyEvent event) {

boolean handled = OuyaController.onKeyDown(keyCode, event); return handled || super.onKeyDown(keyCode, event);

}

@Override

public boolean onKeyUp(int keyCode, KeyEvent event) {

boolean handled = OuyaController.onKeyUp(keyCode, event); return handled || super.onKeyUp(keyCode, event);

}

@Override

public boolean onGenericMotionEvent(MotionEvent event) {

boolean handled = OuyaController.onGenericMotionEvent(event); return handled || super.onGenericMotionEvent(event);

}

Once OuyaController gets the events, you can then get an instance of the class by using the device ID or player number, as shown in the following code:

OuyaController c = OuyaController.getControllerByDeviceId(deviceId); OuyaController c = OuyaController.getControllerByPlayer(playerNum);

It is a good practice to clear the input state when the scene loads and when it is destroyed, as shown in the following code:

void Awake()

When a controller connects or disconnects, a calibration event will be fired, as shown in the following code:

public void OuyaOnJoystickCalibration() {

(71)

For the button input, the examples use the following:

OuyaExampleCommon.GetButton (GetButton, GetButtonDown, GetButtonUp)

For the axis input, the examples use the following:

OuyaExampleCommon.GetAxis (GetAxis, GetAxisRaw)

Compiling and executing the game

To compile the game, we must incorporate the game scenes in the Build Settings window. The SceneInit starter Kit (level 0) and Maya are the scenes that correspond to the game (level 1), as shown in the following screenshot:

Setting up Build Settings

We name our APK file THE_LAST_MAYA, select Android as the platform, and set 16 as the Minimum API level value by allowing correct compilation. The other parameters in the Player Settings window are set by default. They are important because OUYA has input preferences for default values.

The following fields need to be filled in the Identification section:

Bundle Identifier: This is the project name. • Bundle Version: By default, it is 1.0.

(72)

The following are the fields to be filled in the Configuration section:

Device Filter: Select only ARMv7 (this is the recommended option for OUYA)

Install Location: Select Prefer External (this is the recommended option for OUYA)

Graphics Level: Select Open GL ES 2.0 (this is the recommended option for OUYA)

Settings for Android

(73)

Summary

This chapter covered the initial steps to optimize the development of a project's scenes, the basic controls, and how to set up the coordinates. The compilation of the game for Android and the OUYA console was also covered.

(74)

The OUYA Marketplace

This chapter shows us all the steps to set up an account and allow users to buy video games and other in-game inventory items, such as extra levels, weapons, and power-ups.

Update your user profile

It is possible that you might have left some fields incomplete when you created your user account. It is time to complete them so that the store can work correctly.

Navigate to the OUYA portal to edit your details. Enter the address as https:// devs.ouya.tv/developers/edit in the browser, after which the following screenshot will appear:

(75)

In order to upload your video game to the OUYA store, you must complete the following sections:

Developer Profile

Marketplace Agreement

In order to sell your products, you must complete the following sections:

Payment Info

Tax Documents

Navigate to https://devs.ouya.tv/developers/company_profile/edit to update the information, as shown in the following screenshot:

User profile form

In the payment information section, you should include all the details of your bank account, including the full name of the bank, SWIFT code, and IBAN or account number.

(76)

If you are a resident of the U.S.A, you must fill the IRS Form W-9 form. If you live in a different country, you must complete the IRS Form W-8BEN form.

After filling the form, you must scan it, convert it to the PDF format, and upload it to the page. The PDF file has a maximum size of 2 MB, as shown in the following screenshot:

The payment and tax information

Configuring the items of purchase

The second step is to create all the in-game purchase items that we wish to sell within our games.

In order to do this, we must visit the developer portal and click on Products. This link will take you to another page where you will use the New Products link to create all the items that are to be sold in our various games.

The link to the developer portal is https://devs.ouya.tv/developers.

(77)

Each product has a unique identification code, a description or name of the product, price, and product type. The code can be composed of letters, numbers, and underscores.

The product description provides further details on what the product does. It is suggested that you indicate the product name and the game to which it belongs as part of the product description, in order to prevent future errors when your inventory of products is very large.

The price starts at $0.99 and you can select the desired value.

The Type field has the following two options:

Entitlement: This type of product is used to give a user the right to buy a video game or unlock levels. It is used only once, after which the game or level is permanently unlocked.

Consumable: This type of product is used for items such as coins and powers. These can be purchased multiple times.

(78)

The preceding operation is repeated for each item that is to be sold, in order to finish creating all the inventory items that are on sale.

The portal will display all the products; this can be edited as required. All fields except the product identifier are editable.

The Price field and the Type field are very important, because they are the basis for the monetization of the video games.

In each sale, the OUYA store keeps 30 percent of the profit. The developer will receive the first payment when they have collected at least $150 and payments are made after every 30 days. Once you create a product, it cannot be removed. It should be noted that for testing purposes, any purchases made by the account that created the game will not be charged. This is imported if you are testing with more than one account.

Creating a game in the OUYA store

To begin receiving payments from the sales of the inventory or unlock levels, you need to create a video game by using your developer account and associating the products to the game. Take a look at the following screenshot:

Referensi

Dokumen terkait

Berdasarkan gambar 4 menunjukkan bahwa peserta Diklat Calon Pegawai Negeri Sipil mempersepsikan WoG di tempat kerja peserta Diklat telah diterapkan di instansi

Anggapan yang mengisyaratkan bahwa perempuan adalah makhluk yang tidak kompeten kecuali dalam urusan tugas rumah tangga menjadi kurang tepat ketika dihadapkan pada

Auditor harus menolak jika dikemudiaan hari klien tersebut meminta jasa audit lagi dikarenakan klien sudah tau auditor ini tidak memiliki kompetensi yang

Filtrona Indonesia dapat melakukan perencanaan dan pelaksanan untuk menyesuaikan tingkat kedatangan pesanan sesuai dengan kapasitas waktu yang tersedia dengan

Model pembelajaran Van Hiele berbantu Media ICT menjadi salah satu model belajar yang diharapkan mampu membantu meningkatkan kegiatan pembelajaran matematika terutama pada

Lapangan dengan judul “ Laporan Praktek Kerja Lapangan Pada Bagian Perekonomian Setko Administrasi Jakarta Barat Kantor Walikota Kota Adm.. Jakarta Barat ” dengan

lingkungan kerja yang seperti itu, karyawan harus tetap bekerja walaupun. lingkungan kerja

mempersilahkan penelpon menunggu dengan menekan tombol tanda tunggu. Kemudian praktikan melakukan konfirmasi kepada pimpinan terlebih dahulu apakah beliau bersedia berbicara dengan