Microsoft Azure PlayFab logo
    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Add-ons
    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA
  • Runs on PlayFab
  • Pricing
    • Blog
    • Forums
    • Contact us
  • Sign up
  • Sign in
  • Ask a question
  • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges
  • Home /
  • General Discussion /
avatar image
Question by Kyle Pierre-Louis · Dec 05, 2021 at 06:49 PM · Player DataLeaderboards and Statisticsgame manager

How do I create a time based Leaderboard with PlayFab? (Recording player's "Best Time")

I've been searching for a while now and I haven't found anyone else asking this question, let alone the answer to it. Maybe this is something so simple no one needs to ask about it, and I simply missed something obvious? I don't know.

The PlayFab leaderboard I'm using takes integers, but is there any way I can create a time based leaderboard instead of one that is Hi-Score based?

I've thought about grabbing the data from the leaderboard and formatting the score integer back into an accurate amount of time, then displaying that time as a string on the leaderboard, but all of this shouldn't be necessary, right? Also, that's very likely to be an inaccurate representation of the player's best time.

There are plenty of games that record the quickest time a player managed to complete the level, for example, so I'm sure there's just some setting I'm missing here within PlayFab's settings, but I can't find the solution anywhere.

Any help would be greatly appreciated.

How can I create a leaderboard that takes the player's longest/shortest amount of time to complete a level into account instead of their score?

Comment

People who like this

0 Show 0
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by Gosen Gao · Dec 06, 2021 at 05:40 AM

If you want to create a Leaderboard based on how much time players spent (The shorter the time, the better), then, creating that kind of Leaderboards directly is not supported at this time. But, as a workaround, you can create the Leaderboard with the negative value. For example, 50s and 100s in the leaderboard can be -50 and -100, now, the fewer time players spend, the better rank they get. When you need to display the Leaderboard, do that trick again to get the real time.

BTW, we have the Leaderboard V2 in coming, which can choose the Sort direction, It will better meet your needs. Please keep an eye on the Roadmap, once the feature is online, we will update that page in time.

>> I've thought about grabbing the data from the leaderboard and formatting the score integer back into an accurate amount of time, then displaying that time as a string on the leaderboard, but all of this shouldn't be necessary, right?

It is necessary, currently the Leaderboards only support integers, if you want to display 100s as “1 min 40s”, you need to implement it by yourself.

Comment

People who like this

0 Show 1 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image tourtellotronald2020 · Mar 29 at 05:10 AM 0
Share

Looks like v2 has been in preview for a long time now, like 2 years. The fact that tie scores work so poorly with current leaderboards is pretty bad.

I'm trying to have one leaderboard showcase the 25 scores around the player, and a 1 row leaderboard above it showing who has the high score. This seems easy enough until one leaderboard comes back showing you have the high score, and the other shows you're in 3rd. Due to a 3 way tie.

Is there any way around this? Im pretty sure i have to get 2 leaderboards since there doesn't seem to be a way to show the top score on the same leaderboard as my leaderboard around player, and its not great to show a leaderboard that the player isnt even on.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • LiveOps
  • Follow this Question

    Answers Answers and Comments

    9 People are following this question.

    avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

    Related Questions

    How to add statistics such as Level, EXP to new player? 2 Answers

    How Do You Create A Time Based Leaderboard (Taking The Player's Fastest Time To Complete, etc.)?,How do I create a time based Leaderboard with PlayFab? (Recording player's "Best Time") 1 Answer

    Admin panel in unity, to modify the statistics of the player you want / choose,Modify player data in a unit panel 1 Answer

    How to get data online players? 2 Answers

    How to reset statistics data with a predefined value? 1 Answer

    PlayFab

    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Runs on PlayFab
    • Pricing

    Solutions

    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA

    Engineers

    • Documentation
    • Quickstarts
    • API Reference
    • SDKs
    • Usage Limits

    Resources

    • Forums
    • Contact us
    • Blog
    • Service Health
    • Terms of Service
    • Attribution

    Follow us

    • Facebook
    • Twitter
    • LinkedIn
    • YouTube
    • Sitemap
    • Contact Microsoft
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • Safety & eco
    • About our ads
    • © Microsoft 2020
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Create an article
    • Post an idea
    • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Explore
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges