Chess King & Queen Game by Jayking
i built a chess app where every game becomes a movie
Chess King & Queen Game by Jayking
i built a chess app where every game becomes a movie

the board on the floor
i was maybe nine years old, sitting cross-legged on the floor with a wooden chess set. the pieces felt heavier than anything i’d held. the queen had a small weighted base that thudded when you placed her on a square. the knights had this exaggerated horse-head curl that made them look ancient. i didn’t really know what i was doing. i knew how the pieces moved. i knew that if you got the other side’s king somewhere it couldn’t escape, you won. that was about it.
but i remember watching the games on tv. the world championship matches, where two grandmasters would sit across from each other for six hours and the camera would hold on their faces and you could feel the room not breathing. there was music sometimes, in the highlight packages. slow strings. low drums. a long zoom on a hand reaching for a bishop. chess felt huge. chess felt like it deserved a soundtrack.
i’d go back to my floor and play imaginary games where i’d narrate the moves out loud, like i was the commentator. the white pawn pushes forward. the black knight develops. the crowd holds its breath. i’d move the pieces myself for both sides because i didn’t have anyone to play against. i’d put on music sometimes — whatever was playing in the house — and pretend it was the soundtrack.
i didn’t know it then, but that was the first version of what i eventually built.

what i wanted that didn’t exist
i started playing chess online as i got older. lichess. chess.com. chesskid. they were great. they did everything they were supposed to do. i played. i lost. i learned openings. i lost more. i won a few times. my rating climbed and crashed and climbed again. i developed a serious addiction to bullet chess and a deep frustration with my own blunders.
but something was always missing.
after every important game i played, there was this moment of now what. the game was over. the result was logged. i could click through the moves in a little replay widget, see the engine’s evaluation lines, scroll past my mistakes. but the story of the game — the moment where i almost lost it, the move that turned everything around, the queen sacrifice i almost found — none of it ever felt remembered. it just dissolved into a database of millions of other games. one row among many.
the famous historical games were the same. the immortal game. fischer vs spassky. kasparov vs deep blue. these are some of the most dramatic stories in the history of any sport. but when you open them in any chess app, what do you get? a board. a list of moves. maybe a wikipedia summary if you click through. they’re treated like data points. they deserve to be treated like films.
so i had this question stuck in my head for years: what if every chess game you played got turned into a movie at the end? not literally — not pixar — but a sixty-second cinematic moment. music. a story. a short clip you could send to a friend. something that said: this game mattered. remember it.
the thing that finally made me build it
i’d had the idea for a long time, the way you have ideas: vaguely, in the shower, on long walks, while doing the dishes. never enough conviction to actually start. the thing that finally pushed me over the edge was a hackathon — the quadcode ai hackathon 2026, with an open prompt about building something that scratches an obsession with ai.
i’m a chess player. my profile picture is a chess king. i open lichess before i open my email. when my friends talk about their day, i’m thinking about a queen sac i almost found in a three-minute blitz two nights ago. the obsession was right there. i had no excuse not to build it.
so i started.
the first version was wrong. i’ll admit that. i built a passive cinematic explorer first — you’d click on a famous game, watch it play out, see the lore, hear the soundtrack, watch the clip. it was beautiful. it was almost a finished product after three days. but it was passive. you weren’t doing anything. you were just watching.
a few days in, i scrapped that direction and pivoted: play first, cinema as the reward. the user opens the site, picks a difficulty, plays a real game against a real chess engine. and when the game ends — only when the game ends — the cinematic part kicks in. the story is written about their game. the soundtrack plays over their moves. the fifteen-second clip captures their checkmate.
that pivot took the idea from a novelty into something that actually felt alive. it took another two days of intense building, a few moments of staring at error messages at 2am, one chess engine bug where the ai refused to play mate-in-one at a specific difficulty level (it turned out alpha-beta pruning was propagating the mate score to non-mate moves and randomness was picking the wrong one), and a multiplayer rewrite when i realized the app would be infinitely more shareable if two humans could play each other. but it worked.
what i built: Jayking’s chess realms
the app has three things in it.
a real chess engine
six difficulty levels, from pawn (around 600 elo plays semi-randomly, hangs pieces, gives you a soft warm-up) all the way up to grandmaster (around 2000+ elo punishes blunders, takes a few seconds per move, will absolutely make you sweat). in between you’ve got knight, bishop, rook, and queen as the difficulty progression — the chess piece hierarchy, climbing toward the king.
the engine is hand-written in typescript. negamax with alpha-beta pruning. piece-square tables for positional evaluation. quiescence search so it doesn’t hang pieces at the edge of its search depth. iterative deepening with a time budget so the ai is always responsive, instead of locking up your browser for forty seconds while it thinks. it runs entirely in your browser. no servers. no waiting. open the page, pick a level, play.
peer-to-peer multiplayer with a friend, anywhere in the world
this was the part i was most excited about and most worried about. i didn’t want a backend. i didn’t want users to create accounts just to play their friend. i wanted them to share a six-character code, click connect, and be playing within seconds.
so i used webrtc direct browser-to-browser networking via a library called peerjs that handles the signaling for you. one of you creates a game, gets a code like xq7m4n, sends it to the other person on whatsapp or x or discord or wherever. they type the code in (or just click the invite link, which is even simpler), and the connection happens directly between the two browsers. moves sync in real-time. no servers in the middle. no accounts. no friction.
i tested it with a friend across a different continent. the latency was lower than most chat apps. that’s the magic of webrtc when it works, it really works.

