Google play game service ,determining a host or server - android

im trying to develop a multiplayer game using google play game service.
In my game i have some game logic that will run only one players set ,which i prefr to call host.
i would like to determine the host by player who created the room.
but i see room creator id can be different in different players set on a single game,and each returns as creator in auto match game.
so what should be the ideal way to find a host ,apart from sorting the player list and use the first participant as host ?

Google provided a video specifically on Google Play Games: Choosing a specific user which explains how to work around agreeing and assigning a specific user a special roll. In summary: sort the participantIds and have the first by sorted order randomly choose the host and broadcast that to the other players. This ensures that all users agree on the host and the host is randomly chosen each time.

Related

Saving additional data about player. Android

I am going to build a real time multiplayer game for android. I'm planning to use Google Play Games Service https://developers.google.com/games/services/android/realtimeMultiplayer
I understand, that I can use Leaderboard to save main player stat, for example Wins. But I need to be able to implement a way to store more information about the player. For example wins, losses, inventory and etc. So when two players join game room, before the start they could see each other's information.
I wonder where this information should be saved so that when two players connect to the same game room, they can see each others data. If it is saved on client's device, I guess it is a risk that a cheater can upgrade his own stats somehow, am I right?
What is the best practice? Thank you.

Leaderboard based on location

I am working on an android game(which is created using Unity3d engine) and I was trying to use google game service features when I stumbled upon a question implementing leaderboards.
Is there any way to sort player scores based on their location?
I want players to know their rank in their country, continent, etc. Something like google's time based leaderboards(daily, weekly and monthly)
Do I have to implement this feature myself? If so leave your thoughts and ideas.
Creating your own leaderboard means you have to write a Server (i.e. a HTTP Server) that can store the players, the scores and the locations (preferably in a database).
Getting the location of your users depends on the final build (browser, app, windows exe, etc.)

how to get particepent profile info in android game using google play game services

i am developing a game in android i want to implement multilayer concept using Google play
game services
i wanted to know that how i get profile information of participant i mean name and profile
picture of player when user connected to game in android
and second question is
when i play game using random play it give the player5068 joined but i want exact name of
the
player how it possible please help me
thanks in advance
First of all you need to think what type of multiplayer game are you going to implement with gpgs. Either it will be a real time multiplayer or turn based multiplayer.
In real time multiplayer you have to implement real time event listener class abstract methods. from there you can get list of participants that have joined ur room. from the participant object you can get its name , id , picture url and other properties.
Secondly you have asked about random players name , you can get it by fetching participants list in room .

Is There a GUI for Showing Game Services Matches?

I can only imagine there must be a way for me to invoke some kind of GUI that will show all the matches a player has going on, whose turn it is, who they're playing etc. Is there such a GUI call for Google Play Game Services or do I really need to work this all out manually by loading matches and created my own GUI from the data? It's proving to be a lot of work and I feel like it just HAS to be wasted effort. Game Center has it...
From Developing a Turn-based Multiplayer Game in Android found in the Google Play Game Services docs.
Once a player has signed in to your game, the player may receive invitations to join a turn-based match created by another player. To save coding time and provide users with a consistent UI for responding to match invitations across applications, you can use the default match inbox UI provided by the SDK. To launch the default match inbox UI, call getInboxIntent() to get an Intent; then call startActivityForResult() and pass in that Intent.
It appears there is a built in GUI. I don't have an app to try it out but you can get more information here I hope that helps.

Google Play Services Multiplayer Participant's Identity

I am working on a game using Google Play Services real-time multiplayer. Everything is working fine however the participants always have generic names. I need to show their names but instead of showing usernames it shows some generic player_[somenumber].
I am using test accounts, both test accounts have given public access to the app. Their display names show perfectly on their own mobiles but it doesn't show on the other player's mobile.
The API reference says
If the identity of the player is unknown, this will be a generic handle to describe the player.
I want to know, what are the cases when the identity of the player is unknowing while the game is being played.
Thanks.
In automach game also person in my circle have obfuscated id.
The identity of a person is unknown to a user when they are not in the user's circles. In such cases you will get a generic handle and no profile picture.

Categories

Resources