Leaderboards

The PlayFab Leaderboards Module is specifically designed to implement Leaderboard Statistics to games built using Construct.

Interconnected with major platforms including Facebook, Google Plus, Google Play, Game Center, FB Instant Games, Steam, Instant Games, Xbox Live, Nintendo Switch, PS4 and of course PlayFab's server.
The Leaderbords are henceforth capable of syncing throughout, making your player's game or studio data available on every platform.

It has console support in cases you want to port. And it has complete set of tools, able to adapt to your game design's needs.

Intstructions

1. The first step is to add the PlayFab API addon into the project.

2. Then, add the Authentication addon into the project.

3. Finally, add the Leaderboards addon into the project.

Features :

  • Complete PlayFab Leaderboard Features.

  • Leaderboards Versioning.

  • Organized Request and Update.

  • Friend Leaderboards.

  • Per Account Profiling.

  • Social Synchronicity.

Network Services :

  • Facebook

  • Google Plus

  • Game Center

  • Google Play

  • Facebook Instant Games

  • Steam

  • Xbox Live

  • Nintendo Switch

  • PS4

  • PlayFab

 

Actions, Conditions & Expressions

Actions

Action.png

Friend Leaderboards :

  • Get Friend Leaderboard - Retrieves a list of ranked friends of the current player for the given statistic, starting from the indicated point in the leaderboard.

    • Statistic Name - Statistic used to rank friends for this leaderboard.

    • Start Position - Position in the leaderboard to start this listing.

    • Max Results Count - Maximum number of entries to retrieve. Default 10, maximum 100.

    • Include Facebook - Indicates whether Facebook friends should be included in the response.

    • Include Steam - Indicates whether Steam service friends should be included in the response.

    • Specify Version - If set to "False", the latest version is selected. If "True", uses the specified Version below.

    • Version - If "Get Version" is equal to "True". Set here the version of the leaderboard to get.

    • Include XBox - Indicates whether XBox friends should be included in the response.

    • XBox Token - Xbox token if Xbox friends should be included. Requires Xbox be configured on PlayFab.

    • Tag - The tag to differentiate the requests.

  • Get Friend Leaderboard Around Player - Retrieves a list of ranked friends of the current player for the given statistic, starting from the indicated point in the leaderboard.

    • Statistic Name - Statistic used to rank friends for this leaderboard.

    • Target Player - Choose the Player to target. "Player User" will target the current user while "PlayFab ID" will target the PlayFab ID indicated below.

    • PlayFab ID - If "Target Player" is "PlayFab ID". PlayFab unique identifier of the user to center the leaderboard around.

    • Max Results Count - Maximum number of entries to retrieve. Default 10, maximum 100.

    • Include Facebook - Indicates whether Facebook friends should be included in the response.

    • Include Steam - Indicates whether Steam service friends should be included in the response.

    • Specify Version - If set to "False", the latest version is selected. If "True", uses the specified Version below.

    • Version - If "Get Version" is equal to "True". Set here the version of the leaderboard to get.

    • Include XBox - Indicates whether XBox friends should be included in the response.

    • XBox Token - Xbox token if Xbox friends should be included. Requires Xbox be configured on PlayFab.

    • Tag - The tag to differentiate the requests.


Leaderboards :

  • Get Leaderboard - Retrieves a list of ranked users for the given statistic, starting from the indicated point in the leaderboard.

    • Statistic Name - Statistic used to rank players for this leaderboard.

    • Start Position - Position in the leaderboard to start this listing.

    • Max Results Count - Maximum number of entries to retrieve. Default 10, maximum 100.

    • Specify Version - If set to "False", the latest version is selected. If "True", uses the specified Version below.

    • Version - If "Get Version" is equal to "True". Set here the version of the leaderboard to get.

    • Tag - The tag to differentiate the requests.

 

  • Get Leaderboard Around Player - Retrieves a list of ranked users for the given statistic, centered on the requested player. If PlayFabId is empty or null will return currently logged in user.

    • Statistic Name - Statistic used to rank players for this leaderboard.

    • Target Player - Choose the Player to target. "Player User" will target the current user while "PlayFab ID" will target the PlayFab ID indicated below.

    • PlayFab ID - If "Target Player" is "PlayFab ID". PlayFab unique identifier of the user to center the leaderboard around.

    • Max Results Count - Maximum number of entries to retrieve. Default 10, maximum 100.

    • Specify Version - If set to "False", the latest version is selected. If "True", uses the specified Version below.

    • Version - If "Get Version" is equal to "True". Set here the version of the leaderboard to get.

    • Tag - The tag to differentiate the requests.


