• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Legacy GM Google Play Games achievement help

J

Jayars

Guest
Hi all.

I'm learning and trying to implement Google Play Games achievements and leaderboards.

I'm using the tutorial from http://www.fm-studio.net/blog/gmstudio-add-google-play-games-2-new/

Have a few questions:
  1. achievement_post(100) is used to unlock a standard achievement. So why the range of values? What happens if I post 70, 20, then 10? Does it add up to 100%? How does it even affect a standard, non-incremental achievement?
  2. achievement_reset() - does this work? Tried calling it, but nothing appears to have reset.
  3. How would I implement the following scenario:
Scenario: Endless runner, achievements by death count.
  • "Died 5 times"
  • "Died 10 times"
  • ...
  • "Do you like pain?"
I assume I need to set up each as incremental achievement in the Dev Console.
But would I then increment ALL achievements every single time?

Code:
if (global.g_game_state == GameState.GAMEOVER)
{
    if (achievement_available())
    {
        achievement_increment(global.g_ach_5, 1);
        achievement_increment(global.g_ach_10, 1);
        achievement_increment(global.g_ach_15, 1);
        achievement_increment(global.g_ach_20, 1);
        achievement_increment(global.g_ach_suicidal, 1);
    }
}
Thanks
J
 
D

Dobsus

Guest
Also recently jumped into bed with Google's achievements and here's what I've discovered:

1.Yes, if you set up in your google developer console the achievement as being incremental then submitting it in parts will unlock it when 100% is hit.

2. To reset achievement progress you need to check up on googles API for "Achievements: reset". (Only testing accounts are resetable)

3.Either use ini files and store the death count until the desired amount is hit before triggering the achievement or like you suggested, in increments.

Good luck :)
 
J

Jayars

Guest
@Dobsus Thanks for the reply and answers.

I do not think the achievement_reset() function in GMS does anything. I noticed if I want to reset all achievements/progress, I have to manually go to the Android Dev Console any reset achievements there.

And speaking of the Dev Console, I'm getting the sneaking suspicion that any changes I make are not applied immediately.

ie:
  • Adding/deleting achievement - Does not show up/disappear in my game until ~30 minutes later, regardless of re-logging in, or deleting my Google Play Games account.
  • Changing an achievement settings (Incremental flag, title) - Does not apply immediately. I get a yoyo error in the adb with something along the lines of : "achievement is not incremental". Once again, had to wait for nearly 30 minutes before the achievement_increment() worked. Until then, the increment just didn't work
  • Resetting achievement (dev console) - This one I waited for more than a day (got tired of checking every 15 minutes). Even after that, any unlocked achievements still had a progress of 100%, even though the unlocked date is removed. I find it easier to just delete and recreate my Google Play Games account.
  • Leaderboard - This seems like the only one where resetting it takes effect immediately
I think I know enough about Google Play Games achievements (for now) to progress further with my project. Will revisit this with more trial and errors when I get the chance. Thanks again Dobsus!
 
F

Fin

Guest
I know I'm a few months late to this conversation.... but I'm having a very similar issue. Testing achievements has been awesome but now I want to remove most of them (or edit them) based on the test I did. I just hit the reset button on the Google Play Console and it still shows up as completed when I test the game. Creating new achievements was instant but resetting does not seem to work. I'm not above deleting my Google Play Games account and recreating it every time I need to run a test! :) If any one else has cracked the code on this one that would be greatly appreciated. I'm not sure if this helps but I only have two testers and we do NOT see the game on the play store. We have the apk directly installed on our phone. We see the correct achievements so I don't think that is a problem but I thought it would be worth mentioning. Thanks for all your help!
 
Top