Skip to main content
Version: 28.0.5

Skillz Random and Fairness

Random numbers can be essential to many different types of games. However, it also causes fairness concerns when playing in Skillz tournaments. In order to address the potential imbalance caused by random numbers, the Skillz SDK has methods to generate random numbers; the numbers returned by Skillz are in the same sequence for each player in a match.

The Skillz random generator ensures that each competitor in a match receives the exact sequence of random values to maintain fairness.

API Methods​

This lists the most commonly used methods. View the exhaustive list here.

SkillzCrossPlatform.Random.Value()
Returns​

A generated pseudo random float value


SkillzCrossPlatform.Random.Range(float min, float max)
Parameters​

min The minimum float value of the range

max The maximum float value of the range

Returns​

A generated pseudo random float value within the range given

The Random function Range(float min, float max) requires the min and max value range (max-min) to be no larger than Float.MaxValue to prevent overflow.


SkillzCrossPlatform.Random.Range(int min, int max)
Parameters​

min The minimum int value of the range

max The maximum int value of the range

Returns​

An int value within the range given

The Random function Range(int min, int max) requires the min and max value range (max-min) to be no larger than Int.MaxValue to prevent overflow.

Considerations​

Please be aware that use of the Skillz random methods does not guarantee that all players will have an identical game experience. These methods can only ensure that players get the same sequence of random numbers. Over time, the player’s decisions may diverge and the same random number will not be used in the same place.

There may be places where the random decision is trivial to the outcome of the game, or purely aesthetic; in that case we recommend you do not use the Skillz random methods to reduce the chances of making a different number of calls between players.

Ensure Players Cannot Obtain Advantages from Outside the Game​

With the potential for real money to be awarded to one player or another, be certain that players won’t have any edge based on factors outside the tournament they are playing. Examples of this include items obtained from in-app purchases or bonuses gained from playing in single-player mode. This is highly specific to each individual game, but if there are any ways for players to obtain in-game bonuses these should be disabled when playing with Skillz.

Utilizing Bots in Gameplay​

It's imperative to ensure fairness, player satisfaction and to maintain the integrity of the gameplay experience.

When integrating bots into your gameplay experience, consistency is key. A bot, by design, allows the computer to manage aspects of gameplay, typically acting as a player’s opponent or/and player’s challenges. The bot behavior in your game must be deterministic, meaning that given the same set of player inputs or conditions, it must always produce the same bot behavior.

Skillz Gameplay Modes​

Skillz offers two distinct gameplay modes: Real-time and Play-and-Compare.

Real-time mode​

In this mode, bots are only permitted during the First Time User Experience, which consists of the mandatory Z tournaments a player goes through after a new install. The primary goal of the synchronous bot opponents is to educate the players on the game mechanics while also giving them an idea of the in-game experience.

Play-and-Compare mode​

Given the asynchronous nature of this mode (where players "play and compare"), when bots are present, players must face identical bots to ensure fairness. These bots are tailored to deliver consistent experiences.