Imagine a multi player game for android which is turn based (multiplayer like ruzzle):
The user should get invitation, accept, send finished game to other players, etc at any time, even if the game/activity is not open. Each game last more than a day.
At the I/O google mentioned that Google Play Game Services will support "turn based multiplayer" gaming experience as well. What do they mean by this?
When I was reading about it on developers website, I did not see "turn based" anywhere. Also the title of the page was:
Developing a Real-time Multiplayer Game in Android
Can what I need be accomplished using google play game services and an IntentService? What would the drawback of this be compared to using GoogleCloudMessaging?
Can I hook up onActivityResult to an IntentService so invitation, game messages, etc will be handled by the IntentService if the game/activity is not running?
If I understand you correctly, you are thinking about developing an asynchronous game. This has been previously discussed here e.g.
https://stackoverflow.com/questions/17423461/example-of-google-play-service-for-creating-a-turn-by-turn-asynchronous-multip
Google Play Game Services is not well-suited to this type of game at the moment.
Of course, you can write your own intent service, but to make it work (e.g. maintaining "connections" between devices across power downs) you will effectively have to write your own version of Game Services.
Re. reconnecting to a room (assuming Google's back end has not "housekept" the room due to inactivity):
Google gaming services, obtain list of rooms
Today I read Google Play Services 4.1 and it looks promising. I wanted to share this with whoever stumbles upon this question.
Turn Based Multiplayer
Play Games now supports turn-based multiplayer!
Developers can build asynchronous games to play with friends and
auto-matched players, supporting 2-8 players per game. When players
take turns, their turn data is uploaded to Play Services and shared
with other players automatically.
TurnbasedMultiplayer
Related
I am making an android app to serve my progressive webapp content using webviews. I want to host my android app on the Google Play store. My webapp uses Stripe as the billing api to accept payments, start free trials, and apply discounts. However, after reading the Google Play terms of service, I am confused by the section here.
My webapp offers subscription based content. In other words, users purchase my subscriptions in order to access restricted content. My content definitely meets the requirements in Google Play's terms of service. On billing though, I'd really prefer to use Stripe as that's what I've been using up until now. The terms of service states on in app purchases that I must use Google's billing api as the only payment method for selling subscriptions.
I am confused for two reasons. The first is on this section of Google Play's documentation, they suggest using multiple billing methods in an app as a good practice, but this contradicts their terms of service. So then am I allowed to use Stripe on my android after all? The second is that I'm looking at other android apps on Google Play, such as Spotify. Spotify does not seem to use Google Play's billing api for purchasing subscriptions. So I'm trying to understand what makes Spotify exempt from this requirement.
I had two theories for why Spotify is exempt. The first is because they offer their content through multiple mediums. Website, Windows and macOS applications, iOS app, etc. Does this fact exempt Spotify due to this statement: "Payment is for digital content that may be consumed outside of the app itself (e.g. songs that can be played on other music players)". If so then my app falls under this category as well since a subscriber would be able to access my content on my website and iOS app in addition to my android app correct? My second theory was because I read here that Spotify carries out the in app billing process through an external Spotify webview. If this is the case, then my app would be accepted by Google Play if I do the same and handle the billing by serving an external webview?
So my question is given everything I've touched on above, would my android wrapped progressive webapp be accepted by the Google Play store?
Thanks in advance.
Short answer: If you are planning to rely purely on Google Play or some other marketplace to grow your business / userbase then build your app to use their payment system. If people visit your website from the web, tell them to download it from whatever marketplace.
Long answer: If you do some exploring you will notice there is no option to manage payments from some mobile apps only login / signup (free account). If you want to upgrade you are either redirected to a browser OR forced to use their online web app (because you end up googl-ing out of frustration). BUT Google is saying as of September 2021 there will be 0 links allowed to non-Google payment services for any app that is not exempt (physical goods / services). So unless Netflix is using big money loopholes to qualify as one of the exempt businesses they would need to remove the link to "manage subscription" in their account settings sometime September 2021 - or implement Google's payment system for their APK submitted to Google play store.
My advice: Keep it simple!!! Unless you are working with a budget or team, managing all of this on your own, and in production will be overwhelming, especially if you end up scaling. If you want to make a Google Play game or app then build it with Google in mind. Use Google Oauth, Google Adsense (free accounts), and use Google's payment system to upgrade users. As you grow, hire people to help you expand and maintain your project on new marketplaces.
I'd like to be able to link users in one game to users in another game such that users that unlock certain achievements in game 1 are able to receive special items in game 2. This is very similar to how Blizzard does it where buying like X in Hearthstone gives you a special mount in WoW.
I know we could manage our own account system but we're hoping there's an easy way around that.
I've been researching Google Play Games and it seems like that could be the ticket but I can't seem to figure out a good way to identify that this new user linked in Google Play Games is the same user as in Game 1. Is this something I can accomplish with the SDK? Basically wondering if playerId is unique to the game or to the player themselves and across different devices.
(another option would be using the Google Play Advertising ID, but that isn't great for users that want to enabled limited ad tracking).
developer.android.com has a whole article on user identifiers. What you've got is a hard problem. I can give you a few tips:
playerId is the same for the same user across different devices, but is different between different games. This is deliberate to prevent Ad tracking that the user didn't intend. So playerId would probably be the wrong choice.
The Advertising id is "for user profiling or ads use-cases". So I definitely wouldn't use it for this use case.
In this case, my choice would be to use something like Firebase, especially Firebase Auth to manage a very simple account system. You won't need to create your own servers or write much sign-in code as Firebase handles this, and you get sign-in with Google or Facebook for free. And once you have it, it will give you a nice flexible way to do other things in future, eg experiments or configuration with Firebase Remote Config. And it is cross-platform if you ever write an iOS version, and from Google.
I am thinking about using Play Game Services, with turn-based multiplayer, to power my Android game.
I need to save the outcome of any game to my backend (here, Google App Engine) : mainly the winner and the score, for accounting purposes. However, I don't find any mention of a custom server in Play Games docs.
How can I combine GPGS multiplayer with a backend ? More specifically, how can I check if said user is effectively logged in to GPGS ?
Maybe the clients can send this data to the server, but I fear the data can be tampered with. And because it's a 1v1 battle, there is no way to check with other users if the data is correct.
Thanks for any clues.
I have developed a multiplayer game using GPGS and I used the service 'Cloud Save' (now it has been changed to Google Play Games Saved Games service) to store the scores of each player. It is saved for each account, so the data can be loaded/saved from different devices.
I have used Google play games to create an Android game with achievements, leaderboard, and realtime multiplayer play.
I now would like to include some server related stuff, planning on using google app engine. My understanding is that a Google Play Game backend instance is built atop an app engine instance? How would I combine using the google game play API (extending BaseGameActivity for its login management and have access to achievements, etc) and still use the google app engine for other services exposed via servlets?
My main concern would presumably be sharing the authentication- I could envision simply making a separate Game play server and a separate app engine server, but then the user would somehow have to log in to each separately, right, being rather annoying.
I have tried to search for how to do this, expecting it may be fairly common, but have turned up only a few references that are not exactly what I need, talking obliquely about Auth tokens and such. If those are actually what I need, I may need a step by step guide as to how to take the info from the google play game APIs, and how to send it to the app engine server calls appropriately, so the user only sees the single "google play game" login.
Thank you
Rob
How would a game chat lobby be implemented in Google play game services.By a lobby i mean allows chat and inviting others users to play.
So far in the examples i have seen from Google (Button Clicker), invites start a room. What i need is one or later more central rooms that users can connect to and send messages and then initiate invites. Is this possible?
With random matching , the player may have to wait a while to get an opponent and invite friend on google+ , the friend needs the app installed and the app open to play.
Unfortunately, No at this time. (follow up edit for below)
Google Play Services does not currently maintain a "meeting room" part to their API. In order to have a lobby, you would have to host it completely separate to the Google Game Services API's (but could have them login to their G+ accounts to gain access to your lobby. But, as you stated, in order for a specific link up to occur, each player must have the other player in their circles, so even if players wanted to ask another player in the room to play, a process for adding them to their circle would need to exist within the lobby room portion of your application.)
Joining by Random play as currently implemented would still be faster than a lobby room, since as soon as a viable match is available, G+ will auto link up the players and send the start message. For the lobby room with players already in their circle(s), the invitation system (combined with a quick email/sms) does still allow for fairly quick linkup of known players with each other.