project screenshot 1
project screenshot 2
project screenshot 3
project screenshot 4
project screenshot 5
project screenshot 6

ETHQuest

NFT RPG adventure dungeon game built on Ethereum and Polygon & a Creator's Marketplace to mint Game & Map assets as NFTs and get rewarded by the community.

ETHQuest

Created At

HackFS 2022

Winner of

trophy

🥈 Covalent — Best Use

Project Description

ETHQuest is an RPG NFT dungeon game, built on Ethereum & Polygon built on Phaser Game Engine, and powered by ChainlinkVRF, NFT.Storage, IPFS & Filecoin, Covalent APIs.

The game's main aim is to level up by collecting as many loot boxes (chests), in ERC-20 $DGN tokens, as a reward, by killing all the demons and monsters guarding the chests.

The player has three lives. Every enemy has different hit points depending upon the type (ghost, Stone Yeti, Knight, Zombie, and many more). The player has to wield knives against the enemy and pass the levels as the story proceeds. Each level is based on different storylines.

Collecting every chest mint 4 $DGN Dungeon Tokens as a reward from the reward contract. There are also keys locked at different avenues inside the game, which the player needs to look out for in order to unlock the token gates. The player is also faced with killing the ultimate evil angel who possesses the final key to the ETHGlobal NFT. Upon collecting the NFT, the user is minted NFTs with Random attributes, powered by Chainlink VRFs that decide traits like Rarity, and Worth, depending on the level of the game. These are seen in the trophy cabinet.

Players can also track their rewards in-game in the analytics dashboard that is powered by Covalent APIs, that index blockchain data, using a unified API service for multiple chains. In our case, we have used the ERC-20 tracking API to track the address(from) and the address(to) to which the token gets minted in the game, along with the timestamps and the transaction hash.

The game has a free space for creators to innovate the game with NFT assets like game sprite sheets and game map designs, that would be reviewed by the community of players and rewarded in ETH tokens for their work. We use NFT.Storage service to store the NFT metadata like images, and descriptions of the NFT to the IPFS in a permanent and verifiable manner on the decentralized network. The hash obtained as { ipnft } in the json object, is fed as the image hash to the smart contract, thus facilitating data storage off-chain mapped to the smart contract.

Thus it is a fun project to play, own and earn in the gaming metaverse, where even the creators or makers of the game are rewarded and the game would pivot its development with the voice of the community supporting it.

How it's Made

  1. NFT Storage: Provides a good service with an unique API key to allow builders to pin data off-chain on the IPFS, backed by the immutability and security of the Filecoin network. They have plenty documentation and tutorials to help one get started.

  2. Covalent APIs provide multichain unified APIs to index data from across chains in your decentralized application. I am further planning to use the APIs to display important gaming events in the future, like when a player mints a genesis NFT from the collection, passes a level, and gets a proof of completion NFT, and even trading game collectibles on the marketplace. I feel it is a lot more intuitive than The Graph API, and pretty easy to use and experiment with their user interface. We used axios to query the timestamp, and addresses and the transaction hash for every reward generated in dungeon token.

  3. Polygon: The game is deployed to Polygon & Ethereum Rinkeby (soon to be deprecated) testnet, and we even use Covalent APIs to fetch data from Polygon.

  4. Chainlink VRFs are used to generate Random attributes on-chain using provably verified random numbers, to secure the reward NFTs

  5. The user interface is built with ReactJS and the game is built in Phaser game library. Smart contracts are written in Solidity, deployed and tested using Truffle framework. Web3 JS and ethers is used to make calls to the smart contracts and interact with the blockchain.

background image mobile

Join the mailing list

Get the latest news and updates