Inspiration

Fighting games have barely changed how you fight. Every character ships with a fixed move list, and after a few matches you are replaying the same memorised combos. We wanted a fighter where the only limit on your moves is your imagination.

We also wanted to bring a traditional art form to a new audience. Tholu Bommalata is the leather shadow-puppet theatre of Andhra Pradesh, India, in which translucent, coloured, jointed puppets bring gods and heroes to life behind a lamp-lit screen. Myths are full of impossible feats, so we staged a duel of legends from around the world as a Tholu Bommalata performance and let the players write the impossible moves themselves.

What it does

Mythic Strings is a real-time, two-player duel of legends staged as a shadow-puppet play. Play it live: https://dc4f89cb69bd1.cloudfront.net

  • Fight in real time. Move, jump, duck, and use each puppet's base and special attacks, which are tied to its weapon and cost stamina. A duel lasts two minutes; zero HP ends it early, and otherwise the fighter with more HP wins.
  • Type a mantra. Press Q and the arena slows to 12% speed for five real seconds. Type up to 80 characters, such as "summon a thousand monkey clones from my hair" or "dome of lightning around me", and AI turns your words into a real attack or defense. The shape of a defense matters: a wall blocks side attacks, a canopy blocks overhead attacks, and a dome blocks both. Both players can cast at the same time.
  • Pick any legend. Ten curated fighters, including Sun Wukong and Thor, have fixed ratings across strength, weapon skill, speed, endurance, divine power and wisdom. Type any other name and AI researches that figure, with cited sources, and builds a fair character sheet.
  • Forge your own puppet. Choose body, clothing, colours, ornaments and one of ten weapons. Describe a garment or upload a sketch, and AI cuts it as SVG leather art. Custom characters start at 60 HP and rank up every three wins, up to rank 10 and 100 HP.
  • Play anywhere. Practise against a CPU, play two players on one keyboard, or share an invite code to duel online.

How we built it

  • One engine, used in two places. The whole game is written in TypeScript. A deterministic 60 Hz combat simulation lives in shared code: it runs in the browser for local play and on the server for online play. Online clients send only their inputs and mantra text, while the server owns HP and damage and streams snapshots at 30 Hz over WebSockets.
  • Puppets drawn in code. PixiJS 8 renders jointed, translucent leather puppets with outlines, punched details, rods, rivets and spring-driven limbs, plus projectiles, beams, shields, particles and damage numbers.
  • AI as an interpreter, not a referee. A server-side orchestrator turns each mantra into a structured move. It tries an exact-match cache, then Gemini 3.5 Flash-Lite, then Amazon Bedrock (Claude Haiku 5.5), and finally a built-in local interpreter, all within a 2.6-second budget. Gemini 3.8 Flash, grounded with Google Search, researches new legends and designs SVG art. Damage, duration and cost always come from our rules engine, never from the model.
  • Safety and fairness. Generated SVG is rebuilt through a strict allow-list of elements and attributes before it is drawn. Stats and progression are computed on the server, and guest ownership uses signed tokens.
  • Deployed on AWS with one command. CloudFormation creates a Graviton (ARM) EC2 instance running Node 22 under systemd, a DynamoDB table, a private encrypted S3 bucket for releases, and a CloudFront distribution for HTTPS and secure WebSockets. Releases are installed through AWS Systems Manager with no SSH port, and the server only accepts traffic that comes through CloudFront.
  • Tested. 43 Vitest unit tests cover the rules, AI providers, storage and online rooms. Playwright browser tests play a real knockout, run a two-browser online match, and check the mobile layout.
  • Tools. We planned with a Kiro spec and used Claude Code as our coding assistant. The soundtrack, Under the Banyan Crown, is AI-generated.

Challenges we ran into

  • AI inside a five-second window. A mantra has to be understood while the fight is still slowed down. We used the fastest model, hard deadlines, caching, and a fallback chain that ends in a local interpreter, so a slow or failed API call never stalls a duel.
  • Keeping it fair when anything can be typed. "Instantly win" is a valid sentence. The AI decides what kind of move a mantra is and what shape it takes, while fixed rules control damage budgets, effect durations (at most two arena seconds), lingering damage (split 50% / 25% / 25%) and mantra costs.
  • Real time vs. slow motion. At first, slow motion stretched the two-minute match. We separated arena time from the real match clock.
  • Trusting AI output. Model-generated SVG could carry scripts or broken markup, so every piece is rebuilt from an allow-list before rendering.
  • Cheating online. A client could lie about HP, so we made the server the single source of truth.
  • Two players, one keyboard. Browsers can't tell two physical keyboards apart, so each player gets their own mantra box, and both can be open at once.
  • Secure WebSockets in production. Routing HTTPS and secure WebSocket traffic through CloudFront to EC2, while blocking direct access to the server, took careful configuration.
  • Staying on budget. Google Cloud's free-trial credits don't cover the Gemini Developer API, so we added per-player rate limits, daily caps and caching to control spend.
  • A full rebuild. Our first proof of concept was turn-based. Turning it into a real-time fighter meant redesigning combat, rendering and networking around a live simulation.

Accomplishments that we're proud of

  • Typed words become real moves in the middle of a live fight, and both players can cast at the same time.
  • The full game works with no AI keys at all, thanks to the local interpreter, so the demo never breaks.
  • A single deterministic engine powers practice, local and online play.
  • The puppets honour Tholu Bommalata instead of using generic sprites.
  • One command creates a public HTTPS deployment with online multiplayer.
  • Real-browser tests play a full knockout and a two-browser online duel.

What we learned

  • To keep an open-ended game fair, treat AI as a creative interpreter inside firm rules, not as the referee.
  • Latency budgets shape game design: the slow-motion window exists because a model needs time to think.
  • Anything a model produces, including art, has to be treated as untrusted input.
  • A deterministic shared simulation keeps local and online play consistent.
  • Check which services your cloud credits actually cover before you build.
  • How to run WebSockets through CloudFront and lock down the server behind it.

What's next for MythicStrings

  • Reconnecting to an online duel after a dropped connection (today, a dropped connection forfeits the match).
  • Accounts and ranked matchmaking beyond guest profiles.
  • Spectator mode and tournaments.
  • More legends, stages and weapons from more of the world's mythologies.
  • A per-player duel chronicle and semantic mantra memory. The code for this exists but is switched off for now.
  • Speaking mantras aloud instead of typing them.
  • Scaling online rooms beyond a single server.

Built With

Share this project:

Updates

Submission history