Description

I wanted to build a tower defense game that was fully on chain, in a contract. There should be no way to cheat. So the game is set up to be two players PvP but uses a commit/reveal scheme to hide what each player is doing to prevent one side from waiting for the other to play their hand before deciding how to counter. The game is played in multiple rounds and scored by how many invaders in the convoy make it through. Players can update their strategy based on their opponent.

Convoy Block showcase

How it's made

This was a quick hackathon project due to the limited time and having to hack solo. The base of it is scaffold-eth, so the game logic is in a contract in Solidity and then there's a React App to give players control over the game, to set strategy, interact with the smart contract to save strategies and play them. The front end also renders the results of the strategy. This makes it a fast-paced strategy game that takes skill and depends on who your opponent is.