DAN GALPIN: Hello, I'm Dan.
I'm a games developer advocate here at Google.
KRISTAN UCCELLO: And I'm Krispy, also a developer advocate
at Google, focused on games.
DAN GALPIN: In this video, we will
discuss the high-level aspects of building games
for the big screen.
KRISTAN UCCELLO: Not that big screen.
TVs, more like this one.
We're going to talk about what to avoid,
what to strive towards, and how Google APIs can help support
bringing your apps to the really big screen.
DAN GALPIN: Much of what we are about to show
you will apply in the broader context of the Android
ecosystem surrounding games.
In particular, when you consider how many Android devices are
able to connect to large displays using
MiraCast, DisplayPort, docking hardware,
as well as TVs with Android built in,
you have at your disposal a full suite of technology
that can put you in front of an engaged and growing audience.
There are a lot of mobile gamers in the world,
and they're looking to expand their gaming experience
onto the biggest screen in their home.
We hope that after watching this,
you will be inspired to make sure your users get the best
gaming experience on the big screen.
Android TVs are going to be coming soon
to a family room near you, and you'd better
make sure your games look good on it.
KRISTAN UCCELLO: With Android TV,
you get to build on your existing mobile development
experience.
You can now take full advantage of modern Android,
including NDK support, to craft your gaming
worlds in unimaginable ways.
It's even possible to extend the gaming experience
through second-screen interactions.
DAN GALPIN: TV game development might
seem to be overwhelming at first,
considering how many different aspects are involved.
In practice, though, it's not very different from what
you were already doing with your mobile game development.
Your projects can be managed in the same way.
You just need to factor in a few additional considerations.
KRISTAN UCCELLO: Let's start with
my personal favorite-- game controllers.
Many mobile games use gestures whereby
the user touches the sleek, glass screen in front of them
to interact with it.
This works fine on a phone, but not so much for TV screens.
DAN GALPIN: My arms certainly aren't long enough
to reach across my living room.
KRISTAN UCCELLO: Mine either.
On TV, mobile on-screen controls become useless.
DAN GALPIN: And even if my arms were long enough,
touching most TVs would just result in a messy screen.
KRISTAN UCCELLO: Yeah, not many people
have touchscreen TVs, which is why
you need to add touchscreen required
equal false in your application manifest.
It's implicit, which means you need to make the distinction.
DAN GALPIN: Luckily, every Android TV
will have a controller capable of producing directional pad
input, thus allowing the user to interact with the TV.
KRISTAN UCCELLO: Yup.
The Android reference controller is definitely
a developer's best friend.
It has exactly what you would expect a game controller
to have-- two analog sticks, D-pad, B, A, X, Y buttons,
left and right triggers, left and right
bumpers, Back button, Home button.
DAN GALPIN: It can also be paired
with any Bluetooth-capable Android device, which
means you can play controller-enabled games
on your phone or tablet as well.
KRISTAN UCCELLO: That's a very useful thing to do in general.
I'm always a little surprised and saddened
when I find a game that would be great to play
with a paired controller, only to discover it doesn't accept
the controller as valid input.
Even worse, some of these games have onscreen, simulated game
controllers.
DAN GALPIN: Yeah.
It makes me sad, too, because the developers have already
done the work of mapping to the same kinds of input,
but did not include the button mappings to the hardware.
KRISTAN UCCELLO: With all the game controller support
that exists with Android now, I don't
feel there's an excuse for that.
DAN GALPIN: Maybe they just don't know about it.
KRISTAN UCCELLO: Fair point.
But if you're watching this, you know about it.
DAN GALPIN: And knowing is half the battle.
KRISTAN UCCELLO: There's a few other things
to know too, though.
For instance, Android KitKat now supports the enumeration
of controllers.
And the game controllers that support this
will light up accordingly.
DAN GALPIN: In your application, you
make a call to getControllerNumber
to determine the controller driving the input event being
dealt with.
You can use this feature to make sure your little brother
or sister is playing as player two.
KRISTAN UCCELLO: You can now tell Google Play
that your game requires a game controller.
This could be used to stand out in the Android TV Play Store.
DAN GALPIN: You add the details to the application's manifest.
This example indicates that your game
must be used with a controller.
You can also list all the supported types
of controls for your game.
If you require either a multi-touch touchscreen
in gyro, or will work with a game controller,
then you can use feature groups to define it in the manifest.
KRISTAN UCCELLO: Now that you've added support
in the manifest and in game play, you aren't finished yet.
You need to think about how the players will
make menu selections, and provide non-game play input.
DAN GALPIN: One of the hardest things
that game developers have to deal
with is focus and selection.
Many games designed for touch just
don't yet have that concept.
KRISTAN UCCELLO: One place to start
would be to change the color of the selected text.
This alone is not enough, though.
In this example, you really can't
tell whether the Start Game or Settings is currently selected.
DAN GALPIN: This is a bit better.
KRISTAN UCCELLO: It would be even better
if it were animated.
You know, use motion to convey context.
DAN GALPIN: Done.
KRISTAN UCCELLO: A lot of games have buttons,
to connect to social services, et cetera.
These buttons are often in non-obvious places
for navigation.
DAN GALPIN: So this is easier to follow, right?
KRISTAN UCCELLO: Yeah, but you're
clearly not a UX designer.
BOTH: Remember, hire a good designer.
DAN GALPIN: One of my favorite recent games
did a great job with bringing their game to the TV
and navigating menus, except that it
was near impossible to actually purchase anything in the game
without touching the screen.
KRISTAN UCCELLO: It fell down when it came to purchases?
DAN GALPIN: No one had tried buying anything
with the controller.
Google Play in-app payment supports D-pad navigation out
of the box, with a UI that looks great on TV.
But you have to make sure the user can get there.
Making your navigation clear and understandable
is just as important outside of your main menu.
Make sure that your TV players aren't missing out.
KRISTAN UCCELLO: Let's shift gears now,
and discuss another essential item on the TV development
checklist.
Networking.
DAN GALPIN: So you're probably thinking
that you know about network detection on Android.
However, many developers forget to consider the possibility
of ethernet network connectivity when building for TV.
KRISTAN UCCELLO: Android TVs have
wired Ethernet ports to allow fast networking.
This means that Wi-Fi may be turned off,
but it's still connected to the internet.
Mobile developers have not had to worry much
about fixed, stationary devices.
It's not been common for developers
to build their network checking code
to consider connectivity beyond cellular or Wi-Fi.
DAN GALPIN: The good news is that it's really easy
to test for network connectivity without caring about the type,
using this snippet of code.
But if you really want to test whether wired networking is
active, you can check to see if the active network is
of type Ethernet.
Understanding the active hardware
allows your game to make good decisions
about using bandwidth.
Speaking of hardware, Android TVs
have graphics hardware exposed to the power of OpenGL ES.
You can draw out the full resolution of your TV.
KRISTAN UCCELLO: With many pixels
comes fillrate responsibility.
Use your pixel power wisely.
DAN GALPIN: Right.
It turns out that we're not quite
ready to draw graphically intense 4K scenes
with mobile GPUs.
Yet.
But there's an easy way to tell Android
that you want to render at a lower resolution.
If you're using Java, you can call
SurfaceHolder.setFixedSize, and that
will tell our composite engine to scale your smaller
window to the size of the screen.
KRISTAN UCCELLO: And if you're like almost every game
developer out there, and not implementing your graphics
in Java, you can change the size attribute of the target window.
DAN GALPIN: Hey, you can still use
GLSurfaceView with a native renderer.
The contexts are shared.
The key thing is, you want to make
sure your games look beautiful on a large screen.
Many of the shortcuts taken in mobile look
glaring on a large screen.
KRISTAN UCCELLO: Low-res textures, low poly count
models, geometry rounding errors, poor bit mappings.
Look, you know what I'm talking about here.
DAN GALPIN: Amen, brother.
KRISTAN UCCELLO: So with all this cool rendering,
there's another thing you have to consider
when developing for the TV screen.
DAN GALPIN: Other than epic sizeness?
KRISTAN UCCELLO: Overscan.
It's something that still inexplicably exists
on modern TVs.
Effectively, this means that some of your content
may be pushed beyond the visible edge of the display.
DAN GALPIN: So people should letterbox content
and have borders?
KRISTAN UCCELLO: No.
Just make sure you fill the screen.
But keep the important information
out of the outer 3% of the display.
DAN GALPIN: Like what kind of important information?
KRISTAN UCCELLO: HUDs, for example.
It's kind of important for people to see those.
It can become very annoying for the user to fiddle
with their TV settings trying to see the full UI of your game,
only to discover that no matter what settings they play with,
they still can't see the whole thing.
Keep the edges of your game free of critical information.
DAN GALPIN: I wish every developer knew about overscan,
and didn't have to know about overscan.
Let's move on to what developers can do with Google
Play game services.
KRISTAN UCCELLO: Google Play game services
have been optimized for Android TV with easy navigation
and a great new look and feel.
DAN GALPIN: You can also utilize achievement, leader boards,
quests, and more.
KRISTAN UCCELLO: More being multi-player support.
DAN GALPIN: Yes.
You can utilize turn-based multi-player
and real-time multi-player from Play Services.
There's even C++ support for turn-based multi-player.
KRISTAN UCCELLO: I want to see some awesome multi-player
experiences with people playing on their tablets
in the same room so I can hear them groan.
Second-screen experiences in the living room
are growing in number.
Game saves could be a great tool for keeping your users engaged.
Part of extending the mobile experiences to the TV
means being able to continue playing
on the biggest, baddest, most overscan
prone screen in my house.
DAN GALPIN: Cooperative multi-player
is also worthwhile.
Play games has a great API for peer-to-peer multi-player
with up to eight players.
It's so much cooler if some of them can be on TVs.
KRISTAN UCCELLO: Everything's better on TV.
You know, you can unlock your RTFM achievement.
DAN GALPIN: Wait, what achievement was that?
KRISTAN UCCELLO: Read the full manual.
It's not exactly a manual, but rather, a website.
We're always trying to make it better.
DAN GALPIN: And on that note, help us make TV games better.
In this short talk, we covered a lot of ground,
but there is always more to explore.
KRISTAN UCCELLO: In summary, we looked
at game controllers, and the importance of navigation,
focus, and selection.
Networking, and why it's not sufficient to just
look for Wi-Fi.
Graphics rendering on the TV and the challenges
that overscan can present.
And finally, Google Play services, and how it can help
bring about the best game experiences for your users
on TV.
DAN GALPIN: More details about how to get your game ready
for TV can be found on the new developer site for Android TV,
including important manifest changes
to work with our new lean-back experience.
You can get in touch with us at +DanGalpin and @dagalpin.
KRISTAN UCCELLO: And +KristanUccello, or @_krispy_.
BOTH: Now go build something fun, engaging, and big for us
to play on TV!