Droidcon London 2013 - Coding for Android consoles


Published on

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.

  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Droidcon London 2013 - Coding for Android consoles

  1. 1. Coding for Android Consoles Al Sutton, Funky Android Ltd. Funky Android Ltd. http://www.funkyandroid.com/
  2. 2. What is a console? Designed for use on a TV Discrete Controllers No cellular modem Mains Powered www.funkyandroid.com
  3. 3. Why would I want to? Hear the reasons directly from Developers; http://www.youtube.com/watch?v=QdQZkh8Z-_E Video made by OUYA, Inc. www.funkyandroid.com
  4. 4. Availability Ouya 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...
  5. 5. Availability Others 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
  6. 6. Aren’t they just ‘phones connected to a TV? No. www.funkyandroid.com
  7. 7. Aren’t they just ‘phones connected to a TV? Seriously - No. www.funkyandroid.com
  8. 8. 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
  9. 9. What about WiFi Tablets connected to a TV? Yes and No www.funkyandroid.com
  10. 10. 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
  11. 11. What about WiFi Tablets connected to a TV? The “No” part Consoles 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
  12. 12. Going console www.funkyandroid.com
  13. 13. 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
  14. 14. 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
  15. 15. 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
  16. 16. Control Sticks • Stick movements are reported as MotionEvent objects passed to onGenericMotionEvent. • MotionEvent.getDeviceId allows you to identify the controller www.funkyandroid.com
  17. 17. 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
  18. 18. 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
  19. 19. 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
  20. 20. 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
  21. 21. 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
  22. 22. 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
  23. 23. 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 www.funkyandroid.com
  24. 24. Questions? Funky Android Ltd. http://www.funkyandroid.com/