question

Daniel Wynne avatar image
Daniel Wynne asked

What to do if leaderboard reset before player's run is complete?

Been browsing the forums and can't find the solution.

Runs in my game take about 1 hour. I coded the dailies feature to store the 'version' of the leaderboard at the start of the run so when the player is done, it will save to the correct leaderboard version. I was disappointed to find out that I can't actually write to the previous leaderboard version. What is the recommended solution to this problem

Simply writing to the most current leaderboard isn't an option as each day will have different daily modifications and thus different score multipliers.

Thank you

Leaderboards and Statistics
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
brendan avatar image
brendan answered

This is more of a design decision than a technical one. When a leaderboard resets in PlayFab, it is indeed "locked" so that new scores can't be written to it - that's by design. If you want to allow for "late" scores, you should use a rotating leaderboard system, where you have multiple statistics, and swap which one you're writing to each day, at the "reset" time. In that model, you'll want to make sure your server-side logic (script or hosted server) is checking for possible cheating that leverages that.

If you want to disallow late scores, you may want to implement logic to notify the player that their score may not be recorded, if they're starting just before the cutoff.

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Daniel Wynne avatar image Daniel Wynne commented ·

Thank you. If its a design decision, would be great if it were an option.

I don't understand how using multiple leaderboards would work if they both reset at the same time (that can't be configured, right?). Is this something I have to setup with cloudscripts? I assume I can't use the drop down 'Reset frequency' in the leaderboard options for this? How many leaderboards would be need for a daily run setup and when would they reset for example? Probably just a logic problem I can't wrap my head around right now, mind elaborating?

Not sure about 'server-side' logic, I'm using the client api to submit directly to the leaderboard. Not secure, but other options are out of scope at the time unless there's a dead simple guide. Having the option to write to archived leaderboards would make my implementation much more elegant.

I guess I'll just add a warning if someone is starting late.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.