View as Markdown
Daily Bonus streak calendar in Fruit Fall showing consecutive login rewards with increasing value
Fruit Fall by Gram Games uses Hiro Streaks System for Daily Bonus

Streaks

The Hiro Streaks System is a versatile feature designed to enhance player engagement and competitiveness by rewarding consecutive wins. These wins can be tracked, and rewards can be configured to motivate players to reach certain streak thresholds by maintaining momentum. This feature enhances player engagement by adding an extra layer of challenge, encouraging skill mastery, and creating competitive tension.

Customization parameters #

The following JSON represents the customization parameters you can use to configure the default user experience for the Streaks system.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
{
  "streaks": {
    "wins": {
      "name": "Consecutive Wins",
      "description": "Number of consecutive wins, without any losses.",
      "count": 0,
      "max_count": 9,
      "max_count_current_reset": 3,
      "idle_count_decay_reset": 9,
      "reset_cronexpr": "0 0 * * *",
      "rewards": [
        {
          "count_min": 3,
          "count_max": 3,
          "reward": {
            "guaranteed": {
              "currencies": {
                "coins": {
                  "min": 10
                }
              }
            }
          }
        },
        {
          "count_min": 6,
          "count_max": 6,
          "reward": {
            "guaranteed": {
              "currencies": {
                "coins": {
                  "min": 30
                }
              }
            }
          }
        },
        {
          "count_min": 9,
          "count_max": 9,
          "reward": {
            "guaranteed": {
              "currencies": {
                "coins": {
                  "min": 100
                }
              }
            }
          }
        }
      ]
    }
  }
}

Streak #

PropertyTypeDescription
auto_claimboolWhether the streak’s rewards should be given automatically as progress is updated.
namestringThe display-friendly name for this streak.
descriptionstringThe description text for this streak.
countint64The initial progress for this streak.
max_countint64The maximum progress that this streak can achieve.
max_count_current_resetint64The maximum count that can be submitted within the same reset interval.
idle_count_decay_resetint64The amount of count that will be decreased if no count is submitted within the reset interval.
max_idle_count_decayint64The maximum amount of count that can be decreased if no count is submitted over consecutive reset intervals.
reset_cronexprstringThe reset schedule expressed in CRON format.
time_offset_secint64The offset to be applied to the start, end and reset times to allow local time scheduling.
grace_window_secint64Extra time that the user has to stop their streak from decaying if they didn’t update within the defined reset period.
rewardsStreakRewardThe rewards that a user should receive once they complete certain streak checkpoints.
start_time_secint64The start time (expressed as a UNIX timestamp) for this streak.
end_time_secint64The end time (expressed as a UNIX timestamp) for this streak.
disabledboolUsed to disable this streak without removing it from the data definition.

Streak Reward #

PropertyTypeDescription
count_minint64The minimum count required to receive this reward.
count_maxint64The maximum count required to receive this reward.
rewardRewardThe rewards that a user should receive at each count between count_min and count_max.

Streak state #

When you list or update a streak, Hiro returns a streak object that includes both the configured values above and the following runtime state fields. These are read-only and reflect the player’s current progress.

PropertyTypeDescription
idstringUnique identifier for this streak.
countint64The current overall progress count.
count_current_resetint64The progress count submitted during the current reset interval.
prev_reset_time_secint64When the streak’s previous reset period was. UNIX time for gRPC clients, ISO string for REST clients.
reset_time_secint64When the streak’s next reset period is. UNIX time for gRPC clients, ISO string for REST clients.
create_time_secint64When the streak was first registered for this user. UNIX time for gRPC clients, ISO string for REST clients.
update_time_secint64When the streak was last updated. UNIX time for gRPC clients, ISO string for REST clients.
claim_time_secint64When the streak was last claimed. UNIX time for gRPC clients, ISO string for REST clients.
rewardsStreakAvailableRewardAll rewards configured for this streak, with their current availability.
available_rewardsStreakAvailableRewardRewards currently available to claim for this streak.
claimed_rewardsStreakRewardRewards that have already been claimed.
can_claimboolWhether this streak can currently be claimed to obtain rewards.
can_updateboolWhether submitting a count update is currently allowed.
can_resetboolWhether resetting the streak is currently allowed.
claim_countint64The last count that was claimed.
max_count_reachedint64The highest count this streak has ever reached. It only increases, is not reduced by idle decay, and is cleared when the streak is reset.

Programmatic state control #

Beyond the client APIs (see the Unity streaks reference , for example), Hiro gives studios programmatic control over streak state for live-ops and customer support flows. See the server framework streaks reference for details and usage.

Additional Information #