Google I/O 2013 – Practical Android Games Development
Articles Blog

Google I/O 2013 – Practical Android Games Development

September 7, 2019

DANIEL GALPIN: Hello. I don’t mean to disappoint
anyone in the audience here. But for anyone who came to see
Practical Android Game Development, that is actually
not going to be the title of this session. We wanted to have a place
holder, so that people who were coming to Google I/O and
who were game developers could have a way of planning
their schedule out before they got here. So we are actually going to be
doing something related to a little announcement we did
during the keynote. And so once again, this
is going to be Game Services in Practice. I’m Dan Galpin, a Developer
Advocate for Android Games. JENNIE LEES: Jennie Lees, I’m a
Product Manager on the Games Platform team. JAEWOONG JUNG: I’m Jaewoong
Jung, the Tech Lead of the Game Developer Experience
team. DANIEL GALPIN: So that being
said, this is our second talk on the Game Services platform. And so what this means is, if
you haven’t listened to the keynote, don’t understand what
Games Services are, don’t program, you might want to leave
the room, because this might not make any sense. All right. Every game begins with an
idea, an original idea. And perhaps, it’s that one in a
million idea that carves out a niche on Google Play. So the question is, how do we
squeeze as much money out of it as we possibly can. For that, we need a PM. Jenny– JENNIE LEES: So money– I’ve heard that seasonal content
is really the thing on Google Play these days. I think I want “Angry Pumpkins.”
I want “Angry Fruit Fall.” JAEWOONG JUNG: Wait guys, I’m
so tired of hearing about casual games. How about making a
hardcore edition? DANIEL GALPIN: Oh, no, no. My favorite version is the
shameless movie tie-in. But I digress. The real question is, how do
we use Google Play Games Services best, in every facet of
the life cycle of the game? From when you’re developing,
testing, publishing, or updating, and managing your
gaming community, we’re going to talk about all of these
things in the talk. So let’s start with
development. And just for a show of hands–
in the audience, how many people here are actually
developers? All right. We’ve got the right
people here. That’s awesome. Despite all that stuff I said
earlier, let’s quickly review how we set up a game in the
Google Play developer console. So one path is, you
upload an APK. And this one is going
to be signed with your production signature. So it’s pretty much like you
do anything else in your publishing in Google Play. And after that is complete, we
notice we have this really cool new tab here that
looks like a game controller, sort of. As you can see, I’ve already
been experimenting with one of the samples, before I dove into
creating my own project, which everyone should do. Because experimenting is good,
and you’ll find out what you don’t know. But we’re going to
add a new game. Then, we get to set up the
services for our app, which doesn’t use Google’s APIs
yet, which makes sense. A lot of people aren’t yet. But they should. And then we add the “Angry
Fruit” Package Name. So going on from there, we end
up getting this fabulous dialogue telling us about
branding information, which I’m not going to cover. But other people will cover
these things in another talk. And then finally, after all
of this, there we are. We now get to the fun part. So what we’ve done now is, we’ve
actually extracted from that APK file the SHA1
Certificate Fingerprint that you’re going to be using
for that client. And this actually is creating
a client on Google’s Apiary dashboard, which is the way
these things are all designed. The dashboard,
that’s an internal name. And note that we end up getting
this lovely the screen here, which contains this very
large client ID and this 12 digit number, which is
the application ID. And this is what we actually
put into the package, so again, not that whole thing. So finally, we end up getting
into some code. And very simply, this is
our manifest file. And that is the little section
there that contains the App ID that we’re sending to
these services. Now, notice that we
actually have two separate services here. One of them is for App State. And the other one
is for Games. And the reason why is, App State
obviously has a lot of applications beyond games. And that is the App ID that
we’re going to place in. Now, notice that it
is a resource. And the reason we’re doing that
is, because otherwise, the Android Resource System
will actually interpret it as a number. We want it to be a string. So don’t just put it in
the manifest file. And then, here we are. There’s our App ID. And we put it inside
of our resources. So very simply, now we set up
our program for launch. Except there’s one problem here,
because we have a game that’ll work with the Play
Services API, signed with our release keys, which
is what we’re going to actually publish. However, no one actually
develops an Android game, using the release keys. Or if you are, you really
shouldn’t, because you should protect that key store. That is your identity,
your digital identity on Google Play. So how do we make it work
with the Debug Key? Well, that’s very simply we
go and link another app. And the other app has the same
package name as our regular application. And we end up getting a blank
value for the SHA1 Because we didn’t actually upload
that APK. So where do we get
this value from? Well, it depends on
what platform you’re actually running. We create this automatically for
you on Linux, Windows, or Vista Plus, or whatever. The important thing is that, you
should probably take and actually go through the step
of sharing the same Debug Keystore across your developers,
because we only allow you to create a limited
number of client IDs for your game. So it’s a good practice
to be, in any case. And then, after all of this,
we actually get the SHA fingerprint by using Keytool. So now we can take that
fingerprint, dump it back into this new client. And now we are ready. And all of our developers will
actually be able to develop against Play Services. Now we’re in a good place. But what about actually
integrating the Games APIs? Jenny, what’s the deal
with branding? JENNIE LEES: So we’ve come up
with some guidelines to help you integrate the Games Services
and make a really consistent experience
for your players. First of all, two very
important notes– to be a Games Services
customer, you need to do two things. First of all, you need
to use Sign-In. And then, because signing in
without any features is useless, you also need
to have achievements. So let’s start by looking
at Sign-In. Because we use Google+ for our
sign in and our identity, so should you, for the branding. We have a very small, red
g+ logo you can use. Or if you want something bigger,
there’s a full version with Sign-In. In a game context though, if you
just stick that red button somewhere, with no explanation,
no context, it’s kind of confusing. Why would I ever tap that,
if I’m a player? So we want you to really give an
upsell, explain what you’re using it for, what you’re
going to do with it, why should the player bother? There are all these great
features that are waiting to be unlocked when they sign in. So let them understand that. And this is from “Save the
Puppies.” They did a great job in just making it
really clear. You want to collect
achievements. You want to compete
with your friends. Come right in. For the end game features
themselves, we have icons to fit each of them, that you can
use and customize, in texture and your game’s look and feel. You don’t have to use them
as these flat vectors. And we do provide our own
interface for leaderboards and achievements. Now, we ask that you put in a
way to get to that interface. And we really thoroughly
encourage you to mess about with our data APIs and customize
skin, use the data in your own games UI,
as much as you like. If you want to put a little
button to bring up our UI, you should use our branding to make
it really clear to the player what’s going to happen
and make it a really consistent experience. The controller is the main
symbol for this. And as you’ll see in the games
that are live on the Play Store today, the controller is
used a lot to say, this is where the games services are. This is where the cool
stuff lives. And if you have a page, like a
menu, which has achievements and leaderboards and maybe even
multiplayer, you don’t want to put like three
controllers. That means absolutely nothing. So you can use the controller
as like a contextual key and the individual feature
icons for the links. Let’s look at that
in practice. So you can see, as with the
HandyGames screen shot we have on the bottom there, they’ve
used the controller as like tying things in. And they’ve used individual
icons, with completely their own look and feel there,
to launch our UIs. You have to be boring. Just keep one really simple
principle in mind. We don’t want people
to be confused, surprised, upset, or angry. Angry? I would be angry, if I played
a game for hours. And right at the end of all
that play, I’m told, hey, maybe you could sign
in, through some obscure menu somewhere. And none of that progress
gets synced. None of that counted, because
I wasn’t signed in. So keep people nice and give
them a reason to use the services and not get angry at
you, because that’s bad. DANIEL GALPIN: And of course,
you can find all of these branding guidelines and assets
in our Developer documentation. JENNIE LEES: So let’s go back
to our friend, the wrathful watermelon. DANIEL GALPIN: Wrathful
ninja watermelon. JENNIE LEES: Oh, yeah. So we’re ready to go. Aren’t we, Dan? We’ve got our game. It’s glorious. It’s original. It’s creative. It’s ready for beta testing. JAEWOONG JUNG: Wait, we have
a lot of fans in Korea. Over half of our testers
are international. I want to test [KOREAN], as
well as “Angry Fruit.” JENNIE LEES: That is
a great point. So let’s talk about
Localization. Oh wait, there’s an error
on that slide, Dan. That’s better. Thank you. So I wanted to walk you guys
through some of our really neat Localization support. To localize your game’s
integration is pretty simple. You add languages in the
console, provide translations. And we do all the hard
work for you. We pipe it all through to all
of the relevant places. If you go to the root of your
game configuration and hit Add Translations, you can select
your languages. And off you go. Now remember, once you’ve added
a language here, you’re committing to providing
translations for all the strings that you send
us, all the achievement names, et cetera. And we don’t want you to tick
all the boxes, so that it looks like you’re really
Localized, but not actually do it. You can also change the
default locale here. So if you don’t want
English to be the default, you can do that. For leaderboards and
achievements, translation are super, super simple. When your game is in Draft Mode,
you just type in the new title and go. If you don’t do it, you can
get a nice, big error. It’s says pretty clear what’s
going on there. I also want to talk about
leaderboard formatting. We have this really nifty stuff
here that’s really nice for localization. And it has other applications
too. First of all, you can have
currency leaderboards. And you can set that to a
number of international currencies. So we use the symbol for
that currency when we display the score. You might think though, that for
international currencies, you can just put the local
currency in for each locale, and it will format the
score locally. However, that is not the case. So if you set your score to Yen
here, if I go back to US English, it will be Yen. And you might not want that. So this is a really good use
case for our custom score formatting, not the only
one, by a long way. But it’s one I wanted
to highlight here. If I wanted to use dollars in
America and Yen in Japan, I configure an integer and
add a custom unit. Once I’ve done that, I’ve
committed to translating the plurals for that language,
for that unit. American English, it’s easy. Japanese, I’ve decided just to
use the symbol, because I want to make sure I get it right. So I’m just going to do that. And as you’ll notice,
the plural options are different there. We’re pretty comprehensive
about that. So if you go to a language such
as Polish, you’ll see we ask you to pluralize all
the different plural cases in that language. So if you’re putting in
translation requests to external team, you might want
to bear that in mind. You can also use this as
a guideline when you’re designing your leaderboards
in the first place. It might spark off
a few ideas. You can be pretty creative
as well. But there’s a couple
of constraints. It’s always a suffix. And in right to left languages, it would be a prefix. So what do you need? When you’ve added a language,
you’re saying, I’m going to translate all this stuff. We make it pretty easy in that,
if you’re testing, the descriptions can be optional. And the leaderboard units, as
you saw, you can change it around between different
languages. So you can have a custom one, in
English, and just plain old integer for the rest of them. If we don’t have the unit, then
we’ll just leave it off. A couple of nuances as well– so you know, in the Play Store,
they have Localized Image Assets. We do not have that yet. So make sure that your images
that you use for Achievement icons, leaderboard icons,
and so on are language independent. Otherwise, it looks
kind of weird. You also want to make sure
that, although you have a store entry and you have
configured translations for what appears in the Play Store
app, on other countries. This is unrelated to
what appears in the Game Services in Game. So if you’ve set all those
translations, you may have to just click them across. And also, if you’re end game
locales are from the ones you have configured, there will be
a slight mismatch there. So there could be cases where
your game supports different languages to the ones you’ve put
in the Play Store config. Some people do that. We also do some pretty
cool fall-backs. So if you have a Canadian-French
player, but you’ve only got French-French
translations, we’ll do that. We won’t make them go English,
which is really nice. All right. So I think we’re
ready to test. We’re good. How do we get some
beta testers? DANIEL GALPIN: All right. So again, to make things clear,
Game Services in the console are actually separate
from the regular Google Play Developer console. And part of the reason why is,
obviously, Game Services covers multiple platforms. And so when you’re actually
talking about beta testers, you’re actually talking about
beta testers that could be for any of these platforms. We have a separate place
in the services to actually set that up. And it’s very simple. You just literally go
to Play Services. And you click Add Testers. And this is important. Because of course,
only testers can test unpublished games. And you kind of knew that one. We’re kind of smart for you. We also make sure that only
testers can receive multiplayer invites. And so you won’t accidentally
leak a really cool multiplayer game that you’re working
on, just because you are testing it. Another thing, of course,
that’s really useful for developers and was asked very
early on is, please give me the ability to retest
Achievements. So at you can retest them
over and over again. And finally, you might want to
reset scores on leaderboards. And if you’re doing multiplayer,
you might actually want to eliminate
all your multiplayer invites or rooms. So how do your testers
do this? Do you need to give each one of
your testers access to the Google Developer console? No. Actually, the good news is that,
you can build a website. So your testers can reset
their own achievements, leaderboards, and multiplayer
rooms. And Jaewoong will show
us how to do it. JAEWOONG JUNG: Wow. It’s finally my turn. OK., how do you build a website
like this, where testers can reset
their game data? We must start with
registering our website on the Play console. Go to the Linked Apps tab,
click on that button, and choose Web, and enter basic
information, like the Launch URL, Save, and Continue. And click Authorize Your
App Now button. Otherwise, Google cannot
verify API calls from your site. Enter basic branding
information. This is only required
once for a project. And enter the Host Name. Only API calls from this host
will be authorized. And finally, you’re
given a Client ID. But unlike Android Apps, you
need the whole Client ID string to get all the tokens
from your website. So it’s time to see how you
actually build your test website with the Client ID. Users must be signed into
Google to use the Games Services API. So let’s add our Google+
Sign-In button to our website first. This is the standard Google+
Sign-In code, with a modified scope for the Games Services. And you want to specify the
Client ID here, like this. Also, handle the Sign-In
result with a callback function like this. And this is a very
simple version. It hides the Sign-In button
when it is successful. And it loads the error when
there are some problems. Now, the user is authorized
then, ready to call Games Services APIs. As an example, I’m going to
show you how to reset an achievement, while other restart
methods [INAUDIBLE] the same. Once the Sign-In is done, you’re
given this special object called G-A-P-I, or gapi,
which is provided by Google API JavaScript Library. I remembered it. It provides many functions. But especially, this
client.request function is very handy, when you make
general API calls. You specify an API path. In this case, we’re specifying
a path to set an achievement with an Achievement ID. And specify a Calling Method,
like Post, Put, Get, or Delete, and a callback
function. And it’s done. How simple is that? So now the Achievement will be
reset on the tester’s device. Dan, is that right? DANIEL GALPIN: Not exactly. So right now, we’ve told the
server, great reset the Achievement. So the Achievement has now
been reset on the server. But it actually hasn’t synced
to the device yet. And it doesn’t sync immediately
there, unless you go and display our UI. So if you’re not displaying our
UI, you’re going to want to have the ability for your
testers to bring up the UI within your application. JENNIE LEES: What if I don’t
want to build a website, Dan? DANIEL GALPIN: All
right, all right. That’s a good point. So how many people here
don’t want to build a website for this? So the good news is that you can
actually reset them on the device too. It’s a little tricky, because
you actually have to go through the same flow. The good news is that we
actually offer you some APIs that help. First of all, you’re going to
need up to two additional permissions. The great thing about using Play
Game Services is that you don’t actually need to have
internet permission or accounts permission. We handle all that in the
background for you. But if you’re going
to want to reset Achievements for your testers. In a debug version of your
application, you’re going to need these two additional
permissions, potentially. And after Sign-In is complete,
then you can get the current account name. Now, what’s great about this,
is that you notice these two things in the bottom are
just very simple calls. And that’s because they’re
taking advantage of something called Base Game Activity, which
is a wrapper for our client library that handles a
lot of the boiler-plate code for handling errors
right for you. And it’s part of Game Helper. And you can actually download
this off of the Developer site. And it gives you a lot of
insight into handling all of these cases in Google Play
Games Services– very, very cool. So then we just have to
get the Off Token. So now, the one thing that’s
interesting about getting the Off Token is, we want to make
sure that the Scope that we’re using, that we’re trying to
fetch, matches the scope we’re signing in with. So for example, if you wanted
to use both the Cloud Save APIs for App State and the Games
APIs, those are actually two separate Scopes. So you’re going to want to
make sure they match. Otherwise, the system will go
and prompt you and say, you don’t have a credential that
matches these Scopes. So we need to fetch that. So it’s very, very
easy to do that. If you’re using
BaseGameActivity/gamehelper, you can just call getScopes. And it’ll nicely return
that for you. If you’re not, that’s how
you construct them. Then, we just fetch the token
from GoogleAuthUtil. Now, you note here, we’re not
handling important exceptions like
UserRecoverableAuthException. After all, these are
just your testers. They’ll see the log messages. Right? In all how seriousness, no,
there is a little bit more work to be done here. And there are some things
that can go wrong. First of all, as I
said before, your Scope must match exactly. Otherwise, you’ll get a
UserRecoverableAuthException. And of course, your token
may have expired. So there’s nothing– when you
actually call getToken, there’s nothing that’s part
of that call that goes and automatically refreshes
the token. It’s a pretty low-level API. But once you’ve done all this
work, you can pretty much do the exact same thing we
did on the server. Make a little HTTP client, call
that Rest API, and boom, we’ve now reset the
achievement. Now even though we’ve done
this on the device. We still have to go and call
the Games Services UI for displaying Achievements, in
order to force the client to pull those down. It’s also just as easy to call
the Management API, if you want to reset the scores. As long as you have
that token, the world is your oyster. And again, you’ll want to
invalidate the cache. You can also do it by calling
one of our APIs here and simply saying, forceReload
on all of these things– so very, very easy to make sure
that you continue to test leaderboards and Achievements,
again and again and again. So now, we’re ready
to publish. It’s time for the PM to
take all the credit. JENNIE LEES: This is
my favorite part, pushing stuff live– DANIEL GALPIN: Taking
the credit. JENNIE LEES: –breaking out of
there, fixing all the bugs, making people do it for me. So lets get our game
out there. But a few things just to bear
in mind, before you go live, before you hit the big
switch, so to speak. First of all, assets, we’ve
seen this in testing, that people forget to change their
placeholder assets. You need to make sure that you
have all the assets there and that you update them from
placeholders and don’t just have 512 x 512. Insert Image Here going out
there in the world. That’s not so good. Our console does give you a nice
little checklist, when you go to publish, saying, hey,
we’re missing this stuff. So it’s pretty simple
to make sure you’ve got that all right. And if you had descriptions
that were missing or placeholder translations,
like [INAUDIBLE] or something, you probably
want to change those too. So as Dan mentioned, we have
two different kinds of publishing. You can publish both to the
services and to Google Play. Now, in which order? Well, pretty simple, right,
you want to make sure the services work, before you
actually upload and APK that calls those APIs. If you do it the other way
around, things break. Breaking isn’t good. The user experience is pretty
bad, if you put stuff out doesn’t work. So we also want to make sure
that you publish it first, so you can go through the
validation checklist. Because there will be stuff that
goes wrong, and you want to make sure there’s
no validation errors in that process. So once you are published, we
have a nice little treat in store for you . As you get more users,
you will get badges. We love badges. Badges are great. So you unlock some
Achievements of your very, very own. And you can get leaderboard
badge, and achievement badge, and a multiplayer badge, if you
use all three, in the Play Store, right there. And your apps will stand out. And people will know that you’ve
got these really cool services there. However, they’re not just given
out because you had the leaderboards in the config. Or we don’t snoop your APK and
check you’re calling the APIs from there. We actually look at how much
your feature is being used. And when we reach a certain
threshold, we will give you a badge. So you have to actually
integrate it. It’s not just a token thing that
you can do to get more eyeballs in the store. And so far, we’ve really just
been talking about the one app, “Angry Fruits,” as we all
now in love and will dream about for days to come. But what if the smash hit “Angry
Fruit” is $0.99, and it’s just not really getting
that much traction? It’s just not doing well. And we want to try and launch
maybe a free version. Well, the good news is, we
support that super-easily. We basically just link all
the games together. How do we do that? I’m sure you can guess by now. We go to the Linked App section
of the console. And we select link
another app. You can Link up to 20 different
apps here, including your web management
app, that Jaewoong showed you how to write. And once you’ve got it full
of apps, what’s in common? We’ve got all these apps. But how do we know which
one’s which and what’s going on there? So achievements and leaderboards
within the same game configuration are
global, so to speak. And we’ll talk a little more
about that in a moment. There’s also multiplayer,
because our system basically sees them all as one game. So they all play multiplayer
together. DANIEL GALPIN: That’s
too much work. And besides, the free version
doesn’t have the levels. So we have a way of
handling that. So first of all, you’re going to
want to prevent people who don’t know each other
from automatching. And the way to do this is to use
the variant, which you can do when you’re actually
building your configuration for rooms. But we actually also want people
who know each other to be able to invite people,
regardless of whether they actually have the game. Because it’s one way of
directing people to the game. So what we suggest you do is
just handle this gracefully. Consider it an opportunity to
upsell someone to the premium version or to the new
version of the game. And we have a lot more
information about multiplayer coming on, in sessions that are
going to be in this room. So just stay tuned here. And you’ll learn all sorts of
great stuff about how to implement multiplayer. And also, the Advance Game
Topics talk talks about more than just multiplayer, but has
a lot of really, really great info about how to
implement games. So there are a few cases where
you might want to prefer one version of your game over
others, however, when someone gets invited to it. Jaewoong, how do
we set that up? JAEWOONG JUNG: OK. So in the multiplayer invitation
you saw in the previous talk, we sent the users
to the Play Store, if they don’t have the game. And if there are more multiple
versions, we let you decide which is store entry to send
the users to with the check box on the Play console. How about the opposite case? I mean, what if the user is
super-fan and has more than one version installed? In that case, when they hit
play, we will launch the one you added most recently
on the Play console. JENNIE LEES: That’s
really good. I want to be able to do
that and tell people which game to launch. That’s really important. So in terms of multiple
games, let’s talk a little bit about sequels. So it’s Thanksgiving fairly
soon, I guess. And I that “Angry Fruit Fall”
game is stuck in my brain. I really want to make
that happen. And it’s not quite the same
as the original game. And we’re adding new content. We want more Achievements, more
leaderboards, and brand new graphics for everything. But how do I do that? It’s simple. I add new resources in just the
same way as I added them in the first place, as many as
you want, as long as you go under the limit that the
console gives you. And it’s pretty much
exactly the same. And I’ll just walk you through
how that works, when you’ve got a game that’s live and a
game that’s in development, at the same time. So your game out there, “Angry
Fruit” has three achievements. And your users are super,
super happy. And they want some more. So you add some more,
brilliant. And at the same time, you’re
going to change the visuals on the existing achievements. Now, while your version is
out there and your new achievements are in draft mode,
live users will just see the original three. They won’t see anything of the
new stuff you’ve uploaded. However, your testers
see everything. And they’ll see your in-progress
graphics and mock you for it. Now, once you’ve hit publish,
everybody gets to see all the achievements and
all the icons. And that’s everybody. So if the original “Angry
Fruit” users have the achievement UI. They will see all the new
achievements, as well as the original ones. But they can’t unlock the
new ones, because you never told them to. The game doesn’t
have the calls. Or the APK doesn’t have the
code in there to do it. And in order to unlock it, they
need to get the new game. So that’s a great opportunity
for an upsell. Don’t you think? You’ve got this achievement
list and a description. Make the descriptions say, only
available in the brand new smash hit “Angry Fruit
Fall.” Or you can upgrade the original APK and add in the
calls to unlock the new achievements in there. JAEWOONG JUNG: Well,
you know what? There is something they
cannot change. Let me show you. So before an achievement is
published, you can’t really change its type. A [INAUDIBLE] achievement can
be changed to an incremental achievement or to a hidden
achievement. But once you make a choice and
publish it, the tie becomes permanent and cannot
be changed anymore. Leaderboards have something that
becomes permanent after publishing too. Let’s look at this one. The top player, who remarkably
resembles me, is smiling, because he’s leading on
a public leaderboard. He’s the best to player in the
world, although there are only nine players at the moment. However, if the developer
changes the leaderboard ordering, the player will
suddenly find himself at the bottom of the leaderboard
and won’t be able to smile anymore. Basically, we don’t want to take
away something our user already earned. If a player, has earned rank, he
or she must be able to keep it until someone else beats
his or her score. In the same vein, you can’t
re-publish the leaderboards or achievements. We’ll apply the same thinking
when we introduce the new resource types in the future. DANIEL GALPIN: So looking at
that leaderboard, those two top scores look really
suspicious. And they’re also not
wearing glass. JAEWOONG JUNG: Hm,
that’s right. They look suspicious,
which makes me introduce the next subject– managing. “Angry Fruit Fall” went totally
viral and began to attract cheaters, as
Dan pointed out. So how should you
deal with them? Coming back to this leaderboard,
we now believe the first and the second
place are cheaters. You want to hide them
from the game. So let’s build an admin
website with the hide player function. Hiding a player is
really simple. This short JavaScript code,
using the gapi object is everything you need to write. The hide method is a plain
RESTful API, where hidden players are represented
as a [INAUDIBLE] resource in your game. So basically, you’re
posting two new entries to the resource. And for that, you only need to
your own application ID, which you already know, and the player
ID you want a hide. Where do you get the player
IDs of the [INAUDIBLE] users? They are included in the
userboard score responses. After calling the hide method
with the two cheaters’ IDs, they are hidden. And the leaderboard
is cleaned. JENNIE LEES: Wait, wait, wait,
you just hid my score. But I’m not a cheater. I spent all night, like 24
hours, playing your game. Fix it. JAEWOONG JUNG: Oh, don’t
worry, because hiding is not banning. Hidden users can still
play the game. And their scores are still
recorded in the Google server. They just won’t appear in
the game’s leaderboards. Let me explain why
this matters, again with an example. It turns out Jennie
wasn’t actually a cheater, as she said. And she just loves this
game so much. And she got disappointed because
you hid her scores. She made post something on
reddit, unless you do something to her. And this is why you need
the unhide player API. And you only need to call
this simple method to revive her scores. Her scores will be restored,
normally, within a few hours. And as I explained earlier,
hidden player list is a list resource in your application. So what this call does is
essentially deleting a player from the list. But here’s the problem. How do you know her player ID? Most players don’t know their
player IDs, because we don’t have UI to show them. So it’s not like she can tell
you, my player ID is this, this, this. Please give me back my scores. But don’t worry. There is not only one but
two ways to figure out player’s IDs. First, you provide this list
hidden players API. Calling this will return all
hidden players public profiles, including their
names and Player IDs. And again, this is
just getting the Hidden Players resource. So if the innocent player’s
name is found in the list, like in this case, bingo. Unfortunately, there’s
a [INAUDIBLE] case? Can you guess what? When there are more multiple
players with the same name. Since the hidden player list
doesn’t contain any personal information, like email
addresses, except for their names, it’s impossible to
distinguish multiple people with the same name. And this is so why I previously
said that there are two ways. What’s the other way? You can find Player’s IDs on
their Google+ profile pages. Let’s take a look
at Jennie’s one. You see this a long
number in the URL? Yes, that’s really long. This is her Player ID. So you can either visit the
player’s Google+ profile page yourself, or ask her
to just go and grab the Player ID there. JENNIE LEES: But just don’t use
that one, because I’m not actually a cheater. So don’t hide me. JAEWOONG JUNG: After a few
hours, Jennie has returned. Plus, if she got a higher score
while she was hidden, the new score is shown
when she returns. By the way, since this community
management API is just a plain, easy-to-use,
RESTful API, then we can anybody use it to hide the
people they dislike, for example, someone? Absolutely not. Because the users must sign in
to Google to use this API, Google knows who’s calling it. And service to only a limited
set of people the project owner permitted. And how do you grant
the permission to members of your team? Some of you may be familiar
with this. On the Play console, you can
invite others to be members of your project team, like as
in this screen shot. Only these members, including
yourself, will have the permission, others won’t. And this is how you manage
your gamer community. So we just walked you through
the development, test, and publishing cycle and talked
about how you manage your gamer community. You now have all the
information at your fingertips, to set up and
publish your million-dollar game franchise. DANIEL GALPIN: And remember,
all this sample code is available on the documentation for games. JENNIE LEES: And as Dan
mentioned, there are talks on the games services, in this
room, coming up after this. So please come back. And we’ll be in the office
hours in the Play sandbox upstairs, if you want to ask us
any questions about games. And of course, in that sandbox,
there are a hands-on stations where you can
get to play more than 16 of our games. And try them all out. Let us know what you think. JAEWOONG JUNG: Thank
you for coming. DANIEL GALPIN: Yeah, thank you.

Only registered users can comment.

  1. "Practical Android Games Development" God dang it didn't you listen to what he said in the beginning o_o Game Services in Practice!

  2. So when is the "practical Android games development" video going to be available? that's what i'm interested on.

  3. Isn't it better to leave the game just in English than translating all the stuff to different languages? You need to get someone who actually speaks that languages and it can bring you a lot of problems.

  4. Of course we did, but we wasn't expecting to waste seconds of our life being tricked into clicking a video and have to watch it before we find out the title of the video has no relation to the video we are watching.

  5. So in the months since io google couldn't spare 2 minutes to update the title on the youtube video to match he actual topic of the talk? I totally understand not revealing the title ahead of time, but that ship has sailed…

Leave a Reply

Your email address will not be published. Required fields are marked *