
Google Play Game Services - albertzeyer
https://developers.google.com/games/services/
======
i_am_ralpht
I used Google Play Game Services for a turn-based Android game a friend and I
made this summer[1]. I like to develop on the PC and have a really fast test
cycle, so I made a client implementation for desktop Java using a wrapper
around the REST API.

It worked pretty well, _except_ I could never figure out how to be notified
that the other player took a turn. On Android there are hooks for this, but on
the PC I ended up just polling their API for changes (I figured since it was
just me I was unlikely to be tagged for abuse...). Maybe "Pushtokens" is the
thing to use? The API documentation doesn't say what a "Pushtoken" is.

[1]:
[https://play.google.com/store/apps/details?id=com.infinite_i...](https://play.google.com/store/apps/details?id=com.infinite_imagination.letterplex)
\-- it's inspired by Letterpress. I wrote up some of our other experiences
building the game, too, since I did a custom toolkit and physics engine for
it: [https://medium.com/@i_am_ralpht/building-
letterplex-1-0-a78c...](https://medium.com/@i_am_ralpht/building-
letterplex-1-0-a78cf2b04f26)

~~~
andymcsherry
You're right, the real-time multiplayer stuff is only available for Android
and iOS right now. It'd be nice if they made a web-socket solution to handle
this.

[https://developers.google.com/games/services/common/concepts...](https://developers.google.com/games/services/common/concepts/realtimeMultiplayer)

~~~
henrikschroder
Or you could use a different game service that has more features and client
libraries in more languages:
[https://gamesnet.yahoo.net/documentation/services/multiplaye...](https://gamesnet.yahoo.net/documentation/services/multiplayer/)

(Shameless plug, sorry)

------
AshleysBrain
Services like this are cool but as with Facebook, Twitter and other APIs, they
often don't work properly in a web view. Consider this from the docs linked to
in this submission:

> Clicking that button or link should then call gapi.auth.signin(), which will
> ask the user to sign in to your game in a separate window.

You can't open a separate window in a web view, so the sign in doesn't work.

Hybrid app development is a pretty big deal and PhoneGap looks set to go up
another level with the latest web view improvements in iOS 8 and Android 5,
but it still surprises me that many top APIs out there fail in a web view
simply because they try to open a window or some other presumably easily
worked around issue, and nobody bothered to test it there.

~~~
lern_too_spel
It's straightforward to handle this in a WebView. If PhoneGap doesn't handle
it, file a bug with them.
[http://developer.android.com/reference/android/webkit/WebChr...](http://developer.android.com/reference/android/webkit/WebChromeClient.html#onCreateWindow\(android.webkit.WebView),
boolean, boolean, android.os.Message)

In this particular case, PhoneGap should integrate with AccountManager and not
force users to enter their login credentials.

------
scott_karana
The Anti-Privacy feature is probably a big deal to legitimizing the Play Store
in the eyes of iOS devs who worry about Android's large piracy rates.

[https://developers.google.com/games/services/android/antipir...](https://developers.google.com/games/services/android/antipiracy)

~~~
apayan
Piracy on iOS is just as high as it is on Android. The only difference is that
Google acknowledged that DRM doesn't work and made a license check option
available to developers instead (years ago, nothing new).

We released our game for iOS earlier this year and easily 80% of our users had
pirated copies of the game.

~~~
pjc50
How much is it? It's astonishing that people bother to pirate iOS games when
they hardly cost anything in the first place.

~~~
emsy
I read a quite plausible explanation on HN about it: Many people in Asia buy
iOS devices as a status symbol, but can't really afford anything beyond, so
most devices are jailbroken and loaded with pirate app stores. Comparable to
the china tablets that already come with pirate app stores.

This post is about IAPs, but I assume the numbers for apps would be quite
similar:
[http://www.gamasutra.com/blogs/AaronIsaksen/20121213/183519/...](http://www.gamasutra.com/blogs/AaronIsaksen/20121213/183519/Piracy_Tracking_for_InApp_Purchases.php)

------
sehugg
Is this a new version? I took a look at this a few weeks ago and I don't
remember any of this doc. I don't see a version ID anywhere on the website
either (at least for Android).

------
Nilzor
Why is this news?

~~~
georgemcbay
Not sure it warrants its own post, but it adds some depth/context to the
"Nexus Player" device in particular (though it isn't specific to that).

Google is essentially doing an Ouya on both the hardware and software sides,
but one with a much higher chance of traction (though admittedly, it is still
very unproven, especially in light of their tepid support for Google TV, etc).

------
midnightreactor
Select Platform:> Steam "A CHALLENGER APPEARS..."

------
cunac
REST API is really,really,really ugly No respect for any good practice when
design REST API