Get Player Statistics :

  • Get Statistics - Retrieves Player Statistics to return (current version will be returned).

    • Statistic : - Get Player Statistics: Separate each Statistic Name by "|". Example: "Statistic1|Statistic2|Statistic3".

    • Tag - The tag to differentiate the requests.

  • Get All Statistics - Retrieves "All" Player Statistics to return (current version will be returned).

    • Tag - The tag to differentiate the requests.


Get Player Statistics : From Stack :

  • Add Statistic Name - Add Statistic Name to Stack for the retrieval request of "Get Statistics From Stack".

    • Statistic Name - Unique name of the statistic.

  • Add Statistic Name Version - Add Statistic Name and Version to Stack for the retrieval request of "Get Statistics From Stack".

    • Statistic Name - Unique name of the statistic.

    • Version - The version of the statistic to be requested.

  • Get Statistics From Stack - Retrieves Player Statistics from added Statistic Name and Version Stacks.

    • Tag - The tag to differentiate the requests.


Get Player Statistic Versions :

  • Get Statistic Versions - Retrieves Player's Statistic Versions from Statistic Name.

    • Statistic Name - Unique name of the statistic.


Update Player Statistics :

  • Add Statistic Update Stack - Add Update Statistic Stack. Statistic Stack for the "Update Player Statistics" action.

    • Statistic Name - Unique name of the Statistic.

    • Value - Statistic Value for the Player.

 

  • Add Statistic Update Stack with Version - Add Update Statistic Stack with a version property. Statistic Stack for the "Update Player Statistics" action.

    • Statistic Name - Unique name of the Statistic.

    • Value - Statistic Value for the Player.

    • Version - The version of the statistic to be updated.

  • Update Statistics - Updates the values of the specified title-specific statistics for the user. By default, clients are not permitted to update statistics. Developers may override this setting in the Game Manager > Settings > API Features.

    • Tag - The tag to differentiate the requests.


Load Statistic :

  • Load Statistic - Filters the Statistics locally from the latest of any "Get Statistics actions" to return the "Statistic Name", "Statistic Version" and "Statistic Value" by the input "Statistic Name".

    • Statistic Name - Unique name of the Statistic.

  • Load Statistic with Version - Filters the Statistics locally from the latest of any "Get Statistics actions" to return the "Statistic Name", "Statistic Version" and "Statistic Value" by the input "Statistic Name" and "Statistic Version".

    • Statistic Name - Unique name of the Statistic.

    • Version - The version of the statistic to be loaded.

Conditions

Leaderboards :

  • On Get Leaderboard - Triggers when the Get Leaderboard Succeeded.

  • On Get Error - Triggers when the Get Leaderboard failed with an error.

  • Is Leaderboard Type - Checks the type of Leaderboard of the "On Get Leaderboard".

    • Type - Either "Leaderboard", "Leaderboard Around Player", "Friend Leaderboard" or "Friend Leaderboard Around Player".

  • Is Getting Leaderboard - Checks if there is an ongoing leaderboard request.

  • For Each Score - Loops through all the Leaderboard Scores.


Load Statistic :

  • On Loaded - Triggers when the Statistic has been loaded successfully. The values can be retrieved using the expressions under "Load Statistic".

    • Statistic Name - Unique name of the Statistic.

  • On Load Failed - Triggers when the Statistic has failed to load. Probably either the "Name" can't be found or the "Version" is not available.

    • Statistic Name - Unique name of the Statistic.

  • On Any Loaded - Triggers when any Statistic has been loaded successfully. The values can be retrieved using the expressions under "Load Statistic".

  • On Any Load Failed - Triggers when any Statistic has failed to load. Probably either the "Name" can't be found or the "Version" is not available.


