Gaming + Sui: why and how?
Increase engagement, retention, and revenue
Overview
This guide covers the benefits of using the Sui blockchain and using Shinami for your infrastructure needs. It then provides a high-level overview of the key integration flows. Finally, it summarizes the developer resources to help you get started building.
Why add how to add Web3 elements to your game?
For a rich discussion of this, along with guidance on creating a plan to do so, see our Adding Web3 elements to your game: why and how? guide.
Why use Sui + Shinami?
The Sui blockchain was designed from the ground up to support the needs of large scale, highly-performant games. And with the upcoming release of the SuiPlay0X1 handheld gaming device, you know Sui is a blockchain that's serious about gaming.
Shinami is the Sui ecosystem's leading developer platform, offering all that games need to deliver on the promise of Web3 gaming.
Safety first
When you think "blockchain," you might also think "security hacks that steal people's money". Sui was designed from the beginning to guard against this. The code that runs on the Sui blockchain is built using Sui Move, a programming language created for easily writing code with strong safely guarantees.
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 both more secure and more accessible by games and other apps. 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 stored 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 and 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 the smooth, uninterrupted experience they demand.
The architecture is horizontally scalable, allowing for predictable, very cheap transaction fees (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. Finally, games use Shinami's Gas Station to sponsor the gas fee for their users' transactions and offer a seamless, free-to-play experience. This means that when a player earns or updates 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.
High-level technical overview
How to create a Web3 wallet for a user
There are two main options here, both shown the in the image below:
- Use a Shinami Invisible Wallet. This is a backend wallet that your app manages in the following way: whenever a user creates an account in your game - using whatever account creation and login flow you already have or want to have - your app creates two additional pieces of data you store in your database for the user. These two things are a Shinami wallet id and a Shinami wallet secret. Then, you app will use the id and secret as a sort of username and password in its API requests to Shinami to create and perform operations with the user's wallet.
- Use a Sui zkLogin wallet. This is a frontend (including mobile app) wallet that works specifically with social sign in with Google, Apple, Twitch, Facebook, etc (full list of options is what's show as supported on Mainnet here). When the user first logs in and you create an account for them, you then ask Shinami to create the wallet, which means to create a salt (like a special password the wallet needs to work). Then, each time the user logs in you ask Shinami for the salt and to generate a zkLogin proof (a fancy mathematical proof that you use to write to the blockchain with the wallet).
For a more complete discussion of Shinami's wallet services, see our high-level guide.

How to read and update a player's NFT on chain
Diagram

Summary of steps
- When a player logs in, you lookup the objects that player owns and present them 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.
- 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!
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).
Shinami services to power your game
Shinami has all the services games need to deliver on the promise of Web3 gaming. We also have SDKs so you can get started quickly. Key services are:
- Node Service: enterprise-grade infrastructure to read from and write to the Sui blockchain. Use this to mint, read, and update NFTs, as well as deploy and update your game's smart contracts.
- 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.
Other technologies and tools you might use
- OpenDive Unity SDK and docs, and SuiKit Swift SDK
Updated 19 days ago