Battleship is a fun and addictive game completely built upon the Blockchain (Matic) that offers promises of building games like that over blockchain as these games are particularly challenging to because the require various aspects of Secrecy, Privacy and Scalability.
The game starts with two people secretly arranging the board with thier boats. After both the players complete that we generate a proof that has to be submitted on the contract.
After this the staking happens and the user stakes their Ether or NFT in the contract.
The game is played turn by turn with a Commit and Reveal Scheme and simultanesouly governance is maintained.
The first one to destroy the enemy ships wins the game and the stake kept on the contract.
The game is completely built upon the Blockchain and is completely decentralized which makes it a good product for Layer 2 scalling solutions.
There were lot of challenges as this product can have various of attack vector, so identifying all those vectors and making appropriate check for them. We had delt problems with Ethereum Tx library. One of the problem that made me learn much was while developing the System Architecture that had many complications to tackle.
Technologies used
Discussion