How do I enable leaderboards on my game?

The first step is to enable leaderboards on your game. Refer to How to adjust the game rule settings? for doing so. With leaderboards enabled, define in the game settings whether you want to base it on Score Points or Time. See below how both leaderboards reflect in the game.

Remember! You have to publish your game and play-test it from the discovery screen (not the play-test inside the creation mode) for the leaderboard to appear.

Score on the Leaderboards

1

First Step

2

Second Step

Decide what will trigger the behavior. This could be an action like a collision, an interaction, or players entering a game. Select a “Trigger” box and drag it into the editor.

3

Third Step

Navigate to the “Game Actions” section, and select either the ‘Set Score’ or ‘Add Score’ blocks. In the example below, we use the ‘Add Score’ block when the player interacts with an object, incrementing his game score. You might want to use leaderboard scores to encourage competition in your game.

4

Fourth Step

Exit the Behavior Editor, playtest and ensure it works as expected!

Time on the Leaderboards

1

First Step

2

Second Step

Decide what will trigger the behavior. This could be an action like a collision, an interaction, or players entering a game. Select a “Trigger” box and drag it into the editor.

3

Third Step

Navigate to the “Game Actions” section, and select either the ‘End Game For Player Score’ or ‘End Game’ blocks. In the example below, we use a slightly more complex approach where we send an event called “finish” and capture that event to end the game. Alternatively, you can pick an easier path and just finish the game right away with your trigger block instead of using events for it.

4

Fourth Step

Exit the Behavior Editor, playtest and ensure it works as expected!