project screenshot 1
project screenshot 2
project screenshot 3

PixelFight

FHE game where you are fight against bot or another player. Enjoy FHE encryption of moves and true (in a future πŸ™‚) randomness.

PixelFight

Created At

ETHGlobal Brussels

Winner of

Blockscout - Best use of Blockscout Block Explorer

Prize Pool

Project Description

Two players are fighting each other in this game, initially having 5 health points. Every round each player selects one of 3 body parts to block and one of 3 body parts to attack. If attack passes block player's hp is decreased by 1.

The moves are FHE encrypted. In this project the only possibility for now is to play singleplayer versus bot that is making FHE random selection of moves.

How it's Made

I used FHE for this project in order for moves to be encrypted. The network is Inco. An FHE randomness is also used for bot to make moves.

Basically I wrote a contract in Inco Remix, verified it on Blockscout (https://explorer.testnet.inco.org/address/0xaaF72412fa6b7E8fff80EBd877497A477cED6e1d?tab=contract), took fhevmjs React template, added a simple frontend and deployed it on Vercel in one click.

Bonus: find an easter egg in background image 🀭

background image mobile

Join the mailing list

Get the latest news and updates