Droidcon London 2013 - Coding for Android consoles
-
Upload
al-sutton -
Category
Technology
-
view
491 -
download
5
description
Transcript of Droidcon London 2013 - Coding for Android consoles
![Page 1: Droidcon London 2013 - Coding for Android consoles](https://reader034.fdocuments.in/reader034/viewer/2022051513/5454ee1eb1af9f39378b460a/html5/thumbnails/1.jpg)
Funky Android Ltd. http://www.funkyandroid.com/
Coding for Android Consoles
Al Sutton, Funky Android Ltd.
![Page 2: Droidcon London 2013 - Coding for Android consoles](https://reader034.fdocuments.in/reader034/viewer/2022051513/5454ee1eb1af9f39378b460a/html5/thumbnails/2.jpg)
www.funkyandroid.com
What is a console?
Designed for use on a TV
Discrete Controllers
No cellular modem
Mains Powered
![Page 3: Droidcon London 2013 - Coding for Android consoles](https://reader034.fdocuments.in/reader034/viewer/2022051513/5454ee1eb1af9f39378b460a/html5/thumbnails/3.jpg)
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
![Page 4: Droidcon London 2013 - Coding for Android consoles](https://reader034.fdocuments.in/reader034/viewer/2022051513/5454ee1eb1af9f39378b460a/html5/thumbnails/4.jpg)
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...
![Page 5: Droidcon London 2013 - Coding for Android consoles](https://reader034.fdocuments.in/reader034/viewer/2022051513/5454ee1eb1af9f39378b460a/html5/thumbnails/5.jpg)
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?)
![Page 6: Droidcon London 2013 - Coding for Android consoles](https://reader034.fdocuments.in/reader034/viewer/2022051513/5454ee1eb1af9f39378b460a/html5/thumbnails/6.jpg)
www.funkyandroid.com
Aren’t they just ‘phones connected to a TV?
No.
![Page 7: Droidcon London 2013 - Coding for Android consoles](https://reader034.fdocuments.in/reader034/viewer/2022051513/5454ee1eb1af9f39378b460a/html5/thumbnails/7.jpg)
www.funkyandroid.com
Aren’t they just ‘phones connected to a TV?
Seriously - No.
![Page 8: Droidcon London 2013 - Coding for Android consoles](https://reader034.fdocuments.in/reader034/viewer/2022051513/5454ee1eb1af9f39378b460a/html5/thumbnails/8.jpg)
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)
![Page 9: Droidcon London 2013 - Coding for Android consoles](https://reader034.fdocuments.in/reader034/viewer/2022051513/5454ee1eb1af9f39378b460a/html5/thumbnails/9.jpg)
www.funkyandroid.com
What about WiFi Tablets connected to a TV?
Yes and No
![Page 10: Droidcon London 2013 - Coding for Android consoles](https://reader034.fdocuments.in/reader034/viewer/2022051513/5454ee1eb1af9f39378b460a/html5/thumbnails/10.jpg)
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
![Page 11: Droidcon London 2013 - Coding for Android consoles](https://reader034.fdocuments.in/reader034/viewer/2022051513/5454ee1eb1af9f39378b460a/html5/thumbnails/11.jpg)
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!
![Page 12: Droidcon London 2013 - Coding for Android consoles](https://reader034.fdocuments.in/reader034/viewer/2022051513/5454ee1eb1af9f39378b460a/html5/thumbnails/12.jpg)
www.funkyandroid.com
Going console
![Page 13: Droidcon London 2013 - Coding for Android consoles](https://reader034.fdocuments.in/reader034/viewer/2022051513/5454ee1eb1af9f39378b460a/html5/thumbnails/13.jpg)
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.
![Page 14: Droidcon London 2013 - Coding for Android consoles](https://reader034.fdocuments.in/reader034/viewer/2022051513/5454ee1eb1af9f39378b460a/html5/thumbnails/14.jpg)
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.
![Page 15: Droidcon London 2013 - Coding for Android consoles](https://reader034.fdocuments.in/reader034/viewer/2022051513/5454ee1eb1af9f39378b460a/html5/thumbnails/15.jpg)
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)
![Page 16: Droidcon London 2013 - Coding for Android consoles](https://reader034.fdocuments.in/reader034/viewer/2022051513/5454ee1eb1af9f39378b460a/html5/thumbnails/16.jpg)
www.funkyandroid.com
Control Sticks
• Stick movements are reported as MotionEvent objects passed to onGenericMotionEvent.
•MotionEvent.getDeviceId allows you to identify the controller
![Page 17: Droidcon London 2013 - Coding for Android consoles](https://reader034.fdocuments.in/reader034/viewer/2022051513/5454ee1eb1af9f39378b460a/html5/thumbnails/17.jpg)
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
![Page 18: Droidcon London 2013 - Coding for Android consoles](https://reader034.fdocuments.in/reader034/viewer/2022051513/5454ee1eb1af9f39378b460a/html5/thumbnails/18.jpg)
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.
![Page 19: Droidcon London 2013 - Coding for Android consoles](https://reader034.fdocuments.in/reader034/viewer/2022051513/5454ee1eb1af9f39378b460a/html5/thumbnails/19.jpg)
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
![Page 20: Droidcon London 2013 - Coding for Android consoles](https://reader034.fdocuments.in/reader034/viewer/2022051513/5454ee1eb1af9f39378b460a/html5/thumbnails/20.jpg)
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.
![Page 21: Droidcon London 2013 - Coding for Android consoles](https://reader034.fdocuments.in/reader034/viewer/2022051513/5454ee1eb1af9f39378b460a/html5/thumbnails/21.jpg)
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.
![Page 22: Droidcon London 2013 - Coding for Android consoles](https://reader034.fdocuments.in/reader034/viewer/2022051513/5454ee1eb1af9f39378b460a/html5/thumbnails/22.jpg)
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
![Page 23: Droidcon London 2013 - Coding for Android consoles](https://reader034.fdocuments.in/reader034/viewer/2022051513/5454ee1eb1af9f39378b460a/html5/thumbnails/23.jpg)
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
![Page 24: Droidcon London 2013 - Coding for Android consoles](https://reader034.fdocuments.in/reader034/viewer/2022051513/5454ee1eb1af9f39378b460a/html5/thumbnails/24.jpg)
Funky Android Ltd. http://www.funkyandroid.com/
Funky Android Ltd. http://www.funkyandroid.com/
Questions?