Skip to main content
Version: 26.2.9

Skillz Random and Fairness

NOTE

The Skillz random number generator ensures that each competitor receives the exact same number.

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 SDK has functions for integers including nextInt, and nextInt(min, max). There are also methods for other data types, including nextBoolean, nextDouble, and nextBytes, among others.

The function nextInt returns a pseudo random number between 0 and RAND_MAX, while nextInt(min, max) lets you specify your own range (min inclusive, max exclusive).

Below are some examples:

SkillzCrossPlatform.Random.Value();

NOTE

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

NOTE

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

Considerations

Please be aware that just because you use either 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, we’ll need to 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.