Integrate Player Progression and Level-Up Rewards

Track player progress and distribute rewards for each level-up. READYgg’s Game Module allows customizable progression functionality to game developers.

The Ready Games
ReadyGames
3 min readAug 13, 2023

--

When it comes to game progression, every game requires a solution that matches the nature of the game. For example, completing a level in a puzzle game will not look the same as winning a match in a MOBA. In both cases, however, the player continues to the next level and may be rewarded.

The benefit of integrating player progression with READYgg is simplicity combined with customizability. A player level-up is achieved with the following code:

using System.Collections.Generic;
using RGN.Modules.Currency;
using RGN.Modules.GameProgress;
using UnityEngine;

namespace SomeNamespace
{
internal sealed class GameCompleteLevelUp
{
public async void OnGameCompleteAsync()
{
OnGameCompleteResult onGameCompleteResult =
await GameProgressModule.I.OnGameCompleteAsync(
new List<Currency>() {
new Currency()
{
name = "rgntestCoin",
quantity = 25
}
});
string progressDebugStr =
JsonUtility.ToJson(onGameCompleteResult.gameProgress);
string currenciesDebugStr =
JsonUtility.ToJson(onGameCompleteResult.userCurrencies);
Debug.Log($"gameProgress: " +
$"{progressDebugStr}\n\r" +
$"currencies: {currenciesDebugStr}");
}
}
}

Player progression data regarding level-ups and rewards are stored on the READYgg backend. Each time an achievement is triggered, and a reward is distributed, the progression value is added to the user’s data on the backend. These values cannot be updated manually in order to preserve player integrity and remove the possibility of cheating.

Retrieve player progress data as follows:

using RGN.Modules.GameProgress;
using UnityEngine;

namespace SomeNamespace
{
[System.Serializable]
internal sealed class UserProgressionData
{
public int BattleScore;
public int Xp;
}

internal sealed class GetUserProgressionData
{
public async void GetUserProgressionDataAsync()
{
var result =
await GameProgressModule.I.
GetUserProgressionDataAsync<UserProgressionData>();
Debug.Log("User progression Xp: " + result.Xp);
}
}
}

To maximize customizability, you can store custom serialized classes in the READYgg database with the following code:

using RGN.Modules.GameProgress;
using UnityEngine;

namespace SomeNamespace
{
[System.Serializable]
internal sealed class CustomUserData
{
public int HitPoints;
public int RegenerateHealth;
public int HealthRegenDelay;
public int HealthRegenRate;
public string ModelUrl;
public string[] Bookmarks;
public float Health;
}

internal sealed class StoreCustomData
{
public async void StoreCustomDataAsync()
{
var data = new CustomUserData() {
HitPoints = 10,
RegenerateHealth = 10,
HealthRegenDelay = 39,
ModelUrl = "model_xyz_1",
Bookmarks = new string[] { "bookmark_1", "bookmark42" },
Health = 3.14f
};
UpdateUserLevelResponseData<CustomUserData> customUserData =
await GameProgressModule.I.UpdateUserProgressAsync(data, null);
Debug.Log("Custom user data updated, hit points: "
+ customUserData.playerProgress.HitPoints);
}
}
}

You can also retrieve custom data from the READYgg backend as follows:

using RGN.Modules.GameProgress;
using UnityEngine;

namespace SomeNamespace.GetCustomDataNS
{
[System.Serializable]
internal sealed class CustomUserData
{
public int HitPoints;
public int RegenerateHealth;
public int HealthRegenDelay;
public int HealthRegenRate;
public string ModelUrl;
public string[] Bookmarks;
public float Health;
}

internal sealed class GetCustomData
{
public async void GetCustomDataAsync()
{
var result =
await GameProgressModule.I.GetUserProgressAsync<CustomUserData>();
Debug.Log("Custom user data hit points: "
+ result.playerProgress.HitPoints);
}
}
}

Open Source

READYgg prides itself on providing the most complete open-source game development solutions that include fully integrated web3 functionality for any game to access. All integration code is publically available in the SDK documentation.

Developer Dashboard

Additionally, READYgg has built an intuitive dashboard to streamline and guide developer processes and integrations, providing state-of-the-art functionality at your fingertips.

Here’s a sneak peek at some of the functionality and tools the dashboard provides:

Dashboard signup is free for a limited time. Open your account at dev.ready.gg.

About READYgg

READYgg is a game development infrastructure provider for game studios, publishers, and developers to integrate cutting-edge web3 functionality built to accommodate players of all backgrounds in order to create a distributed, community-driven gaming ecosystem for all.

--

--

The Ready Games
ReadyGames

Making social games & infrastructure for the Web3/Game Dev creator economy. ready.gg