This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine
What I Built
A Kingdom by the Sea is a little Flash-style game where you play the lost love from Edgar Allan Poe's "Annabel Lee." She has slept in her sepulchre by the sea for a very long time, and you're standing on the shore, calling her back the only way you can: by remembering the poem.
He reads each stanza aloud and stops right before its last line. You pick the line that comes next. Get it right, and she comes a little further out of the dark and answers him. Get it wrong, and she flickers. Let her light run out, and the sea takes her back.
For me, the ghost in the machine is Annabel herself. She only exists while someone remembers her, the way the dead stay with us on Día de los Muertos, or the way Coco taught a whole generation to say "remember me."
It's also my small act of bringing a ghost back: Flash. It was switched off on December 31, 2020, and I've been on a mission to bring that era of web games back without actually using Flash.
Flash games were my childhood, and my childhood was the internet. On Y8 you could find any random game: Ed Heads if you were on the educational side, or a bartender game I absolutely should not have been playing (but it was fun). Then there were the Shockwave games: Sarah's Spa, and Texas Hold'em, where you couldn't get past Amarillo unless you paid for premium. And Peril at End House, the Agatha Christie mystery on my Windows 7 computer, back when Windows came with games. When I heard Flash was being retired, I was genuinely confused. What was the internet going to be without it? I didn't realize how much had been built on it until it was gone and everyone was scrambling to rebuild and relaunch their sites.
Demo
🌙 Play it: kingdombythesea.tech (headphones on, please)
If you just want the story, turn on Gentle mode: she never fades. Quiet mode turns off all the motion.
Code
Rei0322
/
project-chamomile
A Flash-style memory game inspired by Poe's "Annabel Lee." Call her back by remembering the poem; forget, and she fades. Her words by Gemma, voices by ElevenLabs, traced with Sentry. No Flash, no game engine. 🌙
🌙 A Kingdom by the Sea
Code name: Project Chamomile.
A Flash-style gothic memory game inspired by Edgar Allan Poe's "Annabel Lee" (1849, public domain), built for the DEV Hacktoberfest Open-Source AI Challenge, Week 4: Ghost in the Machine.
Annabel Lee has slept in her sepulchre by the sea for a very long time. You are the one who loved her, standing on the shore, calling her back by remembering the poem. He reads each stanza aloud and stops before its last line; you pick the line that comes next. Remember it and she comes further out of the dark, the marigold path to her tomb unrolls a little further, and she answers him: a whisper you hear, and words written by Gemma, an open-weight model, that you read. Forget, and her light runs out: she fades back into the sea, the way the dead fade when no…
Its code name was Project Chamomile, because I needed something calm and soothing to ground me while I built it. That's what this poem is for me. It's sad, but it's the most soothing thing Poe ever wrote.
How I Built It
Gemma (open-weight) writes Annabel's words. At home, she runs locally through Ollama on gemma3:4b. The live site can't run a model on a $5 server, so it calls Google's Gemma API with gemma-4-26b-a4b-it. Every stanza, Gemma is told how she feels at that point in her return (confused, then remembering, then afraid of losing the thread, then reaching for him) and the exact words she just whispered aloud. Her reply has to begin with those words, so what you read always matches what you hear. If no model answers, she speaks prepared lines, marked with a small ✦.
ElevenLabs gave them voices. I designed both in Studio. He's in his thirties, a Brit who's lived in America for about five years, so the accent has softened. She's in her early to mid-twenties, soft, with a faint British accent. The audio tags carry everything: [slowly], [voice breaking], and an [angrily] right after "envying her and me." His arc goes wistful, then the turn, then anger at the angels, then anguish on "Chilling and killing my Annabel Lee," then defiance. Her whispers start faint, "…the sea…", and grow clearer every stanza until "…stay with me, please." The sea is an ElevenLabs Sound Effects loop, and the music is three pieces from ElevenLabs Music: "Tide Memory" for the first three stanzas, "Mourning Light" crossfading in at stanza four where the grief takes hold, and "Warm Return" under the credits.
Sentry traces every call to Gemma. Each one is a gen_ai.chat span with the model, the timing, and the token counts. No prompts, no replies, no candle names, and no visitor IPs ever go to Sentry. And it earned its place on deploy night. The game looked fine. She was answering, and her words matched her voice. But Sentry showed every single hosted call as an error. Her backup lines were hiding a total failure. Google had retired Gemma 3 from its hosted API, and when I switched to Gemma 4, it spent its whole reply thinking and left her nothing to say. One setting later (minimal thinking), the spans went from errors at 4.5 seconds to ok at about one second, and the ✦ disappeared.

Every reply Annabel gives is one traced Gemma call: model, tokens and timing, and never the words.

After the fix: every call ok, in about a second.

