I'm adding support for the Google-Play Game-Services to my Sports-App and was going to use the leaderboard so users can compare their number of workouts to other users.
But the number of workouts isn't a score in the sense, the leaderboard needs it and only makes sense if it's not restricted to a time span.
So I would like to only show the all-time leaderboard. I'm using the default leaderboard activity provided by the GameClient and that unfortunately has a selection for daily, weekly and all-time leaderboards.
Is there any way to tweak this or am I doomed to implement a leaderboard by myself? Or are there any examples of custom leaderboard implementations available?
No, you cannot change that as you only have access to the intent to the activity so you can't modify this. It is enforced by Google to promote adding friends to your G+ circles.
Related
I am new to google game play leader-board service. I am creating a Round based gamed where each round last for 2 minutes. All the players globally are playing same round simultaneously. At the end of each round I submit scores to the google play leader-board service. Now how can I get highest scorer among all the players who played that particular round? I want to show leaderboard for that particular round.
Thanks
The Google Play Game Services leaderboards need to be defined before publishing the application, so for only 1 day of gaming, you would need 1800 leaderboards, and then you would need to use the management API to reset the leaderboards every day. I don't think it is a good fit for your requirements.
Have you looked into using Firebase? https://www.firebase.com/docs/web/quickstart.html
You can still use GPGS for achievements, events and quests, and even leaderboards for the daily, weekly, and all-time scores.
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.
I'm developing a game for android. I use the google play services for the multiplayer functionality.
I want to integrate an ingame currency, which is reset to a fixed amount every day. Every game round the user plays will cost him 1 coin of this currency. Additionally i want to integrate in-app purchases to buy packages of coins, which are indepentant from that daily amount of coins.
My question concerns the date request when starting the app, which decides wether the user gets coins for that day, or if he already got them. If i just fetch the local date, the user could just change the phones date and get the coins even if he already got them for this day. So my question is, whats the best way to get the current date? I already use the google play services, so is there a way to fetch the date from there ? Otherwise, that needs the user to be connected to the internet. Any suggestion on this ?
Another question is, where to save the coins. Locally would be the easiest option. But is it safer to use the google play services cloud stuff for this too ? That would have the advantage to work cross device.
If you can't trust the user's device you may want to get time from an external server that you control.
For storing the coins remotely, please check out the Google Play Saved Games Service. You can store arbitrary data there and use it to sync coins and other information across a user's devices.
I am currently implementing a multi-player game using Google Play Services. The game also uses the provided Achievement system which works very well. However, I am really struggling to implement some sort of "Winning Streak" achievement which should be unlocked if
The user has won 5 multi-player games in a row.
In the developer console I have created an Incremental Achievement and set the needed steps to 5.
In code I would like to implement the following concept:
If the user wins the game, the achievement steps are incremented by 1.
If the user loses the game, I would like to reset the achievement step counter.
If I understand the API correctly it is NOT possible to reset/decrement an achievement counter for non-testers. Therefore the only possibility to implement such an achievement would be, to store the current count of games won in a row locally on the device, alternatively in the cloud.
This is not a satisfactorily solution because:
The user will not see the current "progress" of the achievement in the achievement intent
It requires more effort to implement it this way, especially if the user plays on two different devices
I really would like to know if Google provides another possibility to implement such achievements than introducing some sort of temporary counter.
I am in the process of creating an in-app-billing service. I want to set prices differently for different countries.
When the purchase page is displayed, how can I decide which currency i should use for an In-app-billing item? Do I use the local currency? Or the Android Market Account currency? I could not find any documentation about this. I want to know the rule of judgment to display the correct currency.
See this question and the corresponding answers:
Android Market In-App-Purchase: How to get the currency a user will pay in?
In summary, it's not possible (at the time of my writing this!) to talk to Android Market and get the currency of the user's Android Market account.
Maybe an idea to have a Spinner in your shop screen which allows the user to select the currency to display prices in. Bit of a hack but best alternative I could come up with.