I was inspired by RPG games from the 90s and still enjoy playing them. The challenge lies in building sustainable game-economies for gaming on blockchain and finding the right fit of infrastructure for your gaming community, so that the hours spent playing games turn out to be rewarding and productive.
What it does
Vechain-Thor RPG Quest
An RPG dungeon game wherein the player has to encounter and fight monsters who are guarding chests, and gain loot from the chests in the form of ERC-20 equivalent VIP-180 $DGN (in-game) token (Dungeon Token), deployed on Vechain-Thor Testnet.
The player has to finally unlock the locked gates by seeking the keys to the token-gate who is locked inside a wall in the dungeon, and ultimately defeat the the ultimate evil angel who possesses the final key to the Vechain NFT (VIP-190) token. Once the user collect the Vechain NFT collectible, an NFT is minted to your NFT-Trophy Gallery(to be implemented).
The VeChainThor blockchain currently already has the VeChain Multi-Party Payment Protocol (MPP). Using MPP a user can interact with a smart contract, while the smart contract pays for the transaction fee using a delegator service uinquely developed on Vechain Thor, making use of the dApp for the end-user completely free.
- Token Address Dungeon Token $DGN:
0xEf31C7D024dee36E4757D26e0D073E1e2964EdD1View here: Vechain Explorer on Testnet
In game transactions along with contract Clauses for the trasnactions, can be viewed on the explorer
The clauses associated with this contract call can be viewed in the clauses here on https://explore-testnet.vechain.org/transactions/0x08d6e07a5edde04843a5dd3ab562d7b93e7225ddbac59b4bc80ff851bb7c381c#clauses
Collecting a chest earns you 4 $DGN tokens, with VTHO used for signing the transaction. The event triggers connection to the Sync2 Desktop wallet as shown below.
Then we open a transaction is signed and can be viewed in the activities. Note that the wallet is referring to the Token contract f(x) --> ending in
****EdD1, and incurrs a small transaction fee of 0.81VTHO.
Kill enemies with the dagger. Every enemy character has a different HP.
Analytics can be viewed in the sponsorship dashboard, where we can add signer and reciver accounts, contract ABIs and whitelist accounts to sign transactions and even delegate transaction for others on the network. You can upload your contract ABI to have it decoded and see more details:
Player has three lives, can view number of DGN coins collected, and also the number of Vechain NFTs collected.
Player has to break walls unlock the room, and set the mysterious wizard free and obtain a key to unlock the token-gates.
In the end, the player kills the evil angel, obtains the key to the 2nd token gate and receives the Vechain NFT that marks the level pass.
How we built it
Tools and Tech Stack
- The game is built on Phaser.
- The app is built in React
- Smart contracts are written in solidity since VeChain Thor is an EVM compatible blockchain network.
- We use HardHat Thor package developed by Vechain-Energy, to deploy our smart contracts to
https://testnet.veblocks.netusing a wallet whitelisted on Vechain Energy Sponsorships Dashboard at
- Other packages used include web3 providers connex, implemented using Connex JS and Thor RestFUL APIs, vechain ethers and many more, used to interact with the smart contract ABI while emitting in-game events. Vechain Thor Blockchain provides the perfect platform to build games due to its scalability and robust infrastructure, and moreover low gas fees which are paid using VTHO tokens.
- Sync2 Wallet to sign transactions on Vechain and return responses to the NodeJS dApp.
Challenges we ran into
- Connecting to Sync2 wallet on node using web3 providers connex API for the first time
- deploying contracts to thorchain using hardhat thor.
Accomplishments that we're proud of and what we learned
- Learning hardhat thor
- Learning Vechain infrastructure, obtaining funds from testnets
- setting up sponsorships and delegations by whitelisting contracts, addresses and ABI
- Interfacing with ABI using web providers connex
What's next for Vechain-Thor RPG Quest
- To have an in-game DEX, to allow users to swap other tokens on Vechain to DGN token, in order to buy various assets and collectibles in-game.
- In game marketplace to allow users to buy and sell NFT characters and game potions and equip the same in further levels.
- 1v1 gameplay between two warriors by staking tokens and fighting for the stake
- Ability to craft Rare NFTs and equip them, by on-chain XP (on-chain reputation), that is attained while playing the levels.
- Genesis NFT minting event through a mystery box sale, based on character rarity.
Log in or sign up for Devpost to join the conversation.