Get Statistics :

  • On Get Statistics - Triggers when the Get Player Statistics Succeeded.

  • On Get Error - Triggers when the Get Player Statistics failed with an error.

  • For Each Statistic - Loops through all the Player Statistics.


Get Statistic Versions :

  • On Get Statistic Versions - Triggers when the Get Player Statistic Versions Succeeded.

  • On Get Error - Triggers when the Get Player Statistic Versions failed with an error.

  • For Each Statistic Version - Loops through all the Player Statistic Versions.


Update Statistics :

  • On Update Statistics - Triggers when the Update Player Statistics Succeeded.

  • On Update Error - Triggers when the Update Player Statistics failed with an error.

Expressions

Leaderboards :

  • getDisplayName - Return the Leaderboards : Display Name, if available.

    • Index - The item index to get from the list.

  • getPlayFabID - Return the Leaderboards : PlayFab ID, if available.

    • Index - The item index to get from the list.

  • getPosition - Return the Leaderboards : Player Position, if available.

    • Index - The item index to get from the list.

  • getValue - Return the Leaderboards : Status Value, if available.

    • Index - The item index to get from the list.

  • getAvatarURL - Return the Leaderboards : Avatar URL, if available.

    • Index - The item index to get from the list.

  • loopLeaderboards - Return the Loop Index for the list on "For Each Leaderboards".

  • countLeaderboards - Return the Length of the list on "For Each Leaderboards".

  • getNextReset - Return the time the next scheduled reset will occur. "" if the leaderboard does not reset on a schedule.

  • getVersion - Return the version of the leaderboard returned.

Leaderboards : Tags :

  • countTags - Return the number of tags the player has.

    • Index - The item index to get from the list.

  • getTag - Return the full value of the tag, including namespace.

    • Index - The item index to get from the list.

    • TagIndex - The index to choose from the list of tags.

Load Statistic :

  • retStatName - Return the Loaded Statistic Name.

  • retStatValue - Return the Loaded Statistic Value.

  • retStatVersion - Return the Loaded Statistic Version.


Get Statistics :

  • getStatName - Return the Statistic Name.

    • Index - The item index to get from the list.

  • getStatValue - Return the Statistic Value.

    • Index - The item index to get from the list.

  • getStatVersion - Return the Statistic Version.

    • Index - The item index to get from the list.

  • loopStatistics - Return the Loop Index for the list on "For Each Statistics".

  • countStatistics - Return the Length of the list on "For Each Statistics".


Get Statistic Versions :

  • verStatName - Return the Statistic Name. The Name of the Statistic when the version became active.

    • Index - The item index to get from the list.

  • verStatVersion - Return the Statistic Version. The Version of the Statistic.

    • Index - The item index to get from the list.

  • verActivation - Return the Activation Time. The time when the statistic version became active.

    • Index - The item index to get from the list.

  • verDeactivation - Return the Deactivation Time. The time when the statistic version became inactive due to statistic version incrementing.

    • Index - The item index to get from the list.

  • verSchedActivation - Return the Scheduled Activation Time. The time at which the statistic version was scheduled to become active, based on the configured ResetInterval.

    • Index - The item index to get from the list.

  • verSchedDeactivation - Return the Scheduled Deactivation Time. The time at which the statistic version was scheduled to become inactive, based on the configured ResetInterval.

    • Index - The item index to get from the list.

  • loopStatisticVersions - Return the Loop Index for the list on "For Each Statistic Versions".

  • countStatisticVersions - Return the Length of the list on "For Each Statistic Versions".


Server Response :

  • ServerResponse - Return the "Server Response" from every request from the PlayFab Server. The server response can also be shown in the "Chrome Developer Tools : Console", if in "debug mode".


Request :

  • Tag - Return the "Tag" of the latest request.


