Inspiration

Every Harry Potter fan has done it — waved a stick at the TV, shouted "Expecto Patronum!" at the screen, and wished something would actually happen. We did too, and then we asked: what if it could?

Not with expensive VR headsets or motion controllers. Not with a mobile app download. Just a laptop, a webcam, and a browser. We wanted to bring the magic of wizard dueling to anyone with an internet connection — and prove that a single webcam is powerful enough to be a magic wand, a health monitor, and a game controller all at once.

What it does

I-Wizard is a real-time wizard dueling game that runs entirely in your browser. You physically cast spells using your hands and voice — no controllers needed.

Raise your right hand and draw a spell pattern in the air to attack — Stupefy, Expelliarmus, or Expecto Patronum Raise your left hand with an open palm to conjure a glowing shield that blocks incoming spells in real-time Shout spell names out loud for instant voice-activated casting Move with WASD to dodge and reposition in the 3D arena You duel against an AI opponent in a fully rendered 3D arena with spell projectiles, particle effects, shield impacts, and a camera that follows your every move.

But the magic doesn't stop when the duel ends. After every match, your performance data flows through a Databricks data pipeline where AI analyzes your play style, classifies your strategy, and summarizes your session. Presage reads your heart rate and stress levels directly from your webcam — no wearable needed — revealing how your body reacts under pressure. And a Featherless AI coach reviews your stats and gives you personalized tips to improve, powered by Qwen 2.5-7B.

Every duel makes you a better wizard.

How we built it

The Game — We used Three.js to build the 3D dueling arena, complete with animated characters, spell effects, and dynamic lighting. The frontend is pure browser tech — no app installs, no plugins.

Hand Tracking — MediaPipe tracks both hands through your webcam at 30+ frames per second. Your right hand draws attack gestures that are matched against spell patterns using a gesture recognizer. Your left hand triggers a real-time defense shield when you hold it open.

Health Monitoring (Presage) — The same webcam feed is analyzed by Presage to extract your heart rate, heart rate variability, and stress level using rPPG — a technique that reads blood flow from subtle skin color changes. No fitness band required.

Data Pipeline (Databricks) — Every session is ingested into a three-layer medallion pipeline: Bronze (raw data), Silver (cleaned and structured), Gold (AI-enriched). Databricks AI Functions automatically classify your play style, summarize your duel, analyze sentiment, and generate coaching tips — all within the pipeline.

AI Coaching (Featherless AI) — After each game, a coaching AI powered by Featherless (Qwen 2.5-7B) reads your full performance profile and returns personalized, actionable advice. It knows your win rate, your favorite spells, your stress patterns, and your weakest areas.

Character Voices (ElevenLabs) — Each opponent has a unique AI-generated voice through ElevenLabs, bringing personality to every taunt and reaction during the duel.

Analytics Dashboard — A visual dashboard renders 11 interactive charts covering combat stats, health biometrics, play style breakdowns, and AI coaching — all reading from the Databricks Gold layer.

Deployment - AWS

Challenges we ran into

The mirror problem — MediaPipe reports hand labels backwards in selfie mode. What it calls "Left" is actually your right hand. Our entire attack and defense system was silently swapped and we only discovered it after physically testing with one hand at a time. A small label, hours of debugging.

Shaky hands under pressure — When players get stressed during intense duels, their hand movements get jittery and gestures become harder to recognize. We had to add smoothing filters and tune our recognition thresholds to handle the chaos of real gameplay — and Presage data actually confirmed the correlation between stress spikes and gesture failures.

One webcam, three jobs — The same camera feed has to serve hand tracking, health monitoring, and the video preview simultaneously. Getting all three to play nicely without dropping frames took careful coordination.

Browser audio restrictions — Browsers block voice recognition and audio playback until the user interacts with the page. We built a graceful retry system so the game handles denied permissions without breaking.

What we learned

The browser is more powerful than people think. Real-time computer vision, 3D rendering, speech recognition, audio synthesis, and health monitoring — all running client-side in a single tab. No native app needed. AI enrichment transforms data from interesting to insightful. The jump from clean tables (Silver) to AI-classified, summarized, and coached data (Gold) made our analytics 10x more useful. Databricks AI Functions made this almost effortless. Stress affects gameplay more than skill does. This wasn't a hypothesis — it emerged directly from Presage health data. Players with identical skill levels performed drastically differently based on their stress state. Multi-modal beats single-modal. Giving players three ways to cast spells (gesture, voice, keyboard) didn't just add accessibility — it added strategy. The best players mix input methods to stay unpredictable.

What's next for I_Wizard

Multiplayer duels — Real-time PvP over WebRTC so two players can duel each other from different locations, each tracked by their own webcam. More spells and gesture patterns — Expanding the spell library with complex two-hand combo gestures and chained spell sequences. Adaptive AI difficulty — Using the Databricks play style classification to dynamically adjust the AI opponent's strategy based on how you play. Health-aware gameplay — Using Presage stress data in real-time to adjust game difficulty, offer breathing exercises between rounds, or warn players when they need a break. Mobile support — Bringing the full gesture and voice experience to phone cameras for truly portable wizard dueling. Tournament mode — Ranked competitive dueling with leaderboards, powered by the Databricks analytics pipeline.

Built With

Share this project:

Updates