Inspiration
I always want to build something creative and different. I had conceived this idea and found an opportunity to leverage chainlink.
What it does
This is a simple game of secret, that accepts arbitrary number of players. It models after a native hit and run daylight game in my a community where I grew up. People often hide their secrets but are always curious to know that of others.
Each player can play and bet against all other players to eat their blocks.
- Player commits a secret.
- Player sends along with a bet amount.
- When the battle round begins, its first come first served but winning does not depend on who comes first.
- Player can either win or lose.
- Losing depends on whether they wish to remain opt in the game or otherwise.
User can opt out only after the round has ended.
To make this game more effective, I will use chainlink to handle the upkeep so as to make call automation to avoid delay and keep the game running smoothly. For now, I only use chainlink largely for VRF data to generate secrets for players and will also be used for the trusted setups.
How we built it
Players need to generate a secret. Blockchain of now are not really safe for such since data are public. So I need a way to safely generate secret data. This is where chainlink comes it. Building games on blockchain needs where to survive in the face of increasing gas cost versus scalability. Polygon is cheap and therefore is best for my need. Firstly, I started gathering data and tools I needed. For the contract, I used Solidity with Hardhat tools.
- ChainIDE for deeper testing.
- React, Typescript, MaterialUI to build the frontend.
- Moralis for web3 connectivity.
The secret I generated from chainlink is also reinforced using a strategy called TrustedSetups. The game largely depends on random values hence. I use chainlink oracle to manage these parameters .
Challenges we ran into
I actually resume building this game in less than 24 to 36 hours. I haven't even sleep for hours. even though my head aches but I got so much joy I am able to finish up to some extent. Where to begin is a challenge. Again, my code wont just run fine since I was in a haste.
Accomplishments that we're proud of
Successful build makes a dev happier. I got this feelings right now. Although, there are a lot to do to make the application run smoothly, I hope to win in this hackathon to be able to fund and complete it.
What we learned
I leant a lot. Part of it is to never give up.
What's next for EatTheBlock
I want to build this game on live network and see people play it.
Built With
- javascript
- materialui
- moralis
- react
- solidity
- typescript
Log in or sign up for Devpost to join the conversation.