project screenshot 1
project screenshot 2
project screenshot 3

Web3Warfare

An IRL laser tag game with onchain components and fun. Place bounties on adverseries, mint powerup NFTs, and win the space race!

Web3Warfare

Created At

ETHGlobal San Francisco

Winner of

Sign Protocol - Best Technical Integration of Schema Hooks

Dynamic - Best Immersive Gaming Experience

Project Description

Web3Warfare is an immersive, real-life laser tag game that merges physical action with the innovative possibilities of blockchain technology. Players engage in thrilling laser tag battles, equipped with real-world hardware components like laser guns, sensors, and 3D-printed gear. These hardware elements track player performance, hits, and gameplay metrics in real time.

What sets Web3Warfare apart is its integration of on-chain components. The game leverages blockchain for player stats, rewards, and progression tracking. Each player's achievements, game results, and in-game assets are stored on-chain, creating a permanent and tamper-proof record of their performance. This also enables players to own unique in-game assets, such as special abilities or gear, represented as NFTs, which can be earned, traded, or sold.

The hardware ensures that every shot, hit, and movement in the physical world is accurately reflected in the game's digital ecosystem, combining the excitement of laser tag with the innovation of Web3 technology.

How it's Made

How It's Made: Web3Warfare

Web3Warfare is built with a blend of blockchain technologies, hardware, and software integration. Here's how it all comes together:

Smart Contract Architecture: The game uses a custom-built factory design pattern smart contract, managing duels and payout logic. This contract is deployed across multiple blockchain networks including SKALE, Flow, Zircuit, and Ethereum mainnet. The factory design pattern allows for scalable and efficient deployment of new duels, with automated logic governing payouts and challenge results. Each duel is governed by blockchain rules, ensuring transparency and immutability.

Frontend Development: The game's frontend is developed using React, hosted on Vercel for fast deployment and scalability. For user wallet onboarding, Dynamic is used, allowing seamless integration of blockchain wallets directly into the frontend experience. This ensures players can easily manage their on-chain interactions like asset ownership and game data.

Hardware Integration: The physical components of Web3Warfare are built around an ESP32 module acting as the brain of each laser blaster. The hardware setup includes a breadboard, infrared LED, and code developed in Arduino IDE to manage the interactions between the laser blasters and the game. Each ESP32 module contains an embedded wallet with the firmware, thanks to Dynamic, which enables direct blockchain interaction from the physical devices.

On-Chain Authentication: To guarantee the authenticity of in-game data being written to the blockchain, Web3Warfare uses Sign Protocol's schema hooks. A custom whitelist address contract is implemented, allowing only approved laser blasters to write data. Each laser blaster is whitelisted to ensure only genuine hardware can sign and submit events to the blockchain. Since the ESP32 module serves as a smart wallet, each device is the sole owner of its private key, preventing unauthorized devices from participating.

Embedded Wallets & Signing: The ESP32 modules act as both the game’s sensor and its on-chain identity, with embedded wallets stored within the firmware. This design allows each laser blaster to sign blockchain transactions directly, securing game events and ensuring the only valid signing devices are the blasters themselves. By flashing the wallets and private keys onto the hardware, the game eliminates the need for external signing mechanisms.

Notable Hacks: One particularly hacky aspect of this project is embedding private key functionality directly into the ESP32 modules, allowing each blaster to function as a fully operational smart wallet. This allows for direct interaction with the blockchain from the physical game world, creating a seamless bridge between the real-world gameplay and on-chain logic.

background image mobile

Join the mailing list

Get the latest news and updates