Achievement


Giving your players goals to work toward can be a simple way to make your players stick to your game to unlock them. Achievements are a very smart way to reward and encourage player interaction within your game. Players always like to reach some milestones.

ServerBytes achievement plugin helps you to achieve that.

Installation

To add Achievements to your game, simply download Unity package and import it into the Unity game, or download Nuget package.


Client

Client setup

The very first step to initialize the plugin is to setup the plugin host:

var pluginHost = ClientFactory.GetPluginHost(appKey);
var achievementFactory = new AchievementFactory(pluginHost, ClientFactory.JsonSerializer);

// instantiate other plugins

var client = UnityClientFactory.GetClient(pluginHost);

Client.OnConnected += Client_OnConnected;
Client.OnFailedToConnect += Client_OnFailedToConnect;
Client.OnDisconnected += Client_OnDisconnected;
Client.Connect();


Read more about intallation here

Now, that we are connected with plugin, we can start using one of the plugin services:

private void Client_OnConnected()
{
    IAchievementService achievementService = achievementFactory.Create(Client);
}

Services

Check client services here

Web UI

The Web UI allows game administrators to manage configurations for your achievements. This means you can create new achievements, update existing ones, and to follow up the statuses of user achievements.

Create new achievement

These are the common elements associated for all achievements:

  • Name represent the name of the achievement. It can be between 3 and 32 characters long, for example: "Complete 100 games". Name can contain alphanumeric characters, and extra symbols such as hyphen (-), underscore (_) or dot (.).
  • ShortCode is a special unique abbreviation. Once you create an achievement, it can not be modified. Accepted format for shortcode is: [0-9a-zA-Z_] and it can be between 3 and 20 characters long.
  • Unlock Value is a positive number, and it can not be modified. Once the user reached this value, the achievement will be unlocked.
  • Incremental is an option for updating the value of the achievement.
  • State can be 'Revealed' or 'Hidden'. Use 'Hidden' If you don't want to spoil your players about achievement.
  • DisplayMessage represents detailed info about the achievement to notify the user when completes the achievement.
  • Achieved Icon will be displayed when achievement is unlocked.
  • Unachieved Icon will be displayed for not achieved user achievements. Icon size is limited to 300kb.
  • Data is an additional field for storing custom achievements data in JSON format.

Create achievement

List Achievements

Displays a list of created achievements with associated data. Select a specific achievement from the list to enter a detailed view to update it.

List achievements

Edit Achievement

When editing Achievement data must be provided for the fields which are to be edited, like name, incremental, state, display message, data, and adding/removing achieved or unachieved icons. All changes will be saved by clicking the Update button.

Delete Achievement

Delete achievment by selecting Delete button. Confirm deeting by typing in the achievement shortcode in the confirmation dialog. Deleted achievement will be permanently removed.

NOTE: All users will permanently lose progress for this achievement.

User status

In the user achievement section, you can see which achievements a particular user has. You can do this by filtering by the user. If the required user exists, statistics and achievements will appear in a table. Statistics has four cards: Total, Achieved, Revealed, and Hidden. Column Completed % in the table is showing the progress of the achievement.

User status

results matching ""

    No results matching ""