Inspiration

In traditional games, games are played for pure pleasure with no real-world reward structure for the end users playing the games. We saw players passionate for the new Play-2-Earn blockchain games and the financial incentives. While most blockchain games focus on Play-2-Earn, we want to focus on the fun of playing and offer real-world rewards as part of in-game achievements. This creates more stable in&out-game economic systems and thus a more sustainable game.

With this background, we started MetaCraft to create a truly decentralized, multi-chain, community-driven virtual space where players can play, build, own, trade, and profit through skilled gameplay and contribution to the ecosystem. MetaCraft is built on the backbone of the all-time most popular game Minecraft. Utilizing its proven success, strong community and open source ecosystems, we can expand quickly and to the decentralized gaming metaverse of MetaCraft.

This project is inspired by Minecraft and on-chain GameFi projects such as NFT worlds, Genesis critterz, sandbox, and many others. Our team has significant experience working in different tech companies based in the Bay Area and New York. We have also collectively spent over 10,000 hours in Minecraft since its launch in 2009.

What it does

We have the following sections:

  1. Project Introduction
  2. NFT
  3. Staking
  4. $BUILD Tokens
  5. How to play in Metacraft

1. Project Introduction

Fully on-chain NFTs enabling P&E on Minecraft The MetaCraft NFT Project is a multi-chain game on the Near/ Aurora/ Ethereum blockchain to enable Play-and-Earn on Minecraft. You can stake your Blockhead to generate in-game currency $BUILD and use $BUILDs to purchase Blockhead NFTs / Plots / various in-game props to enhance the playing experience. Features of ownership include:

2. NFT

2.1 Blockhead NFT

BlockHead NFTs are generated on-chain, which each one uniquely randomized created when the NFT is minted. This means that instead of relying on third-party servers like IPFS, users’ NFTs are stored directly on the Near blockchain. This guarantees that users’ Blockhead will never disappear as long as the Near network is up.

Each BlockHead NFT is a 64 x 64 pixel art, which also works as a Minecraft skin.

2.2 plot map

The Minecraft server world consists of 12 x 18 plots, where each plot is 512 x 512 blocks. The map includes various biomes.

3. Staking

3.1 Mechanics to unlock

Blockhead NFTs provide various utilities and mechanics through staking. Users can access Blockhead after connecting his/her wallet to interact with these mechanics. The main mechanisms that staking unlocks are:

These mechanisms are only accessible when Blockheads are staked. Users will lose access to them if they unstake their Blockhead.

4. $BUILD Tokens

4.1 $BUILD token generation

$BUILD tokens that are generated with in-game activity in Minecraft and staked Blockhead. To achieve this, we had to build a custom oracle to compute $BUILDs generated based on playtime and bridge onto the Near blockchain without incurring high gas fees for the player. $BUILDs generation is influenced by two factors: play time and build factor.

4.2 $BUILD claiming

$BUILD tokens are claimed on our $BUILD claiming dashboard. Under the hood, a query is sent to the oracle to get the amount of $BUILDs claimable along with a signature. This information is then used to claim $BUILDs from the contract.

5 How to play in Metacraft

5.1 Joining the world

Instructions for joining the MetaCraft Minecraft Server are in the https://metacraft.netlify.app/. Upon joining the server, players are asked to type /verify in the chat and open the in-game link. The link will ask the player to connect to Near wallet/ Metamask, after which their account will be connected.

onboarding flowchart

Anyone can access the server, but only players with at least one staked (and verified) Blockhead can access the main world to start generating $BUILD with in-game time. All players are required to have a legitimate version of Minecraft 1.18 Java Edition to play.

5.2 Minecraft Server Gameplay

The Minecraft server is a survival mode server on Java Edition 1.18.

Upon joining, players are placed in a cool glass lobby before they verify their wallets and staked Blockhead with the /verify command. When players are verified, they are instantly teleported to the main survival world.

How we built it

Frontend:

Smart contract:

We deployed 2 near rust smart contracts.

Database:

We built Back4app relational databases to store user verification status and accumulated playtime.

Minecraft mod:

We built a Minecraft server mod using Forge to support the login lobby, communication with the database, and user verification logic. The login lobby is a custom Minecraft structure made of custom indestructible glass blocks, to enforce that the user must connect to a NEAR account in order to play. The mod sends HTTP requests to the database to query the user’s verification/stake status. If the user is verified, the mod teleports the user out of the lobby so that they can start playing. The Minecraft server is hosted on a AWS EC2 machine.

Challenges we ran into

Frontend:

The challenges with frontend was using Near-api to integrate with blockchain. We spent a lot of time figuring out what api methods we should use to retrieve data from the blockchain.

Smart contract:

Minecraft mod:

The most challenging part of our mod was ensuring the custom login lobby structure is generated during world generation and making its location known to the login logic. Custom structure is one of the hardest topics in Minecraft modding, requiring advanced APIs like ChunkGenerator (for associating the structure configuration with world generation) and techniques like Access Transformers (for changing Minecraft’s private methods at the bytecode level). The custom indestructible glass blocks also posed issues on lighting, since we want sunlight to pass nicely through the lobby walls.

On top of that, Minecraft modding changes significantly for each new Minecraft version, and there aren’t many great tutorials for the latest version. The Forge modding API has very little documentation. Often, the functionality of an API can only be inferred from its name.

Database:

Hiding the master key in the gaming server would be the challenging part since we don’t want to expose our secret keys in the code.

Accomplishments that we're proud of

We accomplished a complicated system integrating frontend, Minecraft server mod, database, and near contract end to end. This gives players a smooth onboarding experience and enables players to play&earn in Minecraft!.

What we learned

What's next for MetaCraft

Knowing the importance of a stable economic system for the game, we have spent a great amount of time on designing the in&out game economy and project roadmap.

roadmap

Key milestones include:

Follow us on Twitter: https://twitter.com/MetacraftDAO
Follow us on Youtube: https://youtu.be/-yTRfY-PJBU
Follow us on Telegram: https://t.me/MetacraftDAO
Check our Website: https://metacraft.netlify.app/