ForceReload of Leaderboard

  • It seems the forcereload of the leaderboard in the GooglePlay plugin is missing? In the GooglePlay SDK you can send String leaderboardId, int span, int leaderboardCollection, int maxResults, boolean forceReload. All of them exist in your plugin, but not the last boolean.

    Normally it is fine to use cached data (the boolean is defaulted false if not stated true) if you just want to display a leaderboard for the users, then the data may not have to be totally uptodate, cached data is fine. But if you use the playerscore in the game logic it is crucial that you can assure that the fetched data is totally fresh and not cached (old lower score)

    Or am I missing something?

    Nepeo

  • It's very rare that you actually need to force an update. Even if you force a reload the data could change after that but before you use it. It will quite often update it when you request it anyway.

    I think it was basically decided to not be that useful, they advise against using it unless you need to. It should be relatively simple to add in I think if you believe it to be useful.

  • hmm.. actually When i use Fetch Leaderboard data in the game it sometimes gets "old" data, the same data as I had when I opened the app, even though new postings have been done while playing. then if I open the "real" GooglePlayGames app on the phone I can see new/higher scores there. then if I am in game again and try to fetch score it might take a couple of reloads before I really get the same scores as I see in the PlayGames app.

    To just show a leaderboard this is acceptable, but when you fetch a score within the game for use in some game logic it must be sure that it is the latest score and never an "old one".

    this is not something you have seen in any testing?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Are the scores coming from a different device? I would have thought submitting data for that leaderboard would invalidate the local cached copy.

    I remember having some issues with adding achievements on the console then having to force it to sync before they would appear on device. My guess was that they didn't bother checking for changes in that data very often.

    I'll be honest, it's been awhile since I've had to work on that particular part. I don't remember any issues but generally I preferred using the leaderboard dialog to requesting the leaderboard information and displaying it myself. So if there is a desync issue there I might not have seen it.

    As I said, if you think it's important I'm happy to investigate adding the options.

  • I cannot say for sure what effect this setting will have for an app. But I can obviously say that I from time to time see other scores (updated ones) in the native GooglePlay Leaderboard dialog screen than what I can get while fetching scores inside the game.

    If that depends on the API or if it would be "solved" by this setting I am not really sure of.

    But if you say it is "easy" to investigate/implement I think it would be nice, but it can be defaulted to False

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)