PaintWars

PaintWars is a collaborative and competitive canvas for anyone to draw and fight together onchain.

PaintWars

Created At

ETHGlobal Cannes

Project Description

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!

How it's Made

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.

background image mobile

Join the mailing list

Get the latest news and updates