One request: the game asks, Gemma answers, Google's API in the middle.
(Screenshots from the next day, after the fix.)
DigitalOcean App Platform hosts it, at kingdombythesea.tech.
No Flash, no game engine. It's Node, Express, and an HTML canvas animating at 12 frames a second, the way Flash games stepped. Vintage mode adds dithering, scanlines, and grain. The waves bob, the grass sways, and a marigold path unrolls toward her tomb with every stanza you remember.
The art started in Kittl with Nano Banana Pro. My first version was too clean and painterly to feel like Flash, so I regenerated it in flat vector style. For Annabel's gown, I went to my favorite research tool, the Met's fashion plate collection, and found an April 1849 Le Follet plate, from the year the poem was published.
Coding assistant: Claude Code, my build partner while work and school left me short on hours. The ideas, the story, and the direction were mine; the help turning them into code was a huge part of getting here.
What went wrong (and there was plenty)
- I lost a whole day to exhaustion.
- Codespaces wouldn't connect on my work laptop, so I built at home.
- The voices were the hardest part. Library voices came out too jaunty, too old, or, once I put "intimately" in a voice-design prompt, like someone reading a smut novel. Sighs sounded annoyed instead of heartbroken. "Softly" turned everything into a whisper.
- While recording, some of her lines just read wrong out loud, so I rewrote them on the spot: "don't stop" became "is it you?"
- Studio's document import read my speaker labels aloud and ate chapter one.
- The waves wouldn't move on flat art, and then, when they did, the whole island warbled with them.
- Deploy night: waiting on DNS, a Sentry project I'd never actually created, and a ghost secretly reading from her backup script.
The voices were the hardest part, but they were also my favorite, and the most fun I had all week. I wanted the man reading the poem to sound the way Malcolm Fade sounds in my head. I love an underappreciated villain, and Malcolm became one for a reason: you understand exactly why he turned hateful. So I went looking for my perfect British man, and then for an Annabel to match him. Designing a voice without ever seeing one is a strange, abstract thing, and I ended up being a stage director: rewriting her lines while recording, telling him to get angry on one word and break on the next. Being creative in a completely different way sparked something I hope never goes away, and I'm excited to see where the next challenge takes my brain.
And then there's the one that almost got past me. I've been juggling three projects at once, and the overachiever in me wanted to do as much as I possibly could, because I'm really trying to shake my imposter syndrome. Every little thing I finish and put out there helps prove to me that I do have the skills. So when the game went live, I was confident it worked. Annabel was answering; her words matched her voice, and everything looked right. I saw one error in Sentry and figured it was a fluke. Then I looked closer and noticed the little diamonds at the end of her lines. She was reading from her backup script the whole time. I'm so glad I actually used the tracing, because I would have shipped it never knowing anything was wrong. Lesson learned: if your monitoring says something's broken, believe it.
Why Does Open Innovation Matter?
At the end, you're invited to light a candle for someone you remember, and to type their name. That's the most private thing anyone will ever type into this game. When you run it at home, Gemma runs on your own computer, and that name never leaves it. That promise is only possible because the model is open.
It also means anyone can download the repo, pull the model, and play offline, for free, with no account or API key.
Deploy night proved the point. Google retired the hosted Gemma 3 API in the middle of my project. My local Gemma 3 didn't care. It kept working, because nobody can retire weights you already have. Flash taught me what happens when something you love lives on someone else's switch. Remembrance shouldn't depend on a server staying up.
(To be upfront: the live demo uses Google's API for convenience, and the game says so right under the candle box. The open weights are what make the private, offline version possible.)
The Spirit of It
I found "Annabel Lee" through Annabel Blackthorn in Cassandra Clare's Lady Midnight. The poem is the backbone of villain Malcolm Fade's character arc, and the book's chapter titles are lines from it, scattered in no particular order. I've been reading the Shadowhunter books since 8th grade, when my friends wanted to read City of Bones before the movie came out. The movie wasn't the greatest, so I stayed with the books. I didn't know about the poem connection at first. When I found out, I read it in my own collection of Poe's work, and I loved it. It's the cadence. Like Hamlet's "To be or not to be," you just love it when someone performs it well.
Lady Midnight scattered the poem across a book. This game asks you to put it back together.
I've always loved Día de los Muertos. You celebrate the people you loved, and you take the time to talk about them, even when it's painful, because that's how you heal. I learned about it studying Mexico and Guatemala in Spanish class, and the quieter day is the one I find most beautiful: the day for the children, when families set out offerings for little souls. Growing up as an American kid, especially a Black American kid, grief wasn't something we talked about. It was taboo. So learning how other cultures carry loss has always fascinated me. Not because it's about death, but because of how they accept it and move forward.
Between 2019 and 2021, I lost four people, back to back. I was 20, going on 21, and they were people who had always been close to me: my great-grandmother on my mom’s side, who had been in my life my whole life; my paternal grandmother; my maternal grandmother’s best friend; and a cousin who was like another aunt to me. It all happened so quickly, and every loss was a shock. When you’re that young, you expect the people you love to be around a little longer. I’d just seen my cousin at my sister’s birthday party, and a couple of months later, she was gone.
What helped me was remembering their lives as something beautiful, not the moment they ended. They never truly stopped being a part of my life. They just stopped being physically there. I wanted to make something that helps other people carry grief the same way.
That's what the candle is for. I, the creator, don't need to remember. You, the player, do. It's a small requiem inside a light little game. Other visitors' candles are already burning at her tomb when you arrive. Yours joins them, and the name is never shown again. Only the candle stays.
He started the poem wistful and sweet, and by the end it's as fresh as if he lost her yesterday, even if it's been years. They built a forever around each other, and that forever isn't there anymore. She knows she's losing him to his grief, which is why her last whisper before the end is "stay with me, please." And when you finish, she answers: "You remembered me."
While someone remembers us, we are never truly gone.
Prize Categories
- Gemma: Annabel's words, locally with Ollama and online through Google's Gemma API
- ElevenLabs: both voices, the sea and all three music pieces
- DigitalOcean: App Platform hosting
- Sentry Agent Tracing: every Gemma call traced, and the bug it caught on deploy night
- .tech: kingdombythesea.tech
The poem: "Annabel Lee" by Edgar Allan Poe (1849), public domain.

Top comments (1)
This is such a nice project, I love the Annabel Lee poem. You captured it so well. And I am pretty impressed by the voices~ 😯