Add magic seasoning to your game
In modern games, ranking systems and achievement systems are typically implemented through a combination of in-game mechanics and online platforms. Ranking systems and achievement systems are beneficial to games in several ways:
- Competition and Motivation: Ranking systems allow players to compete against each other, creating a sense of competition and motivating players to improve their skills. Players strive to climb the ranks and achieve higher positions, which keeps them engaged and invested in the game.
- Social Interaction: Ranking systems encourage social interaction among players. Players can compare their rankings with friends or other players, fostering a sense of community and friendly rivalry. This can lead to increased player engagement and retention.
- Progression and Goals: Achievement systems provide players with goals and objectives to work towards. By completing specific tasks or reaching milestones, players are rewarded with achievements, badges, or other in-game rewards. This sense of progression and accomplishment keeps players engaged and gives them a sense of satisfaction.
- Player Retention: Ranking systems and achievement systems can significantly improve player retention. By providing a constant sense of progress and reward, players are more likely to continue playing the game over an extended period. This helps to build a dedicated player base and ensures the longevity of the game.
Now, in the Gandi IDE, you can add a complete leaderboard and achievement system to your Scratch game. It looks like this:
You can try it by yourself and remix this project to see the code.
Let’s see how to set up them step by step.
Before starting, please create a project in the Gandi IDE and install the Achievement & Leaderboard extension.
🥇 Leaderboard
Step 1: Create a leaderboard
You need to create a leaderboard first and make some settings for it.
Click the button on the left side.
The options for settings are very simple and easy to understand. You can also see the style of the leaderboard in the interface.
When a leaderboard is created, you can also modify or delete it.
Step 2: Control the leaderboard with blocks
In the Achievement & Leaderboard extension, there are several blocks for leaderboard.
You can use this block to show the leaderboard, and choose to pause or don’t pause the game when the leaderboard is popped up.
Usually, you can make a button in your game to open the leaderboard.
With this hat block, you can run a script when the pop-up leaderboard window is closed.
Use this block to add a score of the current user to the leaderboard. You can also add a log if you need it.
In the leaderboard panel, you can check all data in a leaderboard and delete some of them.
You can use these two blocks to get information about a user at a certain position on the leaderboard, or the current user's ranking and score on the leaderboard.
🏆 Achievement
Step 1: Create achievements
You can create several achievements for your game. When you create an achievement, you need to prepare an image for this achievement, give it a name, and describe it.
You can choose to set it as a normal one or a easter egg.
If the achievement is a normal one, a player can read the description of it even if the player did not get it.
If the achievement is an easter egg, the description will be hidden before the player get it.
You can click these two button to preview the obtained status and the not obtained status.
Step 2: Control achievements with blocks
In the Achievement & Leaderboard extension, there are several blocks for achievements.
To use these blocks, don’t forget to reload the achievement list.
You can use this block to open the achievement pop-up window, and choose to pause or don’t pause the game when the achievement panel is popped up.
Usually, you can make a button in your game to open the achievement panel.
With this hat block, you can run a script when the pop-up achievement panel is closed.
You can use this block to let the current player obtain an achievement with or without a pop-up notice. It looks like this:
Use these two blocks to check whether the current player has an achievement or not.
The id of an achievement can be found on the achievement card.
Use this block to update an achievement for the current player with extra data.
I am looking forward to seeing how everyone applies achievements and leaderboards in your own games. If you have any questions, please feel free to join our Discord server for discussion.