Today we will be using our newest Web3 game demo as a showcase of our Smart Platform features covers the whole process of building a dApp.
We will explain how we brought our newest game on chain and fully operational within a day using our SDK, and how you can utilize the same tool to maximize productivity in your own dApps that are not confined to gaming alone.
We will have the link to APIs of a specific function ready next to every function we mention so that you are able to have hands-on experience developing a dApp using Mirror World Smart Platform with minimal friction.
About Mirrors Jump
Mirrors Jump is a mobile platform-jumping game demo we made to bring developers a closer view of what our Smart Platform can do.
We strongly advise developers to download and install our gaming demo here and check out our features while enjoying the game.
The overall principle of bringing a game on-chain with our Smart Platform is simple. You build a game, you plug in the solution you need, and all the functions will be there for you to use.
Step 1: Build a Game First
The first step in bringing a mobile game on chain is to develop a traditional game with several outlets prepared to later connect to the SDK. The outlet part varies depending on where you want the Web3 features to take place.
Take Mirrors Jump for example. We want our character, the Mirror NFT who is jumping in the game to be the interoperable asset, even independent from the game per se. That is where we leave the outlet for future connections.
Step 2: Start Auth Integration
The on-chain integration of our game starts with Auth. Being a Web3 mobile game, we want our game to have a broader range of customers.
Logging in with a method people are familiar with could bring much more potential customers to your game or dApp. So we integrated both Web2 login methods such as Discord, Facebook, Twitter, Google, and Web3 method, crypto wallet into Mirrors Jump.
We completed this whole process solely using our Smart SDK, calling the APIs below.
You can find a more detailed version in our HTTP API.
Since Mirror World Smart Platform is now open to developers for free. For different login APIs, you could just login into our creator dashboard, click the embedded link below and try them out right now.
It is super simple to use and it shouldn't take more than a couple minutes to deploy.
Step 3: Start In-App-Wallet Integration
The second part of the integration is to bring Web3 wallet into full operation in our mobile game.
This part is partially done together with the login integration, but we still need to bring in the transaction, token as well as the on-ramp component of the wallet.
Once all that is integrated, your customers will be able to perform all kinds of transaction-related actions without having to leave the dApp at all, which really drastically improves the purchasing experience.
Regarding security considerations, we are still in the process of developing a kind of safe wallet called an MPC wallet (multi-party computational wallet), which will be ready in the test environment next week.
This part intends to dive deeper into our wallet's safety configuration. For more information about SDK integration, you could scroll down to the next part.
In this MPC wallet, the private key is not actually stored in any form, because it doesn't exist. Whenever a new wallet is created, the public key is computed (in one direction) by a set of other trusted parties.
In our case, we have multiple partners running nodes that participate in the process. We followed the EdDSA algorithm in our implementation of this TSS variant. This type of wallet is called a multi-party computational wallet.
So the customer's private key is not actually stored in a database because there is actually no private key to store.
However, we can prove that the customer's public key has performed an action when multiple parties have signed a given transaction. The final signature generated by the transaction is an ed25519-compliant signature produced by computing the resultant signatures from all parties. So no one entity can perform an action alone on behalf of the customer.
Step 4: NFT Collection Creation
After the login and the transactions, we are now getting at the asset we are actually purchasing here in the dApp. In our case, it is the little jumper character---- the Mirror NFT.
The problem here is how to create an NFT collection, and mint it so that it could exist as a digital asset independent from the game. We used our SDK to enable our in-app minting as well as create your own NFT collection.
Below are some basic APIs we used for minting a new NFT collection and acquiring the NFT metadata.
Above are all the steps you need to take to better utilize our SDK. If you do have an existing game ready, it shouldn't take more than 30 minutes for you to complete the whole on-chain process, and this could take a couple of months for a small developer team to develop from the ground up.
If you have specific questions regarding the API plug-in and so on, you can always contact our professional tech team for help. For more information regarding Mirror World, please visit the link listed below.
Build your application with Mirror World Smart Platform