The metaverse is the biggest buzzword in gaming and entertainment right now, alongside Web3, DeFi, GameFi, dApps, NFTs, and Play-to-Earn (P2E). What’s more, the medieval theme is among the most dominant genres in metaverse gaming today, with gamers seeing it as a form of escapist fantasy in modern times. Hence, a medieval metaverse game presents infinite creative opportunities and role-play exploration, which both creators and players love.
So, what is the metaverse? The metaverse concept ushers in a new era of gameplay. Players enter new worlds and gaming experiences. They also participate in new types of economies. As such, these new economies are governed and incentivized by token economics set by the game creators. Moreover, incentives in metaverse and NFT games can become more decentralized by allowing in-game governance tokens. In addition, a DAO smart contract or a set of contracts can be used to run predefined rules and facilitate decision-making.
Here, we show you how you can build a medieval metaverse game and ship it quickly using tools such as Unity to create the foundations for NFT game development. Moreover, with Moralis as the ultimate Web3 development platform, you get a fast ticket to connect to the metaverse!
Building Metaverse Games
In the current gaming scene, metaverse games are a hot commodity. Gamers and developers from all over the world are curious about metaverse games. These games stand out not just for their entertainment value; but also for their economic potential. Hence, companies and individual creators are competing from both ends to build the next big thing in this emerging sector.
But first, one must know how to build a metaverse game. To learn how to build a metaverse game—specifically, a medieval metaverse game, as will be demonstrated in this case—you will need several tools, steps, and components to complete a fully connected 3D metaverse experience.
Furthermore, you can supercharge your medieval metaverse game using Moralis as the ultimate Web3 and metaverse development kit. Moralis does the backend and features integration heavy-lifting for you. After all, it’s been called the “Firebase for crypto” because it covers all your blockchain needs. As such, you can focus on building a great game design and user experience!
How to Build a Metaverse Game – Watch the Video
To go straight to the video tutorial and learn how to build a medieval metaverse game, you can visit the Moralis Youtube channel:
Tools to Build a Medieval Metaverse Game
In this tutorial, we are using both Unity and Moralis. Unity is the game development platform while Moralis is for blockchain integration.
With Moralis SDK, you can build anything on the metaverse and publish it on your favorite gaming platform, be it Xbox, Playstation, Nintendo, Windows, iOS, or Android. Furthermore, with built-in Unity support, the game engine enables plug-and-play integration among these platforms.
Medieval Metaverse Game Creation Steps
To build a medieval metaverse game, you must first create a 3D world. Furthermore, this needs to be aligned with your vision and storytelling as a game developer.
- Add a third-person character
The character or avatar allows you to move around in the game.
- Crypto wallet integration
Lastly, you should be able to log in using a crypto wallet. The Web3 wallet (for example, MetaMask) provides you with an ID that represents you in the blockchain. This way, this 3D local space can become part of the metaverse.
Medieval Metaverse Game User Authentication
This is to demonstrate the results of (3) in the gameplay experience. At the beginning of the game, you will be asked to scan a QR code with your crypto wallet. With this, you can retrieve the wallet address and move around in the 3D RPG-style room.
Medieval Metaverse Game Elements
Aside from the 3D design, character, and ability to log in with a Web3 wallet, you need the following to complete your game:
Depending on your game design, you will need certain assets to complete the game. Examples of such assets are weapons, upgrades, rewards, easter eggs, and so on.
The following is a view of the assets used in the game. As such, it lists the free 3D game assets available in the game. Moreover, these assets are from the Unity asset store. What’s more, they come highly recommended and will make your game design process easier. Using such free and pre-designed assets will save you a lot of time.
Furthermore, you have the convenient option of using royalty-free music in your game. Here’s an example of the kind of music you can use. In the tutorial, you will find that the game designer uses music from creator Alexander Nakarada. Moreover, the royalty-free Celtic, Viking, medieval, and fantasy music offered by this artist are the perfect background for your medieval game.
Of course, you may use other types of music from other creators. In addition, don’t forget to give credits for any intellectual property you use in the game.
For the test to complement the medieval theme, you need the appropriate fonts. Luckily, there are a lot of great game fonts, you can choose from in Google fonts. What’s more, they’re royalty-free. Moreover, the tutorial will show you some cool fonts that blend with the design aesthetic.
Building a Medieval Metaverse Game with Moralis
Moralis provides a wide range of features for developers, whether native to blockchain or not. What does this mean? Any game developer with little or basic blockchain training can use Moralis to plug in the blockchain aspects of the game.
Thus, Moralis transforms regular games into metaverse games with just a few lines of code!
How to Build a Metaverse Game, Simplified
Furthermore, Moralis eliminates the technically difficult and time-consuming aspects of setting up your backend. It also takes care of many of the tasks that previously required coding from scratch. Hence, you can integrate many features into your game without having to go through the conventional heavy-lifting associated with blockchain development.
Moralis handles the following for you:
- Setting up blockchain nodes via Moralis Speedy Nodes
- Eliminating RPC nodes (explore the limitations of RPC nodes on the Moralis blog)
- Blockchain indexing (read up on how to index the blockchain to understand how difficult this process can be without Moralis)
- Smart contract sync
- Web3 wallet authentication (authenticate with MetaMask or WalletConnect)
- APIs (Moralis NFT API, among others)
- And much more!
Medieval Metaverse Game Unity Support
Moreover, native blockchain developer or not, you can benefit from Moralis’ powerful SDK that provides you with Unity support. Unity devs will find it convenient to work with Moralis to transport their games into the metaverse.
Build More, Faster
As shown in the video tutorial above, Moralis helps you accomplish more blockchain integration in the same amount of time. Furthermore, it enriches your game features considerably, compared to when you have to do everything from scratch. The Moralis SDK gives you an incredible toolkit with many features to choose from, many of which are plug-and-play.
Start Building your Medieval Metaverse Game
Now that you have an overview of the steps and tools you need, it’s time to start building the medieval metaverse game.
Everything you need to build this game—all code and assets—is in the Moralis repo for the medieval metaverse game. Hence, be sure to refer to it from time to time as you go along with the tutorial.
Step 1 – World-building
Learn to create a new medieval metaverse game 3D world by following the video tutorial above, beginning at the 3:57 timestamp. Next, proceed to Unity and start with the basics. Create a new scene by going to the “Assets” folder, and clicking the “Scenes” folder. You will see that each folder in the demo has a purpose.
In the “ThirdParty” folder, you have all the free assets that were shown previously. Under “Room” you have all you need to build a medieval-themed room. With this, you can create a new room, select the assets you want to be included in that room, and create a prefab. In the demo, you’ll find the “CustomRoom” file with specific assets included, as shown here:
Step 2 – Add a Third-Person Character
After building the 3D world by using the assets in the Moralis repo and following the steps in the tutorial, proceed to add a new character.
To add a new avatar, simply use a free asset from Unity. Click the “ThirdParty” folder and proceed to “StarterAssets” to get the free asset. Follow the steps in the video tutorial, starting at 5:30.
You’ll be provided with a rudimentary avatar with a skeleton appearance. However, you can further customize your character by unpacking the prefab and making modifications. For instance, you can improve the player’s armature. In this case, the tutorial goes with the “Male C” option. What’s more, you can change the physical size of your character with a few clicks.
Ready with your 3D world and brand new character, you can now proceed to Step 3, where you’ll need Moralis to make the blockchain integration simple and fast.
Step 3 – Crypto Wallet Integration
Proceed to 8:25 of the video to jump to this section. To start building on Moralis, simply search for the Moralis Metaverse SDK or go straight to the Moralis SDK page. Scroll down to the “Build Your Game Today” section and click the “Start Now” button.
You’ll be directed to the Ethereum Unity boilerplate on GitHub. Download the latest release of the Moralis/Unity 3D Asset Package. You’ll find it on the right side of the page. Go back to Unity, and just drag and drop the Unity package file into your folders. However, note that the transfer may take a while. Once complete, you’ll find the “MoralisWeb3ApiSdk” folder displayed with all the SDK elements as seen below:
You’re only going to need two prefabs from this SDK to start configuring Moralis and WalletConnect. To do this, follow the instructions at 10:00 of the video.
Proceed to the “MoralisSetup” component at 10:17. To complete this step, you’ll need your Moralis server details. Hence, you need to set up an account on Moralis.
Create a Moralis Server
If you don’t have a Moralis account yet, simply register and create a new one for free. After setting up a new account, create a new Moralis server. Moreover, you can do it with just a few clicks.
Click the “+Create New Server” on your account. Choose the type of server you need for your specific purpose, whether “Testnet Server”, “Local Devchain” or “Mainnet Server”. The video tutorial goes straight to the mainnet server, which means the intent is to make the game live.
Proceed to naming your project, selecting the region, and your preferred chain. In this case, it’s “Eth (Mainnet)”. Click “Add Instance”, located at the bottom right of the pop-up.
In a few seconds to minutes, you’ll have a new server ready. Click “View Details” on the right side of your server bar to view the Server URL and Application ID. Afterward, copy the information and paste it into Unity.
Moralis Speedy Nodes
After populating Unity, you’ll need one more thing: the URL of your Moralis Speedy Node. Thus, to set up Moralis Speedy Nodes, go back to your admin page and click on “Speedy Nodes” on the lower part of your left-side menu.
You’ll find a list of nodes you can choose from. Select “ETH” and click “Endpoints”. From there, copy your Mainnet URL, which is at the top bar. Go to Unity, and paste it under “Web3 Rpc Node URL”.
Furthermore, you need to link your WalletConnect. Do this by dragging and dropping “WalletConnect” from the “Hierarchy” tab. Moreover, you’ll find the rest of the details of this setup at the video’s 11:50 timestamp.
Medieval Metaverse Game: Finishing Touches
Next, create the canvas panel and work on the game’s QR display, as shown at the beginning of this demo. Create the UI canvas, and under it create the panel inside. Within the panel, create an image. Make the appropriate adjustments to the image and add the component, which is the WalletConnect QR image.
If you want to review this entire step on video, start at 11:56. Furthermore, you will find the steps to create the 3D player address text (the player’s wallet address) anchored and aligned above your character starting at 13:47.
The explanation for the code script starts at 15:00, where the tutorial directs you to the Example folder for the boilerplate within the Moralis SDK folder.
How to Build a Medieval Metaverse Game – Summary
The metaverse is the most exciting concept in tech these days, and developers are trying to get in on the action. Moreover, with the Moralis Metaverse SDK, you can create metaverse games and build Ethereum dApps at lightning speed.
This tutorial on how to build a metaverse game shows how easy it is to integrate blockchain features into your game and bring it to the metaverse. Thus, this is the perfect time to brush up on your Unity game-building skills as demand for Web3 gamification is heating up.
Furthermore, the medieval theme of this game capitalizes on one of the biggest trends in fantasy and RPG right now. Moralis makes the medieval metaverse game genre much simpler by taking on your backend heavy-lifting for you. Moreover, Moralis’ support for multiple blockchains and natively cross-chain infrastructure makes it easy for you to build cross-chain dApps. Hence, you can build a dApp that works on multiple chains, as Moralis Speedy Nodes offers support for Ethereum nodes, BSC nodes, Polygon nodes, Arbitrum nodes, and Avalanche nodes. In addition, Moralis has released a Solana API to cater to popular demand.
What’s more, when you create a metaverse dApp with Unity, the finished product is instantly compatible with the world’s leading gaming platforms! There are so many reasons to get on the Moralis platform now and start building that new idea!