Dynamic Races

KB
Version 10
Updated 5 months ago
1 chunks
View in Confluence

Content

Introduction

In this guide, you’ll learn…

  • What are Dynamic Races?

  • Configuring Dynamic Races

  • Bot Speed Calculations in Dynamic Races

Overview

Races are time-limited in-game mechanisms, where users compete against a configurable number of bot adversaries to complete targets.

Players receive rewards based on their final position in the race. While rewards are commonly given for finishing in the top three, there's no hardcoded limit and it's possible to configure rewards for additional positions as well. The race concludes when the player or bots finish, or when the event’s time limit expires.

The event has a defined start and end date. There is a possibility of re-running the races multiple times, one at a time. Hawk provides possibility to configure single stage race, or multi-stage race where player can progress across different stages.

Dynamic Races introduce a new way to configure races based on player speed attributes. Instead of using fixed values, admins can define formulas that adapt to player performance, making races more dynamic and personalised.

As with other activity types, activity sticks to the player from the moment the player is assigned there. However, for races Hawk doesn’t stick the activity to the player. It means that if the player changes segment during an ongoing event, Hawk will start to serve race configuration associated with their new segment.

Dynamic Races Highlights

  • A single formula-based configuration adapts speeds dynamically.

  • Admins only need to define a base speed formula for both players and bots.

  • No need to create multiple static configurations.

Personalisation for Players

Dynamic Races allow real-time difficulty adjustments based on a player’s individual performance.

Instead of using static speed values , races can now adapt using player attributes like:

  • avg_win_time_20_lvl (average time taken by a player to win a single level , based on the last 20 levels).

  • This ensures that races are:

Reducing Manual Configuration Effort

Before Dynamic Races, product teams needed to manually create multiple predefined difficulty levels:

  • Very Slow

  • Slow

  • Medium

  • Fast

  • Very Fast

Each segment required separate race configurations with different speed values.

Making Bots More Realistic

Static bots follow predictable speed patterns, making races repetitive.

With Dynamic Races, bots get:

  • Varying speeds per target (controlled randomness).

  • Adaptive difficulty scaling based on real player data.

Example:

  • If a player improves over time, bots automatically get hard with each race.

  • If a player struggles, bots slow down, making races feel fair.

Configuring Dynamic Races

To configure Races, follow the steps below:

  1. In your game, navigate to Events < Races , and click [+ Add Race].

  2. Add a name for your race and select the availability.

  3. Then, input the Player Speed Reference, which represents the average time (in seconds) for a player to complete a level. This reference is used to calculate bot speeds only when the client is responsible for determining bot speeds.

  4. Under Target , input the number of targets the player needs to reach to finish the race.

Your target can vary, for example: from completing levels to collecting tiles. In most races, the target is defined as the number of levels a player needs to win to complete the race.

image-20250211-121716.png

Race Template – Allows selecting a predefined race template. Selecting a race template will lead to populating the parameters for the race. See the Activity Templates User Guide for more details.

image-20250403-131049.png

Bot Configuration

  • Bot Speed Reference:

  • Bot Speed Reference Fallback:

  • Minimum & Maximum Range (Percentage):

Important: None of these fields can be empty when saving the race.

image-20250211-122607.png

You can add as many bots as needed.

Reward Configuration

To create the rewards for players who finish the Event, click [+Add Rank], and select a game item to provide as a reward.
You can add more than one reward, and you can also create more than one Rank. Rank represents rewards for different positions in the race. You can change the rank with arrows on the side.

image-20250211-122846.png

Bot Speed Calculations in Dynamic Races

The server calculates bot speeds dynamically based on Bot Speed Reference and Min/Max Range percentages.

These calculations ensure that bot difficulty is adjusted per race while maintaining overall fairness.

Formula for Bot Speed Calculation

For each bot in a race, the server follows these steps:

  1. Determine Total Bot Speed

  2. Determine Speed per Target

Example Calculation

Scenario

  • Bot Speed Reference = 10 Seconds

  • Total Targets = 3

  • Min Range = -20%

  • Max Range = +30%

