(MLH) SpaceXSI: used cursor to program.
Inspiration
We wanted a sword game where you actually swing a sword. Motion controllers cost money and live in a drawer, but nearly everyone already wears a smartwatch and carries a phone. So we taped a Galaxy Watch to a toy sword, strapped a phone to our chest, and asked: can these be a full-body controller for a gladiator game that runs in a browser?
What it does
Maximus Trackimus Meridius is a first-person gladiator game played with a real sword.
The sword: the watch’s motion sensors track the blade’s angle. Your body: the phone on your chest reads your lean, so you dodge by really leaning. Gladiator mode: a 1v1 duel against Varro. Read his attack, hold the matching block, parry at the last moment to stun him, then counter in the direction shown. Story mode: It starts with the duel, which a storm cuts short. The game shouts “RAISE YOUR SWORD!”, you lift your real sword, and lightning turns it into a glowing magic blade. Then come swarms of flying bugs, two monsters (one bursts out of the ground, one leaps in) and a final boss with combos, a ground slam and stone armor that only a lightning blast can break. Charge blast: hold the sword up to charge, point it at a monster, and lightning shoots from the blade. The war duck: your sidekick armored duck fights at your side, quacks when you parry, and dashes in when you blast. Gemini: a gladiator coach watches your fight data and speaks a tip after you take hits (“your left is open, tilt the tip sooner”). After the fight it writes a battle report and gives you a Roman title. (Tiger Data) Hall of Champions: every swing, block and parry streams into a time-series database. Fights go on a live leaderboard with an arena-activity chart. Kill cam: the final blow replays in slow motion, in third person.
How we built it
Game: a web app built with React, TypeScript and three.js, hosted on Vercel at areyounotentertained.fit Sensors: A Wear OS app streams the watch’s orientation, gyro and accelerometer about 100 times a second through a Cloudflare Durable Objects relay over WebSockets. The phone joins by scanning a QR code and sends its tilt from the browser. Sword tracking: a two-pose calibration (sword straight up, then pointing at the screen) works out how the watch sits on the handle and which way is forward. Holding the sword up during play quietly re-calibrates it. Art and sound: Mixamo characters and animations merged in headless Blender, then compressed. The storm sky, rain, lightning and colosseum are generated in code. Real sound effects and music. Gemini 2.5 Flash runs in a Vercel serverless function and returns JSON for tips and reports. Players can also bring their own Gemini key. Tiger Data: a TimescaleDB hypertable for fight events, with compression and a continuous aggregate for the per-minute arena chart.
Challenges we ran into
A watch can’t tell where your hand is, only how it’s rotated. We rebuilt the game around angle, direction and timing instead of exact positions, and pinned the sword hand in place in first person. Third person didn’t work: guessing the arm’s position made the on-screen arm snap from side to side, so we switched fights to first person. Heading drift: without a compass, “forward” slowly drifts, so we added a quick recenter and the silent recalibration. Lag: parries depend on timing over hackathon Wi-Fi, so we added slow motion just before each blow to make the parry window fair. A hidden performance trap: adding a light at runtime made three.js recompile every material and froze the game, so every glow is now done inside the materials.
Accomplishments that we're proud of
A smartwatch and a phone together really work as a sword and a body. The “Raise your sword” moment, when lightning hits the blade in your hand. A full five-part story, three difficulty levels, a boss with real attack patterns, and a duck that quacks on your parries. An AI coach that gives advice from your real fight data, not generic tips.
What we learned
Design around what the sensors can measure, not around what you wish they could. Game feel (slow motion, screen shake, sound, a pause on every hit) matters as much as accuracy. Writing the rules as small tested functions let us change the design fast without breaking the fights.
What's next for Maximus Trackimus Meridius
Two-player duels, each player with their own watch. A shield on the other arm, using a second watch or phone. Replays of your real swing, recorded from the sensors. More arenas, enemies and weapons; leaderboard seasons. A spectator screen for events, so a crowd can watch live.