Inspiration

DurHack's theme was Composition, so we took it literally: a portal hangs between two worlds, and you duel the player on the other side. It began as a wizard tower against Ancient Egypt and grew into six original worlds. We wanted spellcasting to feel physical: you swing a real wand, not a mouse.

What it does

Wand Wars is a real-time 1v1 wand duel between two laptops.

  • First person through a portal: you stand in your own world in a 3D arena and look through a portal at your rival's live webcam, framed in their world. Your spells fly into it; theirs fly out at you.
  • Cast with a wand: our ESP32 wand (accelerometer + gyro, over Wi-Fi or Bluetooth), a phone acting as a wand, or just your fingertip in front of the webcam. Three swipes: Flick (fast), Slash (heavy), Sweep (shield), in a counter triangle: shields block fast spells and reflect them if raised late, fast spells shoot down heavies, and heavies smash shields.
  • 6 worlds, 12 champions: each with its own stats, special move and element. Elements form a cycle (Sun → Shadow → Starlight → Storm → Flow → Jade → Sun) worth +25%. Mana, combos, ultimates, and leaning to dodge with head tracking.
  • AI commentator: Gemini writes a football-style lineup intro for both champions, including the element matchup, and a recap after the match. ElevenLabs voices them live. Pick your commentator in the lobby.
  • Practice mode: five bot difficulty levels, from a training dummy to an archmage.

How we built it

  • Server: Node + Socket.IO with a pure, server-authoritative fight engine (time injected, fully unit-tested), plus bot-vs-bot balance simulations to keep every champion between 45% and 55% win rate.
  • Client: TypeScript + Vite + three.js for the arena, portal, spells and champions; WebRTC for the webcam link; MediaPipe hand and face tracking for fingertip casting and head-tracked parallax and dodging.
  • Hardware: Arduino nano ESP32, Triple axis accelerometer, a bush button and a servo motor, the data is then sent over Bluetooth to the laptop/computer. We designed and printed a wand like 3D print, that encloses all the hardware components.
  • Phone wand: Android app and browser wand page using the same message format as the ESP32.
  • AI: Gemini for the commentary text, ElevenLabs for voices and all 47 sound effects.
  • We split into four parallel tracks (hardware, mobile, gameplay, UI) around one shared contract in shared/config.ts and shared/types.ts, so nobody edited the same lines.

Challenges we ran into

  • Latency: hand-drawn shapes were too slow and error-prone with a wireless wand, so we redesigned casting around three simple swipes read at the peak of the motion.
  • Two witnesses: fusing what the camera sees with what the wand's sensors feel, without rejecting real spells.
  • Fairness: with 12 champions and an element cycle, we simulated thousands of bot matches to balance stats.
  • Venue networking: webcams over hackathon Wi-Fi needed a TURN server; the wand needed a hotspot fallback.

Accomplishments that we're proud of

A full game loop, from lobby to champion select, VS screen, training, best-of-three rounds, a finishing move and podium, running between two laptops with real hardware, live webcams and a voiced AI commentator, built in one weekend by four people.

What we learned

Server-authoritative design with a pure engine made the game testable and fair. Agreeing a shared contract early let four people build in parallel. And simple, physical inputs beat clever but fragile gesture recognition.

What's next for Wand Wars

Original 3D arenas for every world, more champions, live in-match commentary, and tournaments with spectators.

Share this project:

Updates

Submission history