简体   繁体   中英

Google Play Game Services on a desktop game

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM