android tv-Building TV Games

desaco發表於2016-01-20

 The television screen presents a number of considerations that may be new to mobile game developers. These areas include its large size, its control scheme, and the fact that all players are viewing it simultaneously.

 A TV is always sideways: You can’t turn it, and there is no portrait orientation. Always design your TV games to be displayed in landscape mode.

 Not all game controllers provide Start, Search, or Menu buttons. Be sure your UI does not depend upon the use of these buttons.

 The Android TV home screen displays games in a separate row from regular apps. To make your game appear in the list of games, set the android:isGame attribute to "true" in your app manifest's <application> tag. For example:

<application
    ...
    android:isGame="true"
    ...
>

Games controllers may not be available or active for users of a TV device. In order to properly inform users that your game supports a game controller, you must include the following entry in your app manifest:

  <uses-feature android:name="android.hardware.gamepad" android:required="false"/>

Note: When specifying android:hardware:gamepad support, do not set the android:required attribute to"true". If you do this, users won’t be able to install your app on TV devices.

 A game offering a multiplayer experience must allow at least two players to enter a room. For further information about multiplayer games in Android, see the Real-time Multiplayer and Turn-based Multiplayer documentation on the Android developer site.

 Provide a consistent and obvious UI element that lets the user exit the game gracefully. This element should be accessible with the D-pad navigation buttons. Do this instead of relying on the Home button to provide an exit, as that is not consistent nor reliable across different controllers.

 Do not enable web browsing in games for Android TV. Android TV does not support a web browser.

Note: You can use the WebView class for logins to services like Google+ and Facebook.

 Games frequently need greater bandwidth to provide optimum performance, and many users prefer ethernet to WiFi to provide that performance. Your app should check for both WiFi and ethernet connections. If your app is for TV only, you do not need to check for 3G/LTE service as you would for a mobile app.

相關文章