<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mei Yi Yang</title>
    <description>The latest articles on DEV Community by Mei Yi Yang (@mayozoz).</description>
    <link>https://dev.to/mayozoz</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4165073%2F0ece0483-f0c5-4af7-b04d-ef82c65d6be5.jpg</url>
      <title>DEV Community: Mei Yi Yang</title>
      <link>https://dev.to/mayozoz</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mayozoz"/>
    <language>en</language>
    <item>
      <title>DoodleFFA</title>
      <dc:creator>Mei Yi Yang</dc:creator>
      <pubDate>Tue, 06 Oct 2026 00:45:43 +0000</pubDate>
      <link>https://dev.to/mayozoz/doodleffa-4f1p</link>
      <guid>https://dev.to/mayozoz/doodleffa-4f1p</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/mlh-hackathon"&gt;MLH x DEV Writing Challenge&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Doodle FFA&lt;/strong&gt; is a same-room party battle royale for 2–12 players where &lt;strong&gt;you draw your own weapon&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Everyone joins from their phone by scanning a QR code on a shared screen (a TV, projector or laptop). Then a round goes like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Draw (20 s):&lt;/strong&gt; sketch any weapon on your phone. A sword, a banana, a squiggle, a flower.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Drop:&lt;/strong&gt; roll a random special ability (20 of them, from Dash and Freeze to Nukes) and pick where you land.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reveal:&lt;/strong&gt; the big screen shows off every weapon. Your doodle gets an "upgrade" moment where it turns into finished game art, and an AI commentator announces its name.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Battle (60 s):&lt;/strong&gt; your phone becomes a controller (joystick, attack, special) while the fight plays out on the big screen. The storm closes in, and sudden death hits at the end.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Results:&lt;/strong&gt; a top-3 podium, then back to the lobby for another round.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;The idea:&lt;/strong&gt; we wanted the magic of "draw anything and it just works" without the game ever feeling like an AI demo. Our design rule was the &lt;strong&gt;"invisible middle"&lt;/strong&gt;: players never see the words AI, generating, spinners or stats. You draw, and a few seconds later your doodle is a real weapon with its own attack style, projectile behavior, effects and sound.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fair under the hood:&lt;/strong&gt; the AI only picks &lt;em&gt;flavor&lt;/em&gt; from fixed building blocks: 8 attack archetypes (swing, thrust, slam, shoot, throw, whip, spin, beam), projectile behaviors (pierce, bounce, split, homing, arc) and decorations. A server-side balance formula then sets the real numbers so every weapon deals the same damage per second. A huge slow hammer and a fast little dagger are equally viable, and nothing you draw can break the game.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A round never stalls:&lt;/strong&gt; every AI step has an instant fallback. If the weapon design is slow, the server builds a weapon from the drawing's &lt;em&gt;shape&lt;/em&gt; (length, curviness, colors). If the art fails, you fight with your own doodle. If the sound fails, a stock sound plays. The game never waits on an API.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What we learned:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Real-time multiplayer is mostly about edge cases: phones locking mid-round, the big screen reloading, players reconnecting. We ended up treating the server as the single source of truth, and every device just renders what it's told.&lt;/li&gt;
&lt;li&gt;"Make the AI output safe" really means "never trust the AI output". Strict JSON schemas plus a validator that clamps every number got us further than any prompt tweak.&lt;/li&gt;
&lt;li&gt;Phones are hard: pinch-zoom mid-fight, audio that only plays after a tap, and iPhones that can't vibrate from a web page.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Stack:&lt;/strong&gt; TypeScript end to end (pnpm monorepo), PixiJS v8 and three.js on the client, and SpacetimeDB as both the database and the game server, running the battle simulation at 20 ticks per second. The website is hosted on AWS (S3 + CloudFront) at a &lt;code&gt;.tech&lt;/code&gt; domain.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;🎮 &lt;strong&gt;Play it:&lt;/strong&gt; &lt;a href="https://doodleffa.tech" rel="noopener noreferrer"&gt;doodleffa.tech&lt;/a&gt;. Open it on a laptop or TV, then scan the QR code with 2+ phones.&lt;/li&gt;
&lt;li&gt;💻 &lt;strong&gt;Code:&lt;/strong&gt; &lt;a href="https://github.com/mayozoz/mhacks26" rel="noopener noreferrer"&gt;github.com/mayozoz/mhacks26&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;🎥 &lt;strong&gt;Video:&lt;/strong&gt; &lt;a href="https://www.youtube.com/watch?v=B1xxp1ZwI_0" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=B1xxp1ZwI_0&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Partner Technologies
&lt;/h2&gt;

&lt;h3&gt;
  
  
  ElevenLabs: the voice of the arena (🏆 our ElevenLabs track win)
&lt;/h3&gt;

&lt;p&gt;ElevenLabs makes the game feel like a live game show:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Text-to-speech&lt;/strong&gt; (&lt;code&gt;eleven_flash_v2_5&lt;/code&gt;) voices a sports-style commentator on the big screen, reads each weapon's name during the Reveal ("Maya's Thunder Noodle!"), and has each phone announce "Your weapon is…" to its own player.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sound effects:&lt;/strong&gt; every weapon gets a custom one-second sound, generated from a sound description written for that specific weapon.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Music:&lt;/strong&gt; the title-menu loop was generated ahead of time.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We kept costs predictable with a per-round line budget and a minimum gap between lines. The weapon-name intros skip the LLM entirely, so they're instant.&lt;/p&gt;

