Gaming Integration - High-Level Guide

Increase player engagement and revenue

What's included?

This guide covers the befits of using Shinami to bring elements to your game to the Sui blockchain. It also covers the developer resources needed for getting a game integrated with Sui and Shinami. Finally, it shows you an example image of a player-owned NFT read and update flow that could occur during gameplay.

Why Sui and Shinami?

Infusing your game with assets users can earn, own and upgrade is a powerful way to increase engagement. Allowing players to have control over using, displaying, and trading these items gives them an enhanced sense of connection to your game and pride in their in-game accomplishments. It can also help build a vibrant community around your game, as players interact with each other and display their assets for yet-to-be-acquired users to see. Letting players sell their items adds a new way for both the players and your game to make money on what the players are doing anyway: having fun paying your game. Sui even has a built-in mechanism your game can use to enforce royalty payments if a player sells a game asset on a marketplace run by another company(see Mysten's blog post on Sui Kiosk for more info).

The Sui blockchain is designed from the ground up to support the needs of large scale, highly-performant games. Shinami is the Sui ecosystem's leading developer platform, offering all the services games need to deliver on the promise of Web3 gaming.

Object-centric with dynamic, composable objects

Sui is a blockchain built from the ground up to treat objects as first-class entities (as opposed to an account-centric model). Objects are not entries in a smart contract. They are stored directly on chain, making them more secure and accessible. NFTs are objects on Sui, and in the rest of this guide we'll use object, NFT, and player asset to refer to the same idea: an in-game asset represented by an NFT you give to a player (which is an object on the Sui blockchain).

NFTs on Sui can be dynamic. Game developers can alter NFT metadata without having to burn and reissue them, which means you can make changes to your game and reflect those changes in existing player assets. They can be composable, meaning that an NFT owned by a player can itself own an NFT - for example, a hero the player owns can be equipped with a sword. Dynamic, composable NFTs allow for countless possibilities to evolve and enhance your players' NFTs - and thus game experience - as they accomplish in-game tasks.

Low latency with predictably low fees.

Sui is highly-scalable and allows for parallel execution of independent transactions. For example, updating an NFT owned by a player doesn't require waiting on global transaction sequencing. This allows for transactions to have the sub-second speeds needed to give your players low latency.

The architecture is horizontally scalable, allowing for predictable, affordable transaction prices (as opposed to the huge spikes in transaction fees you see when a big NFT project launch on Ethereum).

Web3 apps with a Web2 UX. Powered by Shinami.

Shinami is the leading developer platform for apps on Sui. We offer a world-class Node Service for reading and writing to the blockchain, with low-latency and high-availability. We provide both app-controlled and user-controlled wallet infrastructure, both of which let you abstract away friction like signing popups, requiring players to download a wallet application, and other UX hurdles that would turn web2 gamers away. We also offer Shinami Gas Station, which most games use to sponsor the gas fee for their users' transactions, offering a seamless free to play experience. This means that when a player uses an NFT representing a game asset, they don't have to go through a long KYC process to buy Sui for the small gas fee.

Developer resources

Sui Move game and transaction code

Prior to integrating with Shinami, you should create and deploy Sui Move smart contracts to manage your on-chain assets (characters, items, etc.) and game logic. You'll use Programmable Transaction Blocks to build the transactions that interact with your on-chain assets and smart contracts (using Sui's SDK for this is recommended, alongside using our Shinami Clients SDK for interacting with Shinami's services).

Shinami services to power your game

Shinami has all the services games need to deliver on the promise of Web3 gaming:

  • Node Service:: enterprise-grade infrastructure to read/write to the Sui blockchain. Use this to mint, read, and update NFTs, as well as deploy and update your game's smart contracts.
  • WebSocket Service : subscribe to real-time events for your players' wallets, such as imports.
  • Gas Station: sponsor the gas fees for transactions involving your users' wallets for a seamless free to play experience.
  • Wallet Services - abstract away signing popups, seed phrases, and other web3 friction for a smooth UX
    • Invisible Wallet:: app-controlled, backend wallets under the shared custody of your app and Shinami. Both parties must cooperate in order to obtain a valid signature. Uses your app's existing authentication.
    • zkLogin Wallet: user-controlled wallets tied to a user's OpenID authentication. zkLogin is a Sui primitive that provides the ability to send transactions from a Sui address using an OpenID credential, without publicly linking the two.

Example flow: check and then update a player's NFT

Diagram

Summary of steps

  1. When a player logs in, you lookup the objects that player owns and present those options to the player (you can also store a copy of these in your database). At this point in our example, your player has a character with no weapon.
  2. Once the user defeats a boss in the game, they earn a sword to enhance their character's attack power. Your backend makes a request to mint a sword NFT and assign it to the player's character. Now, the player owns a character who owns a sword. All the better to keep playing and take on the next boss!