PaintWars
PaintWars is a collaborative and competitive canvas for anyone to draw and fight together onchain.
Problem Statement
To take control of a pixel, a player need to commit to stake an amount of the game token. They can then set the background colour, and start expand around it but also need to maintain the highest stake on the pixel they control.We've introduced the concept of spells, actions that can impact the current stake on controlled pixel. There are currently 4 types of spells:freeze (double the stake)weaken (slash the stake by half)teleport (move one or more pixels)shuffle (randomize one or more pixel positions)Last but not least, using Layer0, players from any ecosystem can battle from their favorite chain, and promote it on the canvas!
Solution
The game, in particular the grid, relies heavily on PixiJS to render efficiently 10_000 squares that can be in interacted with. When modifying the stake on a pixel, a transaction is sent to smart-contract deployed on Arbitrum, Optimism and Flow testnet. The events on those contracts are indexed in PostGre so staking history and players stats can retrieved and computed easily.
Hackathon
ETHGlobal Cannes
2025
Contributors
- raouf2ouf
28 contributions
- kilian-Marechal
13 contributions
- mehdi-loup
7 contributions