Load :

  • Load - Returns the statistic value from a specified statistic name, retrieved from the latest leaderboard request.

    • StatisticName - Unique name of the Statistic.

 

Automatic Mode

Sample Setup Project

Specifications

  • Instructions - The sample project has comments and instructions on how to use the addon and its features.

  • A.C.E. Coverage - It covers the implementation of each action, condition and expression.

  • Tips and Tricks - It provides some tips and tricks to a better use of the addon and of the event-sheet system alongside it.

Supporters

Only

Manual Mode

Sample Setup Project

Specifications

  • Instructions - The sample project has comments and instructions on how to use the addon and its features.

  • A.C.E. Coverage - It covers the implementation of each action, condition and expression.

  • Tips and Tricks - It provides some tips and tricks to a better use of the addon and of the event-sheet system alongside it.

Supporters

Only

Automatic Advanced

Sample Setup Project

Specifications

  • Instructions - The sample project has comments and instructions on how to use the addon and its features.

  • A.C.E. Coverage - It covers the implementation of each action, condition and expression.

  • Tips and Tricks - It provides some tips and tricks to a better use of the addon and of the event-sheet system alongside it.

Supporters

Only

Manual Advanced

Sample Setup Project

Specifications

  • Instructions - The sample project has comments and instructions on how to use the addon and its features.

  • A.C.E. Coverage - It covers the implementation of each action, condition and expression.

  • Tips and Tricks - It provides some tips and tricks to a better use of the addon and of the event-sheet system alongside it.

Supporters

Only

Full Test Project

Sample Setup Project

Specifications

  • Instructions - The sample project has comments and instructions on how to use the addon and its features.

  • A.C.E. Coverage - It covers the implementation of each action, condition and expression.

  • Tips and Tricks - It provides some tips and tricks to a better use of the addon and of the event-sheet system alongside it.

Supporters

Only

Server Setup

The Leaderboards with PlayFab is implemented through syncing with the server, from then it should automatically be interconnected with all registered or synced platforms / network server both pre- and post-setup. Although, it requires a few steps to allow it from the server-side.

Front.png
Dashboard - Settings.png

Step 1 : Create an account in PlayFab, login if you already have one.

Step 2 : Click the application used in your project.

Step 3 : The Title's, a.k.a. the Game's Dashboard should appear, then select the sidebar option, Settings.

Settings - API - Allow Leaderboards.png

Step 4 : Select the API Features tab, then check the Allow client to post player statistics.

Leaderboards Page - Highlighted.png

Step 5 : Now select the sidebar option, Leaderboards. Then, the leaderboards of the game, player ranking, including all the statistics of each user are now accessible.

You can control everything here as the administrator.

Leaderboards Page - Highlighted.png

Step 6 : Finally, proceed with your learning and experimentation using the PlayFab Leaderboards - Game Project sample.

 
 

Platform Leaderboards Auto-Sync

The Leaderboards has its own statistics record, which is your company's player statistics record although you can choose to also mix-in from the leaderboards from other platform services like Google Play, Game Center and Facebook. If applicable, even from Steam, Xbox, Nintendo Switch and PS4.

Google Plus

Facebook

Game Center

Google Play

Company

Leaderboards Showcase

Due to the high-demand of Leaderboards and is frequently asked, I made an easy sample project. This teaches the basics of the concept of both the plugin and features. Although, piece-by-piece, I recommend you understand how it works, and apply it to the other features not covered in the easy project sample
For the full testing of features, try the second project, the full test project sample.

Learning this project will help you understand the workflow of the plugin, then you can then add the advanced features yourselves, like syncing alongside with 3rd party leaderboard services like Google Play, Game Center, Facebook and Xbox. Getting Leaderboards around players and friends, etc.

Remember to setup your PlayFab Console to allow Leaderboards, and setup the Game Client Profile Data for both the console and the PlayFab API to allow specific the data you need.

 
 

Get the tools

for your pro games!

Constuct Master Collection - Itch.io
Constuct Master Collection - Discord
Constuct Master Collection - Construct 3

© Construct Master Collection 2020 • All rights reserved

Contact Information:

Conditions