&lt;h3&gt;
  
  
  xAI (Grok Imagine): doodle → weapon art
&lt;/h3&gt;

&lt;p&gt;The Reveal "upgrade" uses xAI's image model (&lt;code&gt;grok-imagine-image&lt;/code&gt;) for &lt;strong&gt;image-to-image&lt;/strong&gt; editing, paid for with the MHacks xAI API credit. The game server sends the player's raw doodle with a prompt to keep its silhouette, position and colors, and return a finished, cel-shaded game sprite on a pure white background. The client cuts out the white background, so the art drops straight into the arena, the phone's weapon card and the podium.&lt;/p&gt;

&lt;p&gt;In our tests it took about 8 seconds and $0.02 per weapon, and returned a roughly 100 KB image. That's small enough to send through the game server directly, with no separate file storage. The call starts the moment a player submits their drawing, so the art is usually ready by the time Reveal begins, and if it isn't, the player's own doodle is used. Everything runs server-side, so the API key never touches a browser.&lt;/p&gt;

&lt;p&gt;Getting here took a few tries: we also tested Amazon Bedrock and Google's Gemini image model ("Nano Banana"), and a Gemini version of the game lives in &lt;a href="https://github.com/mayozoz/DoodleFFA" rel="noopener noreferrer"&gt;a separate repo&lt;/a&gt;. Because the art step sits behind one small, provider-agnostic function, each switch was a single-file change.&lt;/p&gt;

&lt;h3&gt;
  
  
  .TECH domain
&lt;/h3&gt;

&lt;p&gt;The game lives at &lt;strong&gt;doodleffa.tech&lt;/strong&gt;: a short, memorable link that people type or scan in a crowded room, and one that fits on a QR code under the lobby's big room code.&lt;/p&gt;

&lt;h3&gt;
  
  
  Fetch.ai (ASI:One + uAgents)
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;asi1&lt;/code&gt; vision model turns each doodle into a weapon spec (strict JSON schema), and &lt;code&gt;asi1-mini&lt;/code&gt; writes the commentator's lines. We also wrapped the weapon designer as a Fetch.ai uAgent ("Weapon Smith") that the game can call instead, and that also takes text requests over Fetch.ai's chat protocol.&lt;/p&gt;

&lt;h3&gt;
  
  
  SpacetimeDB
&lt;/h3&gt;

&lt;p&gt;The whole game server is a SpacetimeDB module: rooms, the 20 Hz battle simulation, real-time sync to every phone and the big screen, and server-side AI calls with keys in a private table. No separate backend, sockets or sync code.&lt;/p&gt;

&lt;h3&gt;
  
  
  AWS
&lt;/h3&gt;

&lt;p&gt;S3 + CloudFront + ACM + Route 53 host the static site with HTTPS on the custom domain.&lt;/p&gt;

&lt;h2&gt;
  
  
  Hackathon Experience
&lt;/h2&gt;

&lt;p&gt;My teammates: Victor Liao (3rd year UMich CSE) and Ethan Wang (3rd year UMich EE)&lt;/p&gt;

&lt;p&gt;We built Doodle FFA at &lt;strong&gt;MHacks 2026&lt;/strong&gt; in Ann Arbor, as a team of three, and &lt;strong&gt;we won the ElevenLabs track&lt;/strong&gt; from MLH!&lt;/p&gt;

&lt;p&gt;I had a lot of confidence in this idea from the start. The more it came together, the more invested I got. Every time a new piece clicked into place, like the first doodle turning into a working weapon or the first round, I thought "damn, this is cool asf".&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;slime-making event&lt;/strong&gt; was one of my favorite parts of the weekend: a much needed break that let me reset before diving back in.&lt;/p&gt;

&lt;p&gt;The part I'll remember most happened before the awards. During demos, hackers we'd never met kept coming up to our table asking to play. I've always wanted to make something people actually care about, and watching strangers choose to play our game was exactly that feeling. Unfortunately there was no network in the basement so that was a bit dissapointing that we could not have everyone play our game.&lt;/p&gt;

&lt;p&gt;Then a Major League Hacking judge saw real value in the idea. For the first time, something I built mattered to other people, and someone vouched for it, so that made me super happy!&lt;/p&gt;

&lt;p&gt;I couldn't be at most of the awards ceremony because it coincided with my dance performance, and honestly, all weekend I felt like I needed two more clones of myself to be everywhere I wanted to be. But I'm walking away with a game I'm proud of, a live site at &lt;a href="https://doodleffa.tech" rel="noopener noreferrer"&gt;doodleffa.tech&lt;/a&gt;, and proof to myself that I can take an idea all the way from a sketch to something people line up to play. Can't wait to take this to the next stage as well!&lt;/p&gt;

</description>
      <category>mlhacks</category>
      <category>devchallenge</category>
      <category>hackathon</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
