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.
Related
I need to know exactly how many players have unlocked a particular achievement in the lifetime of the game. Is that possible?
In the documentation they say this:
On your Achievements page, you can find statistics that include:
Percentage of players who unlocked an achievement
Number of players who unlocked an achievement
Average time to unlock an achievement
*https://support.google.com/googleplay/android-developer/answer/3423625
So I understand from that lines that you can check general data but not particular data of each achievement separately. Can someone confirm that?
The number of players of my game is still very low and statistics are not visible... for my previous game it was necessary to wait months until statistics activated. I need to know it now, because if it's impossible to check this separately I will be forced to integrate Firebase Analytics just for this thing, and I prefer to keep the game with the least amount of SDKs possible.
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.
We're developing a game which has achievements and while we haven't released it yet, we did publish for Beta testing and have also published Game Services for that app for testing purposes.
We now realise that we need to tick the incremental option on a few achievements but we can't as "this field cannot be changed after publishing". I have unpublished the game and service but this never allows us to edit.
We then thought we could delete the achievement and set it up again, but there is no Delete or Reset option available.
Is this a case of the unpublish setting taking a while to propogate on Google Play or is what we need to do impossible?
I never published to Google Play public so it would be frustrating if we weren't able to fix this :(
Any help would be greatly appreciated! Thanks.
Unfortunately, you are correct. There is no way to change those attributes or delete a published achievement. So the alternatives are:
Create a new achievement with the configuration you want to have,
and leave the existing one there (maybe achievement for starting the
incremental achievement?).
Create a new game configuration. This
means all the game state will be reset from the player's
perspective.
In the future, I don't think you need to publish the game to start testing. You can Alpha and Beta test with named testers, and make changes to the game configuration. Then once the game is perfect, publish it. More information on staged rollouts: https://support.google.com/googleplay/android-developer/answer/3131213
Quoting from the official Google documentation for Editing the achievement.
Note: Once an achievement is published, its initial state (hidden or revealed) and its type (incremental or standard) is fixed and cannot be changed.
Undoing an edit
If you decide you don't like your current achievement and want to go back to your achievement the way it was before, select Revert from the drop-down list in the Google Play Developer Console, and all of your achievements will revert back to the previously published version.
Deleting an achievement
Once your achievement has been published, it cannot be deleted.
You can only delete an achievement in a pre-published state by clicking the button labeled Delete at the bottom of the form for that achievement.
Resetting an achievement
You can only reset player progress data for your draft achievements.
To reset achievements in the Google Play Developer Console, click the button labeled Reset achievement progress at the bottom of the form for that event.
To reset achievement data programmatically, call the Management API Achievements methods.
I'd like to design an Android game that has an in-game currency (coins) that can be earned by playing the game or can be bought with real money. This currency can then be spent on different upgrades.
Obviously I need to store the players' number of coins and the list of the upgrades they bought online, not to lose this information if they decide to uninstall the game. However, I don't have access to a server so I'd like to use the Google Play Services to store this information in hidden achievements / leaderboards.
My idea is to have two leaderboards set up: one for the total ammount of coins earned + purchased and one for the total ammount of coins spent. These leaderboards would be updated whenever the player earns coins or buys them with a consumable IAP (which is consumed immediately after the purchase so they can buy it again later), or whenever the player decides to spend some of their coins on upgrades. The upgrades themselves would be stored as achievements so if they buy something, the specific achievement would unlock.
This way all of the purchase information would be stored online and if the players reinstall the game, they wouldn't loose any progress: the list of purchased upgrades is stored in their unlocked achievements and the amount of their remaining coins is just the difference between the two leaderboards' scores.
This method also seems more secure than storing the information locally or establishing a connection to a custom server. And since the Play Services cache the data when offline and sync it later, the Store could be used without internet connection (apart from buying coins with IAPs of couse). The only downside is that it enfroces the Play Games sign-in so I'd have to check that before any transaction. Basically the entire "Store" menu would start with a Google Play Services sign-in.
My question is that do you see any problems with this solution? Is it possible to realize it or am I misunderstanding any of the concepts (I only have worked with non-consumable IAPs so far and the way to track consumables is a bit unclear for me). Is it breaking the Play Services terms of use (I also intend to create some traditional leaderboards and achievements so not everything would be hidden) ? And lastly, is there a simpler way to do this without using a server?
Thank you in advance :)
Peter
This idea sounds inflexible. Why don't you just use the Saved Games API from Google? This will do essentially what you want to do with a proper API instead of using the leaderboard/achievement API. You can define any class to save your data to the cloud and sync across devices.
Plus, Google has some default UI for showing the leaderboards and achievements. If you want to use real (unhidden) leaderboards or achievements you'll have to write your own UI and filter out the hidden ones.
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.