Our main passions are classic games (do you also like game cabinets like us?! :P) and modern technologies (Self-Sovereign Identities, blockchain, NFT, etc.). So in this project we tried to bind these two topics together, in order to obtain a sort of vintage NFT game cabinet working with NFTs dropped randomly to a set of users (identified by their addresses). In other words, instead of using coins, you can use NFTs to play with your own character ... if you are lucky enough to win one of them, of course! :D
What it does
The whole thing is composed of the following steps:
- the first one is the participation in the whitelist: if a user wants to try his/her luck, he/she can provide his/her account (his/her Ethereum/Polygon address), or the system administrator can select a set of users that could win the NFTs
- a Merkle tree of all the users and of all the NFTs to be dropped is computed and this information is provided to a Smart Contract, where the Chainlink VRF is used to randomly extract the winners and to associate them with their prize (or prizes)
- each user can submit a proof (if it is true, of course) that his/her address is eligible for receiving one or more NFT (in reality, any user can submit to the Smart Contract the information that another address is a winning one): this can be done simply scanning a QR-code and using the "Dropper" web application we have built
- thanks to the use of Wallet Connect, any user with a valid NFT in his/her wallet can use our game cabinet to play the Attack on Factory game with his/her character
- everybody is finally happy
How we built it
We developed the tool to create the Merkle tree, the Smart Contract to perform the random "extraction", the "Dropper" to allow the winners to receive their NFT, the game in which the NFT can be used (by means of Wallet Connect) and finally also the physical game cabinet to maximize the fun! XD
How to test it
In order to test it, you can try one of the following accounts (we are providing you with the private keys of the wallets, so that you can import and use them): some of them will be lucky and will receive an NFT to play our game, other will just have to "retry another time"! :P List of accounts (private keys):
Challenges we ran into
A lot. Every part of the project required a non-negligible effort both in the development and in the testing phases. Everything has been built with the idea of minimizing the effort for the user, so we focused on a simple and intuitive UX/UI, and we created a flow in which the users just have to perform very simple tasks to reach the final goal.
Accomplishments that we're proud of
It works. You can really play a cabinet game with your NFT. And this is the first time for us (and for all the guys that tried our projects in the few last days) that we do it. We are sorry you cannot use our physical game cabinet, but we invite you to come to us and try it, since the feelings you perceive doing it could be really amazing. You can really feel the connection between the old-style gaming mood and the most modern and advanced technologies, not only in that gaming field.
What we learned
Again, a lot. We had to use different programming languages, different testing frameworks, and different technologies (both software and hardware). Anyway, probably the most valuable lesson we have learned is that if you really want to achieve something, and if you have a good team, you can do that. And this is amazing for us!
What's next for Attack On Factory
We still have to finalize and improve some parts of the flow. The setup of the whitelist and of the Merkle tree could be automated a little bit more, and some information and parameters that are right now hardcoded could be made modifiable. More games (even multiplayer ones) could be developed to better exploit the technologies we have developed (NFT and physical game cabinet), and each one of them could reward the users with gift and prizes (we would say still in the form of NFTS!). We are strongly committed to improving our work and we believe we can reach our final goal, even if it will require a lot of effort and dedication.