I created a game in Java using Libgdx framework. Now I would like to know if it is possible to use Google Play Game Services in a desktop (java/.jar) game, or is it meant just for mobile devices?
With Google Play Games, you can play mobile games on your Windows computer. When you play games on your PC, you get a larger screen with better graphics and you can use a keyboard and mouse. Whether you play your game on a computer or mobile device, progress stays synchronized. You still earn Play Points.
Google Play Services connects apps to other Google services, like Google Sign In and Google Maps. Google Play Services isn't the same as the Google Play Store app, and is included with Android. Google Play Services doesn't make your battery drain faster or use too much of your mobile data plan.
As I am faced with the same question, I do not have a complete answer, but I think the short answer is yes, you can. But you'll have to use the rest API instead of a nice java API, and some features are not available (such as the real-time online multiplayer support). You can see the reference here:
https://developers.google.com/games/services/web/api/index
As you can see, the major stuff like anchievements, leaderboards, and turn-based multiplayer services should be available (and you can even see there is stuff like joining rooms, but they are marked as "For internal use by the Games SDK only."), so I guess the REST API covers the major needs.
I have yet to test this on a desktop aplication and for sure you'll want some support library to help with the quirks of the HTTP-REST protocol, but I think it is feasible.
EDIT: Since this API is meant for the web, you may still need some kind of initial JavaScript interaction with the user (using google's JavaScript libraries) in order to authenticate the user first, but the rest of the interaction can be done "server-side" (and in any language you want). Read this for more details:
https://developers.google.com/games/services/web/serverlogin
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With