Game chat lobby - android

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.

Related

Play Game Services, can we know when we pass another hiscore?

I am using Play Game Services, for leaderboards and achievements. Is it possible to know when the player beats one of his friends' highscore? (Like in Candy Crush).
In general, I can't find extensive API documentation for Play Services APIs, where can I find it?
The general information about Play Game Services is at https://developers.google.com/games/services/.
You should consider developing your own backend server to perform the check of passing a friend since you need to keep track of the relative positions of players over time.
At a high level, the steps would be:
Call Players.loadConnectedPlayers. This will return a list of players that have played your game and that are connected to the current player. You'll need to send this list of player ids to the server.
Get an auth code from the client using Player. using Games.getGamesServerAuthCode(googleApiClient, “your_server_client_id”).
Pass this code to your backend web server application.
Then on the server:
List item
Exchange the auth code for an access token.
Use Scores.listWindow to list the scores around the player's score.
Compare the scores of the connected players to the new score.
An optimization would be only do this if the player gets a new high score.

Google Play Game Service Ranking

I am working on Google play game service
I have integrated code for real time player and its working.
Now i want to know some more feature that
I did not found after searching on Google are below
1. When user won the game it should update wining counter by one.
2. What is the ranking of user according to country
3. How to get user detail of opponent.
It sounds like you want to check out Leaderboards https://developers.google.com/games/services/common/concepts/leaderboards
You can create (currently) up to 70 leaderboards (maybe one for the country/regions of your players).
At the end of your game, you can update the user's score. The server keeps track of daily, weekly, and all time leaders. There is also the concept of Public and Social leaderboards so that may be a way to see the opponent's standing.

Contact user using Google Play Game Services

I am developing an android game with Google Play Game Services implemented in it. I'm using leaderboard from game services. Every week I want to award users with highest ranking with some gifts. Is there any way to get users email or different channel to contact user, so we will be able to determine where we should ship the gift?
Yes, but it is not a documented feature. You can use Games.Leaderboards.loadTopScores to get top scores. When you have a LeaderboardScore object you can use score.getScoreHolder().getPlayerId() to get his Google+ id. Then open https://plus.google.com/PUT_ID_HERE/posts and you can contact that player via Hangouts.

Google play services invitation process for cards based game

I am considering google play services for my cards game which requires 4 players to start. The only problem is that I am not sure how I can get a people started on one game. According to Docs, you can have a user host a game that will invite random players. The problem is that invites will be sent to people but many people wont be close to their phone. If 3 invites were sent to random players and only one joined, then the game can not start. How can I design multiplier given this limitation?
The problem that the concept of listing rooms does not exist therefore people can not join the game that the person hosted as I cant query the list
Any idea? Or am I miss understanding the concept
Thank you
If you are using the Quick game option to auto-match randomly selected opponents you won't have this problem. Because it doesn't invite 4 random players of all users that have google play game services installed. It just connects 4 players that are currently starting a quick game.
You only have a problem if there are not enough users that start a quick game at the same time.
If you are using the "Auto-pick player" option from the Player Invitation Dialog, it's the same. If you choose a friend in the list and then the auto-pick player, the two remaining players will be filled with random players that are awaiting a quick game.

Turn based android game with Google Play Game Services and IntentService

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

Categories

Resources