the cinematic post-game
this is the part that makes the app different from every other chess app on the internet.
when a game ends win, lose, or draw, against the ai or against a friend the app generates:
a 300–400 word story written about your specific game. the bundled writing handles win, loss, and draw situations differently, and handles ai opponents differently from human friends. so you get a story that fits the actual game you played. if you’ve added an anthropic api key in settings, the story is generated live by claude, looking at your actual moves and writing something specific to what happened.
a sixty-second orchestral soundtrack, fully synthesized in your browser using tone.js. tense strings. low drums. a bell climax around move thirty (when the middlegame usually turns). a soft fade at the end. there’s no audio file living on a server — every note is generated at runtime, which means it’s slightly different every time you play.
a fifteen-second cinematic video clip of the final moments of your game. canvas-based replay with slow motion, camera shake on captures, scanlines, a victory burst on the final move. you can download it as a webm file and post it anywhere.
four selectable board themes. share buttons that pre-fill a tweet. a “study legends” tab where you can replay four hand-curated historical games with the same cinematic treatment. and optional accounts (sign up with email + password) that save every game you play to a personal archive, so you can go back and re-watch any of them as a movie weeks or months later.
how to play
it lives at quadcode-chess-realms.vercel.app.
play vs the ai
- land on the homepage
- pick your difficulty. pawn for easy, knight or bishop for a casual game, rook or queen for a serious challenge, grandmaster if you actually want to lose
- pick your color: white, black, or random
- click “begin the duel”
- play. click a piece — gold dots appear on squares you can move to, gold rings appear around enemy pieces you can capture. click a destination to move
- when the game ends, click “see it as a movie” and watch your game become a film
play a friend
- click “play a friend” on the homepage
- click “create a game”, pick your color, generate a code
- copy the code or the invite link (the invite link is one click to copy)
- send it to your friend on whatever app you use
- they paste the link in their browser, or type the code at your site
- the connection happens instantly. you’re playing
optional: sign up for an account
- click “sign in” in the top right
- sign up with email and password
- every completed game now saves to your archive
- click your avatar → “your games” to browse them and re-watch any one as a cinema piece
accounts are optional. you can play the app forever, anonymously, and lose absolutely nothing. accounts just unlock the archive and give you a name that shows up on the opponent banner during games.
what i learned building it
a handful of things, in no particular order.
ship the rough version fast. the first version of my chess engine took fifty seconds per move at difficulty level four. that’s broken. it took shipping the broken version to realize i needed to rewrite the entire search with iterative deepening and a time budget. you can’t think your way to “is this fun to play”. you have to play it.
the unique angle is rarely the technical one. i’m proud of the engine. i’m proud of the webrtc implementation. i’m proud of the orchestral soundtrack. but the thing that makes this app different — the thing people remember about it — is the cinematic post-game. that was a product decision, not a technical one. the engineering serves the product, never the other way around.
play first, watch later. when the app was passive (just watching famous games play out), it was beautiful but lifeless. when i made it play-first, the cinematic part became a reward instead of a feature. the loop closed. suddenly the app had a reason to exist that wasn’t just “look at this neat thing”.
make it work without accounts. every feature i added, i asked: does this work for someone who’s never signed in? if the answer was no, i redesigned it. the result is an app where you can open the site, play a real chess game against a real engine, watch your game become a movie, share it with a friend, and never type your name. that’s the lowest-friction product i know how to build, and the one i’d want to use.
bugs hide in the corners. at one point, my chess engine couldn’t find mate in one at exactly one specific difficulty level. it could see the mate at level two. it could see it at level four. but level three would play random moves instead. the diagnosis took an hour and the fix was one line of code. that’s how bugs work. they hide in the seams between two systems that almost agree. and you only find them by going where nobody else would think to look.
try it
quadcode-chess-realms.vercel.app
source is open at github.com/Paulos-ui/quadcode-chess-realms.
if you play a game and the movie at the end makes you smile, send it to a friend. that’s the whole point. that’s what the kid on the floor with the wooden chess set would have wanted to do.
메타데이터
- post_id
- 855929a3f415
- slug
- chess-king-queen-game-by-jayking-855929a3f415
- url
- https://medium.com/@jayepaul81/chess-king-queen-game-by-jayking-855929a3f415
- canonical_url
- https://medium.com/@jayepaul81/chess-king-queen-game-by-jayking-855929a3f415
- author_url
- https://medium.com/@jayepaul81
- status
- ok
- fetched_at
- 2026-06-09 14:34:10