Droidcon London 2013 - Coding for Android consoles

Post on 01-Nov-2014

490 views 5 download

Tags:

description

My Droidcon 2013 talk about writing software for Android based consoles. It gives a high level introduction for those interested in what might be involved.

Transcript of Droidcon London 2013 - Coding for Android consoles

Funky Android Ltd. http://www.funkyandroid.com/

Coding for Android Consoles

Al Sutton, Funky Android Ltd.

www.funkyandroid.com

What is a console?

Designed for use on a TV

Discrete Controllers

No cellular modem

Mains Powered

www.funkyandroid.com

Why would I want to?

Video made by OUYA, Inc.

Hear the reasons directly from Developers;

http://www.youtube.com/watch?v=QdQZkh8Z-_E

www.funkyandroid.com

AvailabilityOuya is currently the main player in console focused

Android gaming

UK & US since 25th June

Germany, France, Italy, Austria, Switzerland, Spain, Belgium, Netherlands, Luxembourg, Sweden, Norway, Denmark, Finland, and more to come...

www.funkyandroid.com

AvailabilityOthers are coming, so there’s an opportunity to get it

right before the market grows

GameStick - 29th October (Monday) Mad Catz M.O.J.O - 10th December

GamePop - Unknown

Rumoured products from Google & Amazon (Google Android TV?)

www.funkyandroid.com

Aren’t they just ‘phones connected to a TV?

No.

www.funkyandroid.com

Aren’t they just ‘phones connected to a TV?

Seriously - No.

www.funkyandroid.com

Aren’t they just ‘phones connected to a TV?

Wrong orientation

No need for cellular data transfer “tricks”

No higher priority interruptions (e.g. incoming call during a game)

www.funkyandroid.com

What about WiFi Tablets connected to a TV?

Yes and No

www.funkyandroid.com

What about WiFi Tablets connected to a TV?

The “Yes” part

Right orientation

Same APIs

Many tablets offer a similar resolution to a TV

www.funkyandroid.com

What about WiFi Tablets connected to a TV?

The “No” partConsoles don’t have a touch screen

Tablets tend to belong to a person, a console tends to be shared

Not restricted by battery conservation measures

Overscan!

www.funkyandroid.com

Going console

www.funkyandroid.com

Google Android TV

• Not specially designed to be a games console, but shares a lot of the user experience issues

• Renaming indicates a re-focus on Android, so expect more information.

www.funkyandroid.com

Control

• No touch screen is the biggest change

• Not every game should be ported (gestures, object tapping, etc.)

• Think carefully, it’s users main method of judging your app.

www.funkyandroid.com

OEM SDKs

• Control methods tend to be connivence code rather than a requirement

• Button mapping(e.g. OUYA ODK BUTTON_O is mapped to Androids KEYCODE_BUTTON_A)

• Device matching (player x = device y)

• Main reason for using an OEM SDK : Monetization (e.g. In-App Purchasing)

www.funkyandroid.com

Control Sticks

• Stick movements are reported as MotionEvent objects passed to onGenericMotionEvent.

•MotionEvent.getDeviceId allows you to identify the controller

www.funkyandroid.com

Menu Navigation

• Use D-Pad controls

• Use the nextFocus.... XML attributes to control the flow

• Lots of useful tips at https://developer.android.com/training/tv/optimizing-navigation-tv.html

www.funkyandroid.com

It’s not personal

• Consoles tend to be shared.

• When storing personal/sensitive information allow for an unlock method.

• Don’t assume the next time your game is played the same player will be playing it.

www.funkyandroid.com

Local multi-player

• android.view.InputEvent; • getDeviceId to determine the device

• getDevice for more details about the device

• Device Id may change between device connections

www.funkyandroid.com

Local multi-player

• If possible allow drop-ins; Players who can join part way through a game.

• Long running elimination games leave people feeling left out.

• Look at a couple of minutes per round as maximum lock out.

www.funkyandroid.com

Battery Constraints

• What battery constraints?

• There are limits; Be nice to the hardware

• Batching transfers can cause stuttering; Background slow loading is an option.

www.funkyandroid.com

Overscan

• TV based; TV rules

• Visible to the app, but invisible to the user.

• No guarantee of a well calibrated display

• Edge information gets lost

www.funkyandroid.com

Overscan

• Rough guide; Up to 15% of the width and height can be lost

• Simplistic borders can make users think their unit is faulty

• Be creative

Funky Android Ltd. http://www.funkyandroid.com/

Funky Android Ltd. http://www.funkyandroid.com/

Questions?