C++ Leaderboards

From J2Play

Jump to: navigation, search

J2Play leaderboards list and store the best scores achieved by the players in the game. To use the leaderboard feature, report the score through the following interface:

Easy highscore APIs

The simplest APIs for one highest score are the easy score APIs

GDKInstance::easySetScore()

GDKInstance::easySetScores()

GDKInstance::easyGetScores()

Notice:

  • By easy score APIs, each user only has one record in the specified Leaderboard, it is the best score record of the user.
  • The score record array submitted by easySetScores is sorted value by value in sequence.
  • For only one highest score record per user will be record, any other score achieved by the same user, which less than the best one, will be dropped.
  • There are four kinds of Leaderboards: daily, weekly, monthly and all-time, every score submitted by easySetScore(s) will be processed according to aforementioned rules by every Leaderboard individually.
  • easyGetScore will get the toppest score record of specified user.
  • The score type for easy score APIs is 'record' implicitly.

More flexible score APIs

Will be release in GDK ver 3.2

GDKInstance::SetScores()

GDKInstance::GetScores()

Links

Personal tools