Step 1: Calculate Total Bot Speed

Total Bot Speed = 10×3 = 30 seconds

Step 2: Random Speed Adjustments Per Target

  • The server picks random values within the range (-20% to +30%).

  • Example random values:

Step 3: Compute Adjusted Speed for Each Target

  • Speed for Target 1 = 10×(1+0.15) = 11.5 sec

  • Speed for Target 2= 10×(1−0.10)= 9 sec

  • Speed for Target 3=1 0×(1+0.05)=10.5 sec

Step 4: Validate Total Bot Speed

11.5+9+10.5 = 30 sec (Total Bot Speed is maintained)

Thus, the bot speed per target is dynamically adjusted while keeping the total race time unchanged.

Key Takeaways

  • Bot speeds fluctuate per target to create variability in difficulty.

  • Bot speeds are recalculated with each request to ensure balance. However, once a race starts, the client fixes the received bot speeds until the race ends, ensuring consistency for that race.

  • The percentage range provides randomness, preventing predictable bot behaviour.


Selecting Dynamic Races as an Activity

  • Users can select the activity type: "Dynamic Races" while configuring an event.

  • Once selected, an Activity Configuration dropdown allows choosing from the configured dynamic races.


Chunks 1

1
# Introduction In this guide, you’ll learn… - What are Dynamic Races? - Configuring Dynamic Ra...
Vectorized

# Introduction

In this guide, you’ll learn…

- What are Dynamic Races?

- Configuring Dynamic Races

- Bot Speed Calculations in Dynamic Races

# Overview

Races are time-limited in-game mechanisms, where users compete against a configurable number of bot adversaries to complete targets.

Players receive rewards based on their final position in the race. While rewards are commonly given for finishing in the top three, there's no hardcoded limit and it's possible to configure rewards for additional positions as well. The race concludes when the player or bots finish, or when the event’s time limit expires.

The event has a defined start and end date. There is a possibility of re-running the races multiple times, one at a time. Hawk provides possibility to configure single stage race, or multi-stage race where player can progress across different stages.

Dynamic Races introduce a new way to configure races based on player speed attributes. Instead of using fixed values, admins can define formulas that adapt to player performance, making races more dynamic and personalised.

As with other activity types, activity sticks to the player from the moment the player is assigned there. However, for races Hawk doesn’t stick the activity to the player. It means that if the player changes segment during an ongoing event, Hawk will start to serve race configuration associated with their new segment.

## **Dynamic Races Highlights**

- A single formula-based configuration adapts speeds dynamically.

- Admins only need to define a **base speed formula** for both players and bots.

- No need to create multiple static configurations.

### **Personalisation for Players**

Dynamic Races allow **real-time difficulty adjustments** based on a player’s individual performance.

Instead of using **static speed values** , races can now adapt using **player attributes** like:

- **avg\_win\_time\_20\_lvl** (average time taken by a player to win a single level , based on the last 20 levels).

- This ensures that races are:

### **Reducing Manual Configuration Effort**

Before Dynamic Races, product teams needed to manually create multiple predefined difficulty levels:

- Very Slow

- Slow

- Medium

- Fast

- Very Fast

Each segment required separate race configurations with different speed values.

### **Making Bots More Realistic**

Static bots follow predictable speed patterns, making races repetitive.

With Dynamic Races, bots get:

- Varying speeds per target (controlled randomness).

- Adaptive difficulty scaling based on real player data.

Example:

- If a player improves over time, bots automatically get hard with each race.

- If a player struggles, bots slow down, making races feel fair.

## Configuring Dynamic Races

To configure Races, follow the steps below:

1. In your game, navigate to **Events \< Races** , and click **[+ Add Race]**.

2. Add a name for your race and select the availability.

3. Then, input the Player Speed Reference, which represents the average time (in seconds) for a player to complete a level. This reference is used to calculate bot speeds **only when the client is responsible for determining bot speeds**.

4. Under **Target** , input the number of targets the player needs to reach to finish the race.

Your target can vary, for example: from completing levels to collecting tiles. In most races, the target is defined as the number of levels a player needs to win to complete the race.

![image-20250211-121716.png](https://tripledotstudios.atlassian.net/wiki/download/thumbnails/4124704829/image-20250211-121716.png?version=1&modificationDate=1742898119269&cacheVersion=1&api=v2&width=777&height=402)

**Race Template** – Allows selecting a predefined race template. Selecting a race template will lead to populating the parameters for the race. See the [Activity Templates](/wiki/spaces/KB/pages/4124409886/Parameters+and+Activity+Templates#Activity-Templates) User Guide for more details.

![image-20250403-131049.png](https://tripledotstudios.atlassian.net/wiki/download/thumbnails/4124704829/image-20250403-131049.png?version=1&modificationDate=1743685851443&cacheVersion=1&api=v2&width=1111&height=250)
### **Bot Configuration**

- **Bot Speed Reference:**

- **Bot Speed Reference Fallback:**

- **Minimum & Maximum Range (Percentage):**

Important: None of these fields can be empty when saving the race.

![image-20250211-122607.png](https://tripledotstudios.atlassian.net/wiki/download/thumbnails/4124704829/image-20250211-122607.png?version=1&modificationDate=1742898119276&cacheVersion=1&api=v2&width=1111&height=643)

You can add as many bots as needed.

### **Reward Configuration**

To create the rewards for players who finish the Event, click **[+Add Rank]**, and select a game item to provide as a reward.
You can add more than one reward, and you can also create more than one Rank. Rank represents rewards for different positions in the race. You can change the rank with arrows on the side.

![image-20250211-122846.png](https://tripledotstudios.atlassian.net/wiki/download/thumbnails/4124704829/image-20250211-122846.png?version=1&modificationDate=1742898119283&cacheVersion=1&api=v2&width=1111&height=685)
## **Bot Speed Calculations in Dynamic Races**

The server calculates bot speeds dynamically based on Bot Speed Reference and Min/Max Range percentages.

These calculations ensure that bot difficulty is adjusted per race while maintaining overall fairness.

### **Formula for Bot Speed Calculation**

For each bot in a race, the server follows these steps:

1. Determine Total Bot Speed

2. Determine Speed per Target

### **Example Calculation**

**Scenario**

- **Bot Speed Reference** = 10 Seconds

- **Total Targets** = 3

- **Min Range** = -20%

- **Max Range** = +30%

**Step 1: Calculate Total Bot Speed**

Total Bot Speed = 10×3 = 30 seconds

**Step 2: Random Speed Adjustments Per Target**

- The server picks random values **within the range (-20% to +30%)**.

- Example random values:

**Step 3: Compute Adjusted Speed for Each Target**

- Speed for Target 1 = 10×(1+0.15) = 11.5 sec

- Speed for Target 2= 10×(1−0.10)= 9 sec

- Speed for Target 3=1 0×(1+0.05)=10.5 sec

**Step 4: Validate Total Bot Speed**

11.5+9+10.5 = 30 sec (Total Bot Speed is maintained)

Thus, the bot speed per target is dynamically adjusted while keeping the total race time unchanged.

### **Key Takeaways**

- Bot speeds fluctuate per target to create variability in difficulty.

- Bot speeds are recalculated with each request to ensure balance. However, once a race starts, the client fixes the received bot speeds until the race ends, ensuring consistency for that race.

- The percentage range provides randomness, preventing predictable bot behaviour.

* * *

## **Selecting Dynamic Races as an Activity**

- Users can select the activity type: **"Dynamic Races"** while configuring an event.

- Once selected, an **Activity Configuration** dropdown allows choosing from the configured dynamic races.

* * *

Vector dimensions: 1536

Details

Confluence ID
4124704829
Space Key
Version
10
Created
November 06, 2025 at 11:34 AM
Last Updated
November 06, 2025 at 11:34 AM
Last Modified (Confluence)
July 01, 2025 at 12:44 PM
Content Size
6.98 KB