Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Achievements not saving after a restart #50

Open
Yolwoocle opened this issue Jan 8, 2025 · 2 comments
Open

Achievements not saving after a restart #50

Yolwoocle opened this issue Jan 8, 2025 · 2 comments

Comments

@Yolwoocle
Copy link

Yolwoocle commented Jan 8, 2025

This is an issue that I encountered after the release of our game Globs (source code), which every single one of our players has encountered so far. I did not make a minimal reproducible example as it's a bit of a hassle to setup, but I can try to make one if it's really needed.

When unlocking an achievement, my device correctly shows a toast and the achievement shows up on the Play Games app and in the in-game pop-up Play Games menu. However, after restarting my device, the achievement no longer shows up as unlocked in the game or on the Play Games app, and no XP has been granted. For some players, just restarting the game is enough.

If this info can be useful, it seems like GodotPlayGameServices.android_plugin is not loaded, and the AchievementsClient.achievements_loaded signal is never called despite calling AchievementsClient.load_achievements(true).

If you would like to investigate the bug in the source code of our game, the scripts to look out for are scripts/achievements/achievement_manager_google_play.gd, scripts/integration/google_play_interface.gd, and the bottom of scripts/autoload/game_manager.gd.

@EthannYakabuski
Copy link

enthusiastic user here and taking a wild stab here after about 30 minutes of code review. Nothing looks inherently wrong with your logic, it is however extremely sophisticated, over my head and looks like you have some awesome projects under your belt. very cool, good job.

What strikes me as concerning is it seems like GodotPlayGameServices.android_plugin is not loaded , so i doubt anything should work honestly. (I believe) - the functionality you are describing (achievement toast appears, and looks like the achievement is unlocked, but does not persist after game close) - is the "expected" behaviour in the case that the player is also not authenticated through Google play services.

AchievementsClient is still available (and can be referenced), (i believe) , in the unauthenticed situation (i think?) the code would still make the toast pop up (as long as providing a valid achievement id - which your code does infact seem to be) , but it obviously wouldnt make this persist if theres no currently authenticated user to attach this unlock to.

In addition to the GodotPlayGameServices.android_plugin is not loaded , I am curious - what is your on_user_authenticated function responding in src/scripts/integration/google_play_interface.gd -> id place a heavy bet that this is logging the failure condition, which is probably related to the above issue as well (plugin not loaded). So maybe determining which is the chicken, and which is the egg in this situation might help you get closer to the root of the issue! sorry i couldnt help, but hoping i could get you at least a step closer

@Iakobs
Copy link
Collaborator

Iakobs commented Jan 22, 2025

Hi @Yolwoocle do you have any updates on your issue? Where you able to fix it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants