We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

Level up! A better gaming experience with Google Play services

00:00

Formal Metadata

Title
Level up! A better gaming experience with Google Play services
Title of Series
Number of Parts
46
Author
License
CC Attribution 3.0 Unported:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor.
Identifiers
Publisher
Release Date
Language

Content Metadata

Subject Area
Genre
18
Web serviceGame theoryLevel (video gaming)Goodness of fitService (economics)Software developerGame theoryComputer animation
CuboidSuite (music)Game theoryService (economics)GoogolTowerComputer animation
Suite (music)Game theoryAndroid (robot)Keyboard shortcutDirection (geometry)Computing platformWeb 2.0output1 (number)Multiplication signPoint (geometry)MeasurementGroup actionComputer animation
Ocean currentGame theoryTerm (mathematics)Web browserCuboidPoint cloudData storage deviceState of matterTablet computerLevel (video gaming)Lecture/Conference
Real-time operating systemCodeComputing platformTelecommunicationGame theoryTerm (mathematics)Latent heatRouter (computing)SoftwareSet (mathematics)Computer animation
Streaming mediaMultiplication signOnline helpMobile appService (economics)Game theoryFacebookGroup actionLatent heatDifferent (Kate Ryan album)Computer animation
Game theoryService (economics)Mobile appComputing platform2 (number)CuboidGoogolData storage device
Electric currentIntegrated development environmentGoogolMobile appGoogolService (economics)View (database)Game theoryHexagonOrder (biology)Level (video gaming)2 (number)Software developer
Installation artRepository (publishing)GoogolAndroid (robot)Software development kitRepository (publishing)Heegaard splittingModal logicService (economics)Library (computing)Software developerGoogolTelecommunicationGame theoryAndroid (robot)Flow separationComputer animation
GoogolSoftware developerVideo game consoleGame theoryMobile appLink (knot theory)Client (computing)Point (geometry)Revision controlGame theoryRight angleRule of inferenceConfiguration spaceCodeAndroid (robot)Interface (computing)Sign (mathematics)Disk read-and-write headIntrusion detection systemComputer iconMobile appClient (computing)MereologyMenu (computing)Link (knot theory)Video game consolePublic key certificateProjective planeDifferent (Kate Ryan album)XMLProgram flowchart
Software developerProjective planeIntrusion detection systemDemosceneVideo game consoleGoogol
State of matterBit error rateWindowVideo game consoleExistenceState of matterGroup actionMultiplication signGame theoryProjective planeDifferent (Kate Ryan album)Descriptive statisticsComputer iconCASE <Informatik>Web pageArithmetic progression1 (number)Computer animation
POKEColor managementReading (process)CAN busAndroid (robot)Client (computing)Instance (computer science)Game theoryElectronic visual displayBit error rateCrash (computing)Intrusion detection systemCodeElectronic mailing listCuboidOnline helpGame theoryGroup actionVariable (mathematics)2 (number)GoogolService (economics)Client (computing)Level (video gaming)Core dumpInstance (computer science)RankingProjective planeString (computer science)MetadataSoftware frameworkRevision controlFluid staticsMobile appLine (geometry)BitGreen's functionComputer animation
RankingMenu (computing)Game theorySample (statistics)Game theoryGoogolWhiteboardType theoryDecision theoryMultiplication signMessage passingDifferent (Kate Ryan album)Pattern languageMedical imagingComputer animationXML
Game theoryElectronic visual displayDevice driverCircleInstance (computer science)Device driverClient (computing)TrailLevel (video gaming)CodeString (computer science)BitGoogol
TrailEvent horizonRepetitionBitEvent horizonLevel (video gaming)Game theoryAnalytic setInformationGroup actionSet (mathematics)Front and back endsTerm (mathematics)Computer animationXML
Game theoryElectronic visual displayEmailFront and back endsMultiplication signFrame problemData managementEvent horizonSystem callGroup actionVideo game consoleComputer animation
Keyboard shortcutLie groupLaceChemical polarityAndroid (robot)Normed vector spaceService (economics)Computer fileMobile appIntrusion detection systemGraphical user interfaceString (computer science)Game theoryCircleLevel (video gaming)Product (business)Variable (mathematics)GoogolTouch typingKeyboard shortcutComputer animation
Boss CorporationSoftware testingMobile appIterationOnline helpLevel (video gaming)Boss CorporationWebsiteWhiteboardComputer animation
Boss CorporationOnline helpData storage deviceWebsiteSoftware testingScripting languageEmailPhase transitionGroup actionMedical imagingNeuroinformatikElectronic mailing listData managementAlpha (investment)Set (mathematics)Address spaceGame theoryBeta functionComputer animation
Data managementGame theoryPoint (geometry)Event horizonAnalytic setWhiteboardIntegerMaxima and minimaPhysical systemMultiplication signGame theoryFirst-person shooterWebsiteComputer animation
Mechanism designMobile appPoint (geometry)Level (video gaming)TrailDrop (liquid)Limit (category theory)Rule of inferenceEvent horizonMultiplication signComputer-assisted translationGame theoryBit
Event horizonMechanism designBitDirected graphCategory of beingSource codeGame theoryMessage passingMathematical optimizationComputer animation
Game theoryEvent horizonGraph (mathematics)Chemical equationQuicksortLevel (video gaming)
GoogolVideoconferencingOverhead (computing)Data managementBitGame theoryGoogolComputer animation
Service (economics)Game theoryVideoconferencingBitMultiplication signSoftware testingMechatronicsElectronic mailing listData managementFlow separationData storage device
Multiplication signBitComputer animation
Transcript: English(auto-generated)
Yeah, good morning everyone. I can see that every game developer Attending and the droidcon came over. So thank you for that. I Am Stefan I'm working as an Android developer
so I really love Android as you can see and I Also like to travel and like to take weird pictures, especially with me in front. So I you already got this over with so Congrats to that. Let's start what we are going to talk about today We are talking about play game services
Who actually worked with this? Okay, so it's like half the audience already so for the other half, let's see first what is in the box Introduced at iO 13 Google Play Services is a suit of tools that help game developers produce a better game with
Much less effort than doing everything themselves in the beginning. We had a few features and at our iO 14 last year We had more features added to this suit and
It's a suit that covers all important platforms for gaming So first of all Android and then a few others miners like web iOS C++ and also unity direct bindings for that
so What's inside? I should have my Okay, so we have leaderboards meaning you can track What what your players how their players rank against each other in certain measurements that might be time that might be points
You can you can select this we look into this later on also achievements give players an easy way to feel that they accomplished something great and did a specific action or Managed to do a certain level really good in In terms of moving between devices which most of you I guess will be very familiar with
Is cloud safe cloud safe that helps us? Store the current game state and reload it on a different device as long as used with the same Account so we can just keep on going where we left off
Although we just switch from the phone to the tablet or even from from the tablet through the browser Mm-hmm Also in the box there's multiplayer Multiplayer is supported in two different ways It's a it's real time or BS turn by turn and both is supported by the platform. So you don't need to
Do all the communication code you basically just act on? a turn happened or this happened in real time right now and you only use the Platform to communicate between the game sessions of the different users also matchmaking is included
also in Auto matching so you don't need to wait for a friend to join you can just find someone who just wants to play a game the same they introduced Nearby communication and in terms of gaming this means you don't even need to be befriended with this person if you are in the same
Network, it's it's possible that you find each other on the conference maybe not on a conference because they have specific router settings, but At home at friends or so on or maybe in a cafe
You can just start playing a game against each other without ever knowing each other Another interesting thing which we come later to is quests quests are time-bound missions or actions that users should perform and For it for you as a game developer. It's designed for you to
Help re-engage users draw them into the game and Show them specific ways to interact with your app with your game to have more fun and spend more time with it another maybe rather annoying gift Feature is gifts. I think the way that Google Play game services
Introduced this is pretty nice You have to have the users consent. So I guess each of us remembers Farmville Mafia games and so on in our Facebook streams This is a bit different. You really have to give consent and then you can help people with specific game items
Or you can request your friends help with something because you don't find this item. So this is pretty neat because you can use it for every game and there's also a feature That is called anti-piracy Which is not really a feature
Because it's basically when you create a game when you select this. There's a little checkbox saying anti-piracy on off which makes the game either Only be installable By Google Play or you can install it from everywhere and still use Google Play games. So if you make this checkmark
only games that are installed via Google Play Store can be used for for getting achievements and so on So if that's your only platform you can use it if you are releasing through Amazon and so on then of course
These services can't be used But this is another story since they are bound to Google Play Services in general we will see this in a second. You you won't be able to use it on platforms where GMS is not available and There's also an app for that. So
You can you can use this this app that you might found on your phone already or installed When it was released in the last few years and Which games support certain aspects of the Google Play services Play games SDK and you can compete with your friends over the leaderboard. You don't even need to open up the app
you can see this all and This helps Getting a consistent view of all the apps that supports it Because the same look and feel is also used when you show in-game
Notifications I can show this in a second. So let's start level one How do you start Giving a minimal setup to your to your game. So just imagine you have a game and you want to Introduce a few of those features
Step zero you have an Android setup. I take this as granted. So that's why zero And supported our devices from 2.3 and up so I guess every device And you this is the kicker you need Google Play services installed on the device. So
I don't think it would we work on a Kindle. I mean there might be a hex around this but Yeah, you can only use this on Google device and in order to actually publish those Achievements and so on you need to have a Google Play developer account
But I think since you're a game developer I want to publish your game. Anyway, you have this checked as well so You know set up Gradle if you never used any of the libraries provided by Google in Gradle, then you need to install the support repositories for Google and for Android I
Don't think any one of you has has this still to do then you include GMS games There's a split package for that. So you don't need to include all of Google Play services there You can use only the games one if you want to use the nearby communication stuff there's a separate split package for this and
You can include this as well all necessary dependencies like base and so on are included in this so you can leave this out Don't forget to think in Android studio still annoying still in 1.3 Configure ProGuard there was a point in an earlier talk a
Version of this talk right now. They include ProGuard rules already So you don't need to be worried that ProGuard strips out your gaming code your achievement related code So now we get to the actual interesting part so your your project is set up but
Now you need to have something that you can tie it to so you go you head over to your apps console and then you find the little gaming icon in the in the menu bar and you create a new game and Then you link this game towards for example Android since we are in an Android
Conference here we go for this of course and We create an all-out client ID that helps Our app to communicate securely with the interface with the SDK
And this is based on the sign certificates So if you want to have it for your debug and release You need to create two different client IDs and link them against this and use the same package name for both so This is pretty easy, and this is totally different from what it was a year ago Yeah, you needed to go to the other developer console
Console dot developers dot google.com and create a project there and then copy the the IDs This is now all taken care of behind the scenes So this is very comfortable now, and then we can make a little happy dance
because The setup is already complete That means not so fast We actually need to provide something that our players can see so now The SDK is set up and the project knows that we want to do some gaming stuff But we actually need to start with something so let's start with achievements because I'm a real sucker for those
I can play the crappiest games if there are some achievements to gain yeah give it to me, so What kind of achievements are there so there are three states mainly There are hidden ones, so you don't see what they're about you just know there's this one
I don't know how to get it But there's this one I need to get so I need to play more and explore and do different things There's this one you see what you're going to need to do to get it So it's a real state, and then there's another one. It's the unlocked state That means I actually got it just now
So and The the fourth special one is basically the incremental one where you and I think they're both Exists both in revealed and hidden state where you need to do a certain action more than one time And you can count for the player and the player can see the progress and then okay. I need to play in this case
Six times more and then I get this achievement How to Create an achievement. It's pretty easy you go to the Console that I just mentioned click on the achievement
Then you can do a new achievement and the the setup is every time it's the same you give a name to give a description add an icon and You need to set a few specific things in this case revealed hidden And if it's under incremental or not and what are the increments and all these things so it's it's really
Self-explanatory if you're once you see this page. It's really okay. I need to do this. I need to do this and Then once you edit a few achievements you check those IDs because you need them later So this is the list of achievements and in the green box you see a few
Weird IDs, and you need to remember them or maybe not we come to this later, so let's look at some code To get your project finally fix up with Google Play game services or Google Google Play in general you need to add the metadata tag for
the services version and The second line you need for games specifically as the app ID The app ID is listed in your when you created the game so it's really easy to find and then you just put it into a string variable and you You can reference this in the manifest
in the code Excuse me in the code. You just create a games app you client Google API client, and you need to include the API for games and the scope for games and You can you need to register a few callbacks so you know that something went wrong or a certain action has been performed and
Then you have your client instance that you should store somewhere and Then you can do fancy things like this so you get your client instance and Use the static method achievement unlock to achieve an to unlock a normal achievement
And in this way says my achievement ID there would you put the string that we saw in the green box earlier? for incremental achievements is Shockingly different. It's another method and you have to add the increment value as well Other than that, it's basically the same and also the framework provides you with a static way
Or an easy way to display a UI for this so you can just start an achievements intent and See basically something like this
This screenshot is a bit outdated they refresh this with material design and it looks much nicer now even but you get the gist so basically a few lines of code help you trigger some actions and drive your users toward doing this action like
Finishing this level in under 10 seconds or collecting 500 coins In this level or something like that Next one level three leaderboards so these have two reasons one is you can see your global rank so you can
Compare your your skills with everyone in the world that that uses this game and it's locked in and to Google Play games but also you can challenge your friends who see your circles and see what how they do and Yeah, you can send them a message saying hey, did you see I updated my score
So Creating a leaderboard. It's it's always the same pattern. You can realize this already You have a title you upload an image you set You set the type of leaderboard so you can have I think up to 20 leaderboards
Important Is the decision what is the ordering larger is better or smaller is better and the other Thing is the type so you can have a numeric type You can have a time type or a currency type if that fits your thing and you can have 20 boards that
Show different things So, let's see some code again We do basically the same there's another static method that you just call you use the client instance that we created earlier and use the the same string but now for the leaderboard to actually submit the score and
Google Play takes care of Ordering this and if you want to see it You basically get the static method for getting the right intent and you see this As I said, this is already updated a bit, but it looks like this and you can see my circles or public
To switch between and you see the spinner on the top and what rest has top drivers It could also be one per race track For example a leaderboard per race track so you can compete with someone over the rainbow road For example, if anyone understands that reference
Level four What else do we have in it? this is Interesting, but also getting a bit complicated. So that's why it's level four events and quests Events if you if you're familiar with analytics an
event is the same a player does something a user does something and you just notify your back end that this action happened, but You create an event saying for example User won the game or user lost the game or I don't know user pressed the settings button for example
but In games terms this is not enough This is good for analytics and it helps you to analyze the behavior of the user But it doesn't re-engage the user
quests on the other hand Use this information That the user does something and try to encourage this behavior by creating a challenge A quest is a time-based a time-based Challenge basically saying okay dear user. I know you can collect coins
I see that but how about you collect 500 coins in the next 24 hours, so you can set this all up and The more important stuff here the header. I don't have in the screenshot The more important stuff is you select an action that needs to be done by the user
You select the increase of this value for example 500 coins, and then you select the time frame And what you can do here is using for example a JSON like this
To you can tie this into the console and post this data Automatically retrieve this from the from the back end of Google to to update the player status once this quest has been finished, so All the management of this quest is based on the UI's of Google You don't need to code anything for this you just use it, and how do we use it?
basically we upload that the event happened we just increment and increment and increment and Eventually the quest happens and oh No first of course sorry
First we need to Show the user that there are quests available because they need to say yeah, I want to participate in that quest and For this we again have a nice intent that we can just call and open up the UI for this and
Then we can register a callback saying on quest finished basically and this This helps us triggering okay, this quest has been done Okay, download the reward data that we just set for example add more coins to the credits or whatever
extra lives, I don't know some nice reward for the user and Yeah, so we re-engage the user by saying hey do this and they completed the challenge so We we can reward them with this so
While working with this I found a few things that make it easier to work with Or at least avoid some mistakes So one of the shortcuts or the problems that you might run into
When you want to publish You normally publish in Google Play But you also don't need to forget to publish your Achievement data and so on in Google Play games, so It's even suggested Recommended to publish the play games first and after that publish your actual app to
to the product Prod production level What else there's this tiny label there the red
Circle Below the IDs because I said remember them copy them and so on but if you click this you have everything that you need to have in a string you can just copy this directly into your resource file It doesn't need to be named games dash IDs XML
It can have any name it can also append it to a file But I comment recommended to have it separately and Then you can reference this via string variables, which is much easier and nicer and then at the touch of a button Everything works automatically. I need to try this again. So
the last level The boss level so you did all this you engage the user, you know what they are doing
You Add new achievements you add new levels and add new leaderboards for that. So the users are engaged but It's getting complicated. You need to go back to the website and you try to add new features So your testers try out new achievements or new leaderboards and you
Want to wait until you publish it to your actual users to possibly your customers that paid for your app So you want to have some Iterations over this before so there are a few things that Google provides that help you manage those things So first of all, it's a publishing API
that helps you along with the publishing API from the Play Store that helps you to Automatically upload alpha and beta's or even prod if you're that daunting To create APK The listings the images and so on and this publishing API for games helps you to update and create new leaderboards and achievements
So you can all do this from your computer You don't need necessarily go to the website and click through and change this label This can all be done by a script if you have the infrastructure in place
Another API or a set of API's That are really useful especially in the testing phase is the management API's because they help you reset the scores achievements quests and so on for your testers, you can only do this until the achievements are
Unpublished until they are published and only for list the tester accounts, but You can actually set whole communities to be tester accounts. You don't need to collect each and every email address Optionally, you can say this alpha channel group is automatically. It's a group of testers. So those people can
Automatically be reset every day for example So they can try out the achievements over and over the leaderboards can be reset and you can see if the points the new Pointing system that you're working on works better And one thing works also after the publishing you can hide shooters from the port
Because we all know the I mean I know the global leaderboard of flappy bird for example where you had a lot of people entering like the max integer value because they found a way to hack the score with this API you can hide those people from the leaderboard and even if they
if they Uninstall or whatever they can't get the the leaderboard score up with the same user anymore and for the business II site in you which you I guess if you are an indie game developer, you need to have all kinds of hats and
There is player analytics and this is really there's a lot That you can draw from this and it basically relies on the events There are some things that you can do even without and investing time and tracking events
But if you do it's really helpful here You see something that works without events because it's based on the achievements so you can see How much time do the people spend in your app? Is it maybe that some achievements are too easy is it is it that
Only one achievement is really easy, and then you have a large drop-off So you need to fine-tune a bit maybe the rules for your achievements or maybe explain a level better or make it easier so there are different ways to to skim the cat but There's for example a way to to list
gated daily goals So you select I want to have I think one of the drop-downs is three point three point two million dollars a month as a goal, so then it Counts you per day how much that would be which how much you need to earn so you can track every day
Am I under or over this daily limit? I mean, maybe you start with something nicer like I don't know hundred K per month and Then it helps you to track. Okay, I Turned this knob. I changed this game mechanic and now I see a growth in my acquisition per day. Okay, I'm on a good track
You can also compare it against other games in the same category You can see how you read how the player retention is how long? Do players play your game? Is it only just for the first day or do they come back day after day? So you can tweak the game mechanics a bit and the messaging and everything around it and it helps you really to get back
into your through your optimum for your game One thing they added tied to events is They call it sources and sinks and
You can instead of just having an event that says player one. You can also have something like player player received five coins for this finishing this quest in game or Spent so and so many coins for acquiring this nice sword Sword in the in this game and these events like spending money and earning virtual money
can be Can be shown in a nice graph. So you see how your in-game economy if it makes sense if you players Are earning more coins than they can actually spend or if they are always short on on the coin
because you want to have them in a static in a relative balance around this and There's a secret bonus level, of course Outside of Google Play games there is this one thing that is
Google tech manager and It's not only usable. There's actually a whole video on how to use this to basically have less overhead with game development because Google tech manager originally developed for making advertisement campaigns a bit easier
to allows you to store your game data like your your list of quests and stuff like that in in in the tech manager and then segment separate users to do for example a B testing for Show the no new UI to only half of the users and see if this drives
business or doesn't and things like that and this video is really good to explain this and I also immediately bought the shirt Because it's Tron it's called donkey Tron You can't see this here, but look at the video it's awesome, so
That was the the short tour through Google Play game services. There's really mouthful and I would like you to ask questions because we have a bit of time left for this