Deploying Directly To An OUYA Using MonoGame/Visual Studio

Deploying Directly To An OUYA

Let’s face it – the Android emulator almost always sucks. It’s perhaps the most broken bit of an otherwise OK development process for Android.

Nothing beats the fidelity of testing on the real hardware but you need to jump through a few hoops first.

For MonoGame with the Visual Studio plugin you can launch directly into the hardware, but there are two gotchas.

  1. You need to change the USB driver for the OUYA to the Google Android SDK ADB (Android Debug Bridge) device so that ADB can interact with it.
  2. Visual Studio/MonoGame will only see devices plugged in when they launch. Plug in your device and make sure it is visible using adb devices from the command line before you start Visual Studio.

Updating The USB Driver

When you run adb devices from the command line and it responds with an empty list…

21-07-2013 11-52-42 AM

…and your device is plugged in, then you will probably need to update the USB driver to be the Android SDK ADB one supplied by Google.

  1. Open Device Manager – Find the OUYA.
  2. Right-Click, Update Driver Software…
  3. Choose “Browse my computer for driver software”
  4. Choose “Let me pick from a list of device drivers on my computer”
  5. Click “Have Disk…” (there may be a step before this similar to “Show All Devices”)
  6. Browse and Select the .INF file %APPDATA%\local\Android\android-sdk\extras\google\usb_driver\
  7. Choose android_winusb.inf
  8. Click ok.
  9. Select the ADB Interface (not the composite one)
  10. Finish the Wizard.

It should now appear as an Android Device with an ADB Interface.

20-07-2013 9-44-36 PM

Running adb devices from the command line shows my OUYAconsole.

21-07-2013 11-52-14 AM

 

 

Job Done!

Order is Important

In Visual Studio 2012 if you can’t see your device, try restarting Visual Studio or rebooting..

You device should be an option when you F5 or Run/Debug or Deploy from Visual Studio.

20-07-2013 10-29-43 PM

Some Porting Stories From Other Developers

http://ballerindustries.com/2013/05/lessons-from-a-legendary-monogame-android-programmer/

http://monogame.net/news/2013/02/09/porting-armed-ouya

Performance

Out of the box performance for just drawing text, rendering images and playing audio is fine. My unoptimised hexagon vector engine that runs at 60fps fine on my PC won’t get above 10fps on the OUYA.

One thing I might try is using a scaled down 720p render target and blit up to the 1080p of the OUYA,

https://github.com/CartBlanche/MonoGame-Samples/blob/master/RenderTarget2DSample/Game1.cs

 

About James McParlane

CTO Massive Interactive. Ex Computer Whiz Kid - Now Grumpy Old Guru.
This entry was posted in MonoGame, TheGame. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s