project screenshot 1
project screenshot 2
project screenshot 3

Snake3.0

A classic snake game with a ranking system and NFT implementation

Snake3.0

Created At

Road to Web3

Winner of

trophy

🏊 NFTPort Pool Prize

trophy

🏊 Polygon Pool Prize

Project Description

This snake game has a 24-hour round, in which players compete to be in the top 3 slots. When a player loses a game, they would have an option to submit their score to the smart contract. Once the score is submitted, their scores are arranged from highest to lowest.

After the 24-hour round ends, whoever is in the top-3, would be able to mint an NFT.

If a player is not in the top-3 at the end of a 24-hour round, they would not have permission to mint an NFT.

But they could try their luck the next round.

How it's Made

In this project, we used Moralis to sign in to the dapp, using metamask. To mint NFTs we used nftport. We also built our smart contract using solidity and deployed it on the Mumbai Testnet.

The front end was built on Next.js, and the game was written in vanilla JS. Implementing moralis in our code was extremely simple, and I think it will also simplify the user experience.

NFT port was also straightforward because we just needed an URL to mint an NFT through their API. Polygon made it easy to deploy and use their testnet to test out our smart contract.

We did have to learn Next.js, and until this project, we never used it in anything else. We also built our smart contract from scratch and integrated it with Next.js using Ethers.js. I was impressed with how we integrated a classic web2 and turned it into a web3 application

background image mobile

Join the mailing list

Get the latest news and updates