RNG Service

Call randomness to defeat cheaters

Random Number Generator

The RNG service in this gaming API provides randomness for various aspects of the game, ensuring fairness, unpredictability, and security. It adds excitement, prevents bias, enhances game balance, and deters cheating.

Simple Random Number Generator function return with array of HEX number

GET API_END_POINT_URL/API_KEY/random/RNG_LENGTH/RNG_COUNT

Query Parameters

Name
Type
Description

API_KEY*

String

API KEY

RNG_LENGTH*

Integer

Length of Hex number

RNG_COUNT*

Interger

Number of returned results

{
    "success": true,
    "data": [
        "324fe8b8a143c83a03131b6d80cb6fe2",
        "5dfeb015a94d0952534c92fd5cc5d6a9",
        "d7c4b41bc0ea88a56bd6cd51f878fcb5",
        "f98855bd84800bb0c0ef7ce9fba09ef4"
    ]
}

Randomness function + Seed String

You can use Seed String to always generate fixed results.

GET API_END_POINT_URL/API_KEY/random/RNG_LENGTH/RNG_COUNT/SEED_STRING

You can utilize a future Block Hash as a seed to obtain an unpredictable but verifiable random number. The result will always be consistent with the provided seed string.

Query Parameters

Name
Type
Description

API_KEY*

String

API KEY

RNG_LENGTH*

Integer

Length of Hex number

RNG_COUNT*

Interger

Number of returned results

SEED_STRING*

String

Any String / Block Hash / Reference String from your side

{
    "success": true,
    "data": [
        "689957ac83b4dc6a8c11c61cb9717484",
        "39f1d2aa5f7cef567996e26fd09ccc37",
        "f877260c00449810e5a89442068105a3",
        "0bb6827d0d4d9687e0da04a78cb2c4cc",
        "c5e12dd1ad8b58989883a422cd6ae1d2"
    ]
}

Use Cases

  1. Gameplay Mechanics: Many games rely on random elements, such as random encounters, loot drops, critical hits, or chance-based events. The RNG service provides a source of randomness to determine the outcomes of these events, making the gameplay more exciting and unpredictable.

  2. Fairness in Competitions: In multiplayer or competitive games, the RNG service can be used to ensure fairness among players. For example, when determining matchmaking, allocating resources, or deciding turn orders, randomization helps prevent bias or favoritism and creates a level playing field for all participants.

  3. Security and Encryption: Randomness is crucial in cryptographic operations and security protocols. The RNG service can generate random cryptographic keys, initialization vectors, or nonce values, which are essential for encryption, secure communications, and preventing unauthorized access.

  4. Game Balance and Variability: Randomness adds an element of variability to the game, preventing repetitive patterns and creating unique experiences. By incorporating random elements, the game becomes less predictable, enhancing replayability and player engagement.

  5. Anti-Cheating Measures: RNG can be used to deter cheating or exploit attempts within the game. For instance, randomizing critical game values or outcomes makes it harder for players to manipulate or predict results through unauthorized means.

By utilizing an RNG service within the ZooGames API, developers can ensure that the game's outcome is determined in a fair, unbiased, and unpredictable manner. It enhances the gaming experience, maintains game balance, strengthens security measures, and fosters a more enjoyable and competitive environment for the players.

Last updated