DEV Community

Cover image for Building a blockchain mobile game for conservation
Emma Salem
Emma Salem

Posted on

Building a blockchain mobile game for conservation

Building a mobile game isn’t exactly something new and groundbreaking. But how about building a mobile game that creates a real-world impact just by playing AND using blockchain technology to blend the real and virtual worlds?

Image description

We’re building Wildchain. In a nutshell, Wildchain is an animal collectible and simulation mobile game for conservation. Wildchain donates 100% of the game profits to wildlife conservation initiatives worldwide. In the game, players can digitally adopt endangered species and plant trees to cut their carbon footprint while supporting real-world conservation efforts - all within a mobile game… But how do we make this possible?

We’re building our game using blockchain technology. Why blockchain? We chose blockchain because, as an impact project and a non-profitable one, we believe that providing transparency to our users should be the priority, especially regarding where funds are going. Our team decided to move forward by leveraging the advantages Web3 can offer. Blockchain has recently been a controversial topic regarding being environmentally friendly because it consumes a lot of energy, which contradicts our project’s eco-friendly vision. However, with the advancement of Web3 technology, we discovered Celo from the Celo Foundation.

Image description

Wildchain operates on top of Celo, a carbon-negative, mobile-first blockchain that makes cryptocurrency accessible to anyone with a mobile phone. Celo is an energy-efficient Proof-of-Stake blockchain and can process 7 million transactions per ton of CO2 emitted. At the moment, Celo offsets 65.7 tons of CO2 by funding Community tree planting on Wren every month.

Because of this, Wildchain can release a large-scale game that focuses on impact, engagement, and utility, all with a positive environmental impact.

The game is backed with Celo, where every transaction inside the game will be stored on the chain. There are many advantages to storing all in-game transactions in the blockchain; players won’t be able to fake or bypass their avatar level to rank top in the game, and players will be able to own their in-game assets and much more.

Coming into the web3 side of the game, there are various tools and SDKs available which we have implemented. Since our game uses Unity, several SDKs will help you connect the Unity side with web3. Wildchain, the game, will also allow the user to choose whether they want to play it as a web2 game or web3 just by connecting their wallet. We used SDKs to make this possible from third-web, Celo-Unity SDKs, Revise, etc.

Currently, our Game consists of in-game assets that can be traded to make the game more interesting (trading of these assets can be done over the Wildchain marketplace). In-game assets are items you can also own outside the game. You can also refer to them as NFTs, which follow the ERC721 standards and are deployed over the Celo chain. We chose ERC721 to follow because we were strict about our users holding one and only NFT with a particular token ID. This might sound expensive from a gas fee usage, but Celo blockchain solves this problem because of its consensus and low energy consumption mechanism.

Since Wildchain heavily deals with users’ funds, we decided to make it 100% transparent so anyone can track where their funds are channeled. Users can easily go to the explorer and track all the transactions they have made under the umbrella of Wildchain. To track their funds, we will be making our smart contracts public along with the deployed address public. For example, a user wants to track details regarding our NFT collection. In this scenario, the user can easily visit the Celo explorer and search for the records by inputting the given address in the search bar - 0x5603b36a6D867A90532f5AD2699be516A57ae30b.

Image description

To address the speed of all the transactions and the user experience over Wildchain’s platform, we are proud to share that Celo provides us with the best speed that an impact project like ours can have. Celo helps us to process 200 transactions per second!

Wildchain also ensures that the animal you see inside the game evolves over time based on actions and real-world data. This is done by making in-game assets /NFTs Dynamic based on the age and the data related to the status from the IUCN red list. Using oracles, we are fetching data from an offline source to our on-chain smart contracts. We tested both Redstone and Chainlink as Oracle providers, and both worked decently with our game setup. We later proceeded to implement Chainlink. Implementing the dynamic NFT feature allows users to feel connected to their animal as they can watch it grow up and change in the game and on their NFT visual.

Image description

Another innovative feature of using blockchain technology for our conservation game is that it allows us to create digital twins in our game. What does that mean? Each animal in the game is a unique digital counterpart of an animal living in the wild. We blend the real and virtual worlds with blockchain-based tokens to create provably scarce digital assets. If there are 6,674 cheetahs existing in the wild, there will only be 6,674 cheetahs in our game!

Wildchain, the game, is coming soon! Stay tuned for more.

Visit our website and subscribe to our newsletter to stay updated.

Top comments (0)