Tabletop games, such as chess, poker, Go (as in Alpha Go) and Monopoly, are some of the most widely-played games in the world. We are a team of enthusiasts of tabletop games, and we are in particular drawn to a special subset called "games with imperfect information", which are games where some aspects of play is hidden from opponents. Some good examples of this type are Bridge (Poker), Magic the Gathering, and Four-Country Warfare (or Kriegspiel, blind chess).
Blockchain is a distributed and transparent ledger. Without zero-knowledge proof, you cannot hide information from another party. For a long time, we thought it was impossible to host a game with imperfect information on a blockchain. Fortunately, we discovered this hackathon, learned about the Dark Forest game, and started to understand the true potential of blockchain games.
In this hackathon, we design and build a game with imperfect information, utilizing the zero-knowledge proof and Scrypt smart contracts on BSV blockchain.
What it does
We design an original game called ZkSnake, drawing inspirations from the classic Snake game. The rule of the game is such that, two players, each representing a snake, try to grow their respective sizes by moving around a square board. At the same time, each player plants down poisons at two secret locations on the board. If the opponent snake bites the poison, it is immediately killed.
How we built it
The frontend uses Vue.js.
Challenges we ran into
Connecting the vue frontend with the BSV testnet. We have some difficulty when we post tx to a testnet endpoint.
Accomplishments that we're proud of
Designing the game, making it appear on the screen, understanding the different moving parts of zkp smart contracts, as well as smart contracts on Bitcoin!
What we learned
Basic zkp concepts, Scrypt smart contracts
What's next for ZkSnake
Make it a real multiplayer game
Log in or sign up for Devpost to join the conversation.