Google Play Game Services on a desktop game - android

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

Related

how can i use azure face api in android?

I am trying to implement Microsoft Azure Cognitive Service Face Api for face recognition. Followed by https://go.microsoft.com/fwlink/?linkid=2184104 i created .NET Core console application and everything works fine. Now i would like to use this code in android app, but i am pretty stuck. Should i create rest api from existing C# code? Or there is android library that allows me to use face api directly like in console app?
Since Cognitive Services are already APIs, you could talk to the API directly and process the response right inside your Android code.
Please keep in mind that this does leave a potential security issue if the application is meant to go into the store / public. Users could look at the traffic or decompile your app, find your access keys and use your Cognitive Service for their own applications. In that case it could be interesting to wrap it in your own API and have some security checks in place there like rate limiting or call quota. Of course you need to make sure to use your access key inside of your own API to hide it from being seen externally.
Still, this leaves room for abuse. You now implemented a public API that, again, anybody could talk to. There are quite a few interesting discussions found on this, like this question right here on Stack Overflow: Restrict API requests to only my own mobile app.

API for turn-based multiplayer game

I would like to add the multiplayer functionality to my Android game. In particular it must be turn-based. I don't want to reinvent the wheel, so i need a framework/API or whatever that avoid to write the server side. It is just a personal project of mine, so i have not special requirements. Now, i know 3 possibilities:
Google Play Services API for Turn-Based game
SmartFoxServer
Parse
I would like to know if there are other technologies or if any of the ones that i've written above is good.
https://developers.google.com/games/services/android/turnbasedMultiplayer
As someone said in comments, Google Play services is cross-platform and will work for iOS if you ported it in that direction. Also, the support in the way of tutorials and documentation is very great for this.
On top of that, you can integrate other Google goodies like high scores, badges, etc.

Libgdx game using Google Play Game Services on iOS and Android

I am creating a game using Libgdx and would like to integrate player, Leaderboard, high score on both iOS and Android devices. Ideally I would use Google Play Game Services but I could be convinced to use other technologies (like Parse).
There are tutorials to use Google Play services for Android devices: (http://theinvader360.blogspot.co.uk/2013/10/google-play-game-services-tutorial-example.html). But as far as I understand, this will not work for iOS devices (according to this:https://developers.google.com/games/services/integration/)
There are also tutorials to do so on iOS devices, using RoboVM: http://www.badlogicgames.com/forum/viewtopic.php?f=11&t=11424 but as far as I understand this will only work for iOS devices.
Since one of libgdx benefit is to write once but to run cross platforms,
my Question is the following:
How do I integrate with Google Play Game Services and run on iOS and Android.
It seems to me that the answer is to use the REST API (https://developers.google.com/games/services/web/api/) since this is technologically agnostic, but that means that I then need to implement quite a few things (login, notifications...)
I cannot imagine I am the first one to be facing this but it seems there are no examples available on the subject.
You don't have to use the REST API for this, even though that would certainly be an option.
The easier way is the use of platform specific code via interfacing.
Everything that is not directly integrated into libGDX won't work via "write once, run everywhere". This also applies to achievements, leaderboards and other things that Google Play Game Services offer. However, you are lucky that GPGS unites these features within one framework for at least Android, iOS and Web.
So what you would do, is adding the platform specific library dependencies to the platform specific projects you have generated. Then implement a generic interface, e. g. AchievementHandler with methods like unlockAchievement(String achievementId).
Then you would implement this interface via AndroidAchievementHandler that makes use of GPGS. The same will work with an IOSAchievementHandler.
In your core code, you will only use AchievementHandler and each platform will use its own implementation of this.

Android/Webpage API architecture

If I have a website and an android application, it is correct to build a Rest API service to use it in both (web and app).
This way is more flexible to make changes one time right?
I'm using Hapijs and Catbox-Redis to handle the session store, also I am working on separated projects to deploy the API and Web projects on separated servers.
It is correct to use one API service for the Android Application and the Webpage?
It is absolutely appropriate. This is one of the big advantages of a services layer. It is very likely you will need some things that are specific to each, but most things will be common.
The really great thing will be when you have to write the THIRD interface that you don't know about yet (Google glass, apple TV, android watch, SOAP, who knows)

How difficult is it to port an existing webapp to Google TV?

I'm thinking about attending a Google TV hackathon event later this week, and I have no experience with Google TV. It seems that Android is the main platform to build on, but I want to run my existing web app on Google TV. I was wondering how difficult of a job it is, and if it's something that can be done over a weekend. Can anyone provide advice?
Android is a platform to build on for GoogleTV, and it has some advantages, but GoogleTV also has Chrome built in. You can put your web app on Chrome first, and migrate to Android afterwards.
I think the key success factor for any app on Google TV is adherence to the design guidelines. Regardless of which platform you use, you need to design for a 10 foot environment and a mouseless control system. Remember:
TV is a passive environment: People want to watch more and interact less.
People are sitting far away from the screen. Visual processing changes.
TV is more of a group environment.
You are guaranteed a D-pad on a remote control, nothing more.
Very high audio and video quality is expected
Your app is competing with what's on TV.
It really depends on what your webapp does. If it uses Flash, or not. There are lots of things to consider before doing just a "port". On the other hand, if your really interested in that, you might wish to look at this article I wrote: Moving Web Content to Google TV Android Apps If your app isn't already D-pad navigable, you might be interested in the jQuery & Closure extensions as well as our template libraries.
Chrome on Google TV is Chrome 11 w/ security patches. A WebView hasn't really changed in quite a while. If you've got significant CSS3 usage, you'll notice it.
To port existing website to optimized version for Google TV, the key ingredient is use some Javascript library to make your sites D-pad navigable. There are a couple of libraries jQuery and Closure available: https://developers.google.com/tv/web/docs/tools_libraries.
If your site has video content, the easiest way is focus on them and leverage on the Google TV Templates available here: https://developers.google.com/tv/web/docs/gtv-templates.
If videos content you have is relatively static, you may hard code them into your web pages, as done in the Templates above. But if they change often and you'd like to have a backend with an admin page to manage them using e.g. MySQL, read this article to see how it can be done: https://developers.google.com/tv/web/docs/ajax_gtv_templates_tutorial
You can host videos on your own server or play them directly from YouTube. If you need the Javascript to play them from YouTube, let's start a new thread.

Categories

Resources