Gaming + Aptos: why and how?
Increase engagement, retention, and revenue
Overview
This guide covers the benefits of adding Web3 elements to your game, along with some discussion on how much to add and where (spoiler alert: you don't need that much to make a big difference). It discusses the benefits of using the Aptos 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 Web3 elements to your game?
Player ownership = engagement, retention
Infusing your game with assets users can own, upgrade, lend, and trade is a powerful way to increase engagement. Examples include a NFT that represents their in-game playable character or your game's engagement tokens. Below, we discuss some of the benefits of these.
In-game items
Gamers have always been used to acquiring items and upgrades for their efforts. Now, you can give players verifiable ownership on a blockchain of some of these items. Why is this good for you or the player?
Players feel more invested in your game, because this unlocks the opportunity to buy, sell, lend, or trade these verifiably scarce items in a transparent way where they won't be scammed. No more transferring money to a PayPal account and hoping that the person on the other end actually gives you their World of Warcraft password. 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.
Your game gets access to a global market where you can get a cut of these sales. For an example of how player ownership of in-game items can drive engagement and retention, see our case studies.
Tokens
Tokens can be used to give players a stake in the success of the game's community. They can be given for playing the game, but also for taking other actions that drive interest in the game like posting on social media. These tokens can be exchanged for all sorts of rewards like unlocking new maps, game merchandise, etc. Players can also have the option to sell some of their tokens to others, earning money for their time and effort building your ecosystem.
The benefits for you include driving player engagement and community growth, rewarding players fairly, and easily tying rewards to key actions you want to promote. For an example of how a token can be used to drive engagement and retention, see our case studies.
How to add Web3 elements to your Web2 game?
Start small.
Let's not forget about what players care most about: a great UX and a game that's fun to play.
You don't need to write every change in player or game state to the chain. A good place to start is with one key item like an in-game object represented as on-chain NFT. This could be a character, or a key item that character uses. Just owning one important thing can make a big difference in how connected a user feels to a game.
As a result, you don't have to read from the blockchain or write to it constantly. You can cache some chain-based game state and will almost certainly store some in your internal, private databases. You only need to write major changes, like when a user acquires that key item for the first time or when they upgrade it.
Introduce them slowly.
Player ownership is something you can slowly layer in as players spend more time with your game - after all, these things are a reward for spending time in your game. When players launch your game, the reason they come back the next day is because of great gameplay and/or community. No NFT can make up for a boring game.
Instead, think about ownership as one of multiple reasons why a player sticks around for week two, or month two. Maybe they don't earn ownership of a game object, or game tokens, until level 20. Or, after 10 hours of gameplay. From there, maybe they don't earn an upgrade or more tokens until level 30, or another 5 hours. And, maybe that second point is where you introduce to them that they have a wallet behind the scenes. You can then give players the option to learn more or take direct control of their wallet, but don't force it. Later, you can introduce actions they can take with their wallet, like selling their object to another player or trading some of their tokens for a reward.
The point is to not make Web3 knowledge a requirement of playing your game. Instead it's a optional and exciting side quest that players unlock after mastering the basics.
Why use Aptos + Shinami?
The Aptos blockchain was designed from the ground up to support the needs of large scale, highly-performant games. And with Aptos Gamestack, an all-in-one platform for Web3 game development - with payment support, SDKs, and more - you know Aptos is a blockchain that's serious about gaming.
Shinami is the Aptos 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". Aptos was built to guard against this. The code that runs on the Aptos blockchain is built using Aptos Move, a programming language designed for writing safe code that's easy to verify the correctness of.
Dynamic and composable on-chain assets
NFTs on Aptos can be dynamic, meaning you can upgrade them for a player as they spend more time in your game or meet achievements. 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.
Aptos is highly scalable and allows for parallel execution of transactions, as compared to the one-at-a-time processing of older blockchains like Ethereum. This allows for transactions to have the sub-second speeds needed to give your players the smooth, uninterrupted experience they demand.
The Aptos architecture also allows 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 Aptos. 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 APT 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 an Aptos Keyless wallet. This is a frontend (including mobile app) wallet that works specifically with social sign in with Google, Apple, etc (full list of options is what's show as supported on Mainnet here . Each time the user logs in, you'll ask a pepper service for a pepper (like a special password the wallet needs to work), and a prover service for a zkProof (a fancy mathematical proof that you use to write to the blockchain with the wallet). These services are currently run by Aptos Labs and easily execute behind the scenes if you use their SDK.
For a more complete discussion of Shinami's wallet services, see our high-level guide. For more on Aptos Keyless, see here.
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
Aptos Move game and transaction code
Prior to integrating with Shinami, you should create and deploy Aptos Move smart contracts to manage your on-chain assets (characters, items, etc.) and game logic. In addition to performing reads, you'll write transactions that interact with your on-chain assets and smart contracts (using the Aptos Labs Aptos 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 Aptos 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.
Other key services you might use
- Aptos Keyless: an OpenID-based login flow where the end user just signs into, for example, their Google account. Endpoints for the related zkProofs and peppers are managed by Aptos labs, but all of our services are fully compatible with these wallets. We have a guide to show you how to integrate Keyless wallets with our services.
Updated about 2 months ago