S

Swift

Decentralized Play to Earn HTML game based on popular Memory card game

S

Swift

Decentralized Play to Earn HTML game based on popular Memory card game

The problem Swift solves

Swift is a decentralised memory card game with which you can earn by staking some amount initially. Faster you finish the game greater will be your returns. Exclusive NFT's will be minted to User upon completing different levels. This DApp is designed for people of all levels of expertise, ages and is a fun game to play.

Blockchain and Crypto newbies can easily use this DApp without much efforts. Main bottle neck problems for crypto and blockchain mass adoption are Gas fee, Transaction speed. Solutions to all these key issues are addressed in this DApp thus making it friendly for newbies and even experienced ones.

Smart Contract automatically disburses the stake after completion of game based on time taken. Users who finishes the game in less than 40 seconds gets twice their staked amount of MATIC whereas users who finish it between 40 to 80 tokens get 2.5 times their staked value. Users who play for than 80 seconds gets only half of their staked MATIC. According to a study over 80% of users cannot complete the memory card game within 80 seconds initially thus maintaining the equilibrium between Winners and Losers. Probability of finishing the game in a single go is 1 in 32,000 times which is very favorable for smart contract. Smart Contract hence has enough tokens to payout users based on their performance. As this is a game which requires quick response from blockchain network, Polygon stands out for Faster execution and lower gas fee.

Challenges I ran into

Main challenge for me was deeveloping the game as I am new to Game development. HTML game development has helped learn a lot in the process. Once the game is finished I struggled to integrate it with my Smart Contract. Upon some help from peers and mentors I have designed specific functions from game to connect with Smart Contract.

Later when I started using the IPFS for Image Uploads and all media content upload it was very easy but fetching them had been difficult. Upon looking at few docs and tutorials it was easyily solved. Smart Contract deployment on Polygon was smooth and successfull. Finally I have deployed entire DApp through Fleek platform making it hosted through IPFS.

Discussion