The Damned Pirates Society uses API3’s QRNG Quantum Randomness to power their gaming experience

The Damned Pirates Society uses API3’s QRNG Quantum Randomness to power their gaming experience

Random number generators (RNG) rank highly amongst the most common strategies dApps use to provide an immersive gaming experience. However, the blockchains that these dApps operate on are unable to natively provide access to RNG services and other alternatives, like block hash, can be manipulated. In May 2022, API3 launched QRNG, a quantum random number generator, as a way to provide truly random numbers to dApps. Permissionless by design, QRNG has seen thousands of requests ranging from dApps specializing in NFT minting to lotteries.

The Damned Pirates Society utilized QRNG

API3 has recently integrated QRNG into 6 more chains, including Arbitrum Nova. Using Arbitrum Nova & Moonbeam/Moonriver, The Damned Pirates Society (DPS) launched an on-chain strategy game, which allows you to tap into your inner pirate and send your Captain and Flagship on voyages to find treasure, grow your fleets, and earn Doubloons and rare NFT assets that can be traded.

The Damned Pirates Society have used QRNG to incorporate true randomness in several impactful ways throughout the in-game experience QRNG is used to:

Provide each player with a unique journey through the DPS world

DPS wanted to ensure that all players receive a unique gaming experience through the use of randomness. To provide true randomness, API3’s QRNG was utilized in the contracts associated with generating the order, type, and number of interactions within a DPS voyage.

Ensure truly random outcomes of in-game interactions

Inspired by 90s games, such as Final Fantasy VI and Pokémon, players can use a Pirate, Flagship, and other consumable NFT assets to guide the direction of their voyage. As a result of these interactions, the player’s ships and economy can be damaged, or reward chests can be unlocked. In these scenarios, QRNG was used as a provable source of truth for the interaction outcomes by providing a random number that is then attributed to the various scenarios.

Unlock truly fair reward boxes

The Damned Pirates Society provides players with two loot box reward components. The first component calls QRNG to decide if a player receives a normal or an ultra-rare reward. If the reward is decided to be ultra-rare, QRNG is called again to assign attributes to the loot reward.

How was QRNG integrated with The Damned Pirates Society?

The DPSQRNG.sol contract implements the QRNG request by generating a random number or an array of random numbers that can be used anywhere in the game. When called, the DPSQRNG contract submits a request for the random numbers to the protocol contract, AirnodeRrpV0.

API3’s first-party oracle solution, Airnode, then gathers the request from AirnodeRrpV0, retrieves the random number(s) off-chain, and sends it back to the contract. Once received, the contract performs a callback to the DPSQRNG requester with the random number(s). DPS then utilizes the product of the requester in the aforementioned functions.

“QRNG was appealing to the quality of RNG generated. It was easy and simple to use — the team was really helpful when integrating it into our contracts.”

Davy Jones — Lead Contributor, Damned Pirates Society

Summary

API3 is pleased to have expanded the reach of QRNG to the Arbitrum Nova chain and support quantum random numbers being used within gaming dApps. The Damned Pirates Society has implemented the oracle service across creative and impactful use cases that will be experienced by gamers across the globe. We look forward to seeing DPS flourish and additional on-chain games utilize QRNG.

If you want to find out more about QRNG you can get started by viewing the QRNG documentation or QRNG guides below:


The Damned Pirates Society uses API3’s QRNG Quantum Randomness to power their gaming experience was originally published in API3 on Medium, where people are continuing the conversation by highlighting and responding to this story.