Bulk upload/update Google Play Games Achievements and Leaderboards - android

Does Google Play Games has a batch-uploader for Achievements/Leaderboards like Apple's ITMSTransporter?
I have 64 Achievements, 13 Leaderboards, 12 different localizations with a title, description and image to upload. I don't really want to manually copy-paste over 3000 items.

I had to end up hacking together my own solution to this, using the Chrome javascript console. Very disappointing there doesn't seem to be an official tool or API for this.
You can see the sourcecode for my hacky solution here: https://github.com/zzymyn/gpg-batch-uploader

This is an old question, but I faced the same problem recently (had a huge list of achievements with several localizations that I needed to upload).
There's no ready-made solution but I created my own by leveraging the Play Games Services Publishing API (https://developers.google.com/games/services/publishing/). It's a REST API that lets you create and modify achievements and leaderboards. They have clients for several languages, I used the one for Ruby which is what I'm most used to.
It's a bit tricky to set up because the calls need authorization (OAuth 2) and the documentation is not very detailed (I figured out most stuff just by reading their code and samples), but the good part is that once you get it working you get a lot of flexibility.

Related

Google Play Games, backing up data, Drive deprecated

I'm just coming to the end of writing my first game, last thing to do is enable backing up the user's game. I have leaderboards and achievements implemented fine, and all Google's docs say I should be saving games to Drive using .requestScopes(Drive.SCOPE_APPFOLDER) which upon trying leads me to find that it's no longer going to work in 2 months.
Digging further, I found this line from Google: "Support for storing and syncing in the app data folder will likely be removed from Drive in the future."
I'm still learning all this as I go, and I'm using Kotlin (I don't know Java). Can anyone point me in the right direction to where I should be looking to backup users game data if the way Google suggests isn't going to work very soon?
Thanks
Google is deprecating the Google Drive Android API in favor of the Google Drive REST API. Here is the best starting point for implementing that in android that I could find.

Unity Social API

We are writing an application in Unity3D for both iOS and Android and we'd like to use the provided Social API to retrive and post the highScores on iOS (using GameCenter) and Android (using Google Play Game Services).
To keep the application simple, its weight low and to avoid cross-compilation extra setups we'd prefer not to use external plugins (unless point 4 is true).
I googled around for documentation and tutorials and I found THIS ONE.
The implementation has been done in C#, but since the Unity guide also provides a c# version it went all straight forward.
However we couldn't manage to get this work, probably also because we don't understand well how this API really work.
First of all: the Unity guide states that "It [the api] provides a unified interface to different social back-ends, such as XBox Live or GameCenter", but in the implementation is not specified which social back-end is being used. How unity knows that? It switches depending on the platform?
Second: I understood in various guides that the GUI provided to show the leaderboard is directly provided by the host platform and from the console log i get these following success messages:
Authenticated, checking achievements
Error: no achievements found
Successfully reported achievement progress
but running the application in the editor, in a build made for windows or an apk used in BlueStacks, i get the same message when I call the function Social.ShowLeaderboardUI(); which is
ShowLeaderboardUI not implemented
I could expect it from the editor and the exe, but BlueStack emulates Android and i would be surprised if it doesn't provide the google play services. However i also read about a "sandbox mode" which is the one that should run in the editor and this leads to point three:
I can't find a way to set this sandbox mode, at least not from that guide.
Fourth point: Unity has a GameCenter class, but no classes for the Google Play Games Services, so: I can do what I want with iOS but I need an external plugin which implements the ISocial interface for Android?
Fifth point: How do i handle authentication in both sandbox and deploy mode?
As you can see I'm surely missing something on the coding side, conceptual side or both. Can you provide a step-by-step procedure on how to achieve what i need? I don't need to get pieces of source code, but if someone can explain me well how this API works it would be great.
Thanks in advance
For Android:
To integrate Google Play Service into Unity, you need to use a plugin. You can find the Google supported plugin here. You can find information on how leaderboards work here. Essentially how it works is:
You create the leaderboard in the Google Play Developer Console
You submit scores to the leaderboard created (at whenever you determin is the appropriate time)
Google Play Services sends a response back telling if it's a high score or not.
I suggest you take a look at the Cubic Pilot_4.6 sample as that demonstrates how to implement leaderboards. Also, you really ought to test this on a physical device, due to how emulators may have trouble handling Google Play Services and account logins.
As far as authentication goes, Google Play Services takes care of most of it for you. You can probably see more in the samples (Social.localUser.Authenticate).
Current implementation does only provide implementation for GameCenter and XboxLive. There's a property Social.Active which can be used to modify what social platform is used. You can set a object which implements ISocialPlatform but im not sure if that interface is fully open - thus, im not sure if anyone can implement that..

Can Google Play Games service be used for non games

Ok this sounds weird. Google play games was made for games. And it is excellent. Achievements, cloud save, etc.
Now my app is NOT a game. But it is well documented and researched that turning chores/work/etc into games, makes them more fun, and people more likely to want to do them.
And this is what I want to do for my app. I cant add it to the games section, as it is a productivity/utility app. Yet I would like to add achievements,etc to it. And seeing as Google Play Games services already has some of the functionality i need, i thought i could use it. However, it seems that your app must be a game to use it.
Any one know if you can actually use the services with non games?
It's technically possible but in circumstances where you are using the services in an app, be careful because if your app doesn't meet the branding requirements, it can be pulled from the Play store as described in the Google Play Games Services terms of service.
So long as you can follow the Google Play Games Services Branding Guidelines you should be fine.
Yes, you can. The Google staff speaking in an event yesterday in the Google Campus London actually said this.
For examples of already existing popular such apps, checkout Memrise which is a gamified way to learn languages. It sits in "Education" App category and it has leaderboards and achievements in it, though not sure if its GPG or their own implementation of it.

How to make Android Multiplayer Games using Facebook friends? (Google Play Game Services uses G+ only)

At the risk of this question being marked 'research' or 'too broad', I am placing this question here with the research I have done so far (to count as background work), especially since I have been researching this for a while but have not found a good turnkey solution. thank you for your inputs!
I want to make Turn Based Multiplayer Game. I found Google Play Game Services but that only works with Google+ Login: https://developers.google.com/games/services/android/turnbasedMultiplayer
How do I do the same with Facebook login? Can Google Play Game Services be used with Facebook friends?
In my research, the other option I found is nextpeer.com, but not sure if they can do a turn by turn based. I think i have to send player to player messages directly to achieve the turn based player, dont want to do that.
EDIT: After I posted the question, i found Android Games Tutorial with Facebook SDK - trying to understand if turn based game can be done using Facebook SDK.
Can it?
Disclaimer: I am a Nextpeer employee.
Hi,
Nextpeer does not offer a turn based solution at the moment. However, we do have an asynchronous gaming mode in our Facebook matches mode. In this mode players can either play synchronously together or asynchronously. In the second case, a player can play and the recording of his gameplay will be played to his opponents when they choose to play. Does this answer your need?
I'll be glad to discuss further privately, just email us at support#nextpeer.com and ask to talk to Dror.
I have been looking for a solution on similar lines aswell, and I guess we have a solution that can be helpful for others as well. Just looking forward to integrate it. You can find the required documentation here

Can you use Google Play Games API in apps other than games?

I want to add achievements to my app. I started doing such my way, but after the last release, with the new Games API, I've seen it looks clearly better than coding all by myself. What I don't know if there are clauses that avoid using the Game API for regular apps rather than games.
PS: I've checked twice the Games Services website, but nothing appears there.
I don't see any problem with that!
This concept is called gamification:
http://en.wikipedia.org/wiki/Gamification

Categories

Resources