You've seen the ad. A little knight stands in a stone tower, with a pile of gold above him, a pool of lava above that, and a few golden pins holding it all in place. Pull the right pin and the gold pours down on him. Pull the wrong one and he's toast. "99% FAIL." Then you install the game, and it's a completely different game.

So I gave that ad to Claude Opus 5.5 and told it to build the real one. It worked for 95 minutes over two rounds, spent $39.16 in tokens and wrote 4,292 lines of code, including its own physics engine for the gold, the lava and the water. It never asked me a single question. The result is Pin & Plunder, and you can play it right now, free, on your phone or computer.

Opus working, over two rounds
95 min
in tokens, at API prices
$39.16
lines of code in the finished game
4,292
lines of code written by me
0
From the session logs of both rounds, November 30, 2026.

How I know this. I'm Nikandr Surkov, and I make videos about new AI models and AI experiments on YouTube. I ran this build for one of them. It's the second part of a series: in the first, Claude built the +1 soldier game from the Last War ad. Every number here comes from the session logs, and every clip is a real recording of the game. Pin & Plunder is an original game; it isn't affiliated with Hero Wars, Homescapes, Gardenscapes or the companies behind them.

The pull the pin ad, and the game you actually get

The ads that made "pull the pin" famous were led by Hero Wars, from the studio Nexters (its parent company is now called GDEV). The ad is a puzzle: a hero, a tower, pins, gold, lava, water and a monster, played by a hand that pulls the wrong pin so that you feel you'd do better.

The game isn't a puzzle. GDEV's own annual report calls Hero Wars a "mid-core multi-platform RPG" where "players start with a single hero and progress through the game by collecting new heroes". One of Nexters' own creative producers said in 2022 that "80% of the time players spend in Hero Wars is spent on the menus."

Players noticed early. A review on the Canadian App Store from July 13, 2019 says the ad "shows it as some puzzle game when all it is really is and auto pilot RPG". On March 9, 2020, the developer answered another complaint like this: "Too bad you didn't get to the puzzles!"

Because by then there were puzzles, sort of. On December 2, 2019, the official Hero Wars channel on YouTube posted a walkthrough called "How to Find Puzzles" for, in its own words, "those famous puzzles you see in the ads all over the Internet". A fan guide from September 2020 counted nine of them across the first seven chapters of the campaign.

And the ads worked. By the end of 2025, players had spent more than $2.5 billion on Hero Wars across all its versions, according to GDEV's annual report, $325.1 million of it in 2025 alone.

The UK banned the ad, and other studios built the game

Hero Wars wasn't alone. Playrix, the company behind Homescapes and Gardenscapes, ran pin ads for its match-3 games. On September 30, 2020, the UK's Advertising Standards Authority banned two of them. One showed, in the regulator's words, "a man floating at the base of a tower filling with water. Above the man, two pins held money and lava in place", and ended on "ONLY 5% CAN SOLVE THIS".

Playrix's defence is my favourite number in this whole story. It said the mini-games from the ads were in the game, but only about 0.03% of Homescapes players had reached the levels with them. That's three players in ten thousand. The regulator's answer: "Because the ads were not representative of the games they were purported to feature, we concluded that they were misleading."

Under BBC News's post about the ban, the top reply asked the obvious question: "Why didn't they just make the game that's in the advert? That one actually looked decent".

By then, other studios already had. The game from the ad was a whole genre:

GameStudioOn Google Play sinceDownloads there
Pull the PinPopcore GamesJanuary 16, 2020100M+
Hero RescueAzura GlobalMarch 25, 202050M+
Pull Him OutLion StudiosJune 10, 202050M+
How to Loot - Pin PullAzura GlobalJune 23, 2020100M+
Home Pin: Pull The Pin PuzzleGamee GlobalOctober 4, 202010M+

Google Play shows downloads in bands, so "100M+" means at least 100 million. I read these on November 30, 2026.

Pull the Pin, which swaps the knight for coloured balls, was downloaded 18.2 million times in February 2020 alone, according to Sensor Tower. How to Loot is the closest to the ad: its store page asks you to "help knights destroy monsters, pin rescue the princess and find treasure". And Lion Studios didn't hide where its idea came from. The store page of Pull Him Out says: "The other tricky and relaxing puzzle game you've been seeing all this time is also now a reality!"

So the game from the ad does exist. It just didn't come from the companies that advertised it.

Who built it before me

Plenty of people, mostly by hand:

  • A42 Games, an indie studio, released its own How To Loot in April 2020 and later posted on X: "Always wanted to play pull-the-pin puzzles you saw in those well known fake ads? Finally, here's the REAL game!"
  • samyam, a game developer on YouTube, had Bezi (an AI assistant for the Unity engine) build three fake ad games in one video on August 19, 2026. One of them was a simple 2D pull the pin game.
  • Built by Mad had Claude Opus 5.5 build a game from a different Hero Wars ad, the one with the number tower, in October 2026.

What I couldn't find on X was one of the newest models building the pin ad itself. Under one of noclipepe's fake ad builds (his Last War build is in part one of this series), someone asked for "level 3: the pull-the-pin puzzle ad. please" on November 18, 2026. He replied "lmao great idea", and as of November 30 he hasn't posted one.

So I did. And like last time, I wanted every step on the record.

The setup: one prompt, 12 frames and real tools

The setup is the same as for the Last War ad game. Opus 5.5 ran in Claude Code at maximum effort, on its own, in a folder with a starter kit. It got:

  • One prompt with every beat of the ad, the look to aim for, and the rules (below).
  • Twelve frames: eleven cut from one playable pin ad, in time order, and the red "fail" end card of another.
  • three.js r187, the free 3D engine behind most browser games, with every official add-on.
  • Free models and sounds, but only from a short list of sites (Poly Pizza, Poly Haven, Kenney, OpenGameArt, GitHub and a few others), and only data files: models, textures and sounds, never code.
  • Eyes: a locked, offline browser with a GPU that runs the game and sends back screenshots.

I didn't write a line of code. My job was to play it and complain. This is the prompt, word for word (I shortened the local tool paths):

The prompt Opus got
You know those mobile game ads everybody has seen: a little hero stands in a stone tower, and long golden pins hold back piles of gold, red-hot lava, water and monsters. Someone pulls a pin, and either the gold pours down on the hero or the lava does and he's toast. "99% FAIL". You tap install and the game is something else entirely. Your job is to build the game from the ad for real, as a browser game in three.js, and make it look as good as the ad.

Start by opening everything in reference/ with Read: post.txt describes the ads, and ad-01 ... ad-12 are frames from them in time order.

WHAT THE GAME DOES (one level: one tower, climbed room by room, about 60-90 seconds, every beat working)
1. Pins: long golden pins with a ring handle run through the walls and hold everything in place. Drag a pin out by its handle along its own direction (mouse or touch), or tap it, and it slides out with a satisfying pull; whatever it held falls with real physics.
2. Gold: a chamber full of gold coins and gems, with the hero's sword in it. Pull the right pin and the gold pours down onto the hero with clinks; he grabs the sword and the gold counter jumps.
3. Lava: red-hot, glowing lava that flows like a liquid. If it reaches the hero, he burns (comic, charred) and the room fails.
4. Water: blue water that flows too. Where water meets lava, the lava hisses into steam and cools into black stone the hero can walk on.
5. The monster: a monster waits in a room. Drop it into the lava, onto spikes, or drop something heavy on it before the hero walks in; if the hero meets it first, he loses.
6. The other hazards from the ads: a wall of arrows, a barrel, a bomb.
7. Each solved room: the hero walks or climbs to the next room on his own ("NEXT LVL"), and the camera rises with him. At the top, someone locked in a cage shouts "HELP!" next to a treasure chest; the last pins free them.
8. End: VICTORY with stars and the gold total, or FAIL with Retry (it restarts the room). Ad-style captions are welcome ("99% FAIL", "ONLY 1% CAN SOLVE THIS", a tutorial hand pointing at a pin, the big red FAIL).
Four rooms of two or three pins each, every room built around the beats above. No extra features beyond what the ads show.

THE LOOK
It must look like the ad, in real 3D: a side-on view of a chunky stone tower with a little perspective and depth, glossy golden pins, piles of shiny coins that tumble and stack, glowing lava and clear water that really flow and splash, steam, a bright sky and landscape behind, a cute cartoon hero. A glossy, bright, saturated mobile-game look, chunky readable numbers and text, and lots of juice (coin clinks and sparkles, lava glow, steam puffs, screen shake, a slow-mo at big moments, punchy sounds). Portrait first (a phone screen, 9:16) and it must also work in landscape. Smooth at 60 fps.

YOUR OWN GAME (hard rule)
Same mechanics as the ads, but your own game: your own name and logo, your own characters, your own UI. No names, logos, characters or art from Hero Wars, Homescapes, Gardenscapes or any other real game or ad.

WHAT YOU HAVE
- game/ is the web game; game/index.html is the entry point. three.js r187 is in game/vendor/: the WebGL and WebGPU builds, TSL, and every official addon in game/vendor/addons/ (loaders, post-processing, TSL effects, environments). game/vendor/README.txt has the import map. Use the best current three.js approach as you judge it. In our test browser (RTX 5090) WebGPU may fail to start, and three.js then falls back to WebGL2, so the game must look right on either backend.
- You don't have to make everything from scratch. Use good existing free assets wherever they make the game look better: animated CC0 characters and props (Quaternius, KayKit, Kenney and others on Poly Pizza), Poly Haven HDRIs and textures, ambientCG materials, the three.js addons and shaders. Find them and their direct file links with:
node tools/asset-links.mjs --help
and download only with:
node tools/fetch-asset.mjs "<https url>" downloads/<name.ext> [--extract]
Data files only (models, textures, HDRIs, sounds, and zips of those), into downloads/; copy what you use into game/assets/. Font files are refused, so use system fonts. Poly Haven, ambientCG, threejs.org, GitHub, jsDelivr, Kenney, Poly Pizza, OpenGameArt and Khronos download at once; another host waits for a human reviewer. Only assets that are fine in a public YouTube video: CC0, CC-BY (credit it) or MIT-style. Nothing behind a login, nothing paid, no ripped game assets.
- Blender, to inspect and convert models (our own script runs; nothing inside the file runs):
node tools/convert-model.mjs downloads/<file> --list
node tools/convert-model.mjs downloads/<file> game/assets/<name>.glb [--only "ObjA,ObjB"]
- Eyes: see the game in a real browser with a GPU (offline, it serves only game/). Write a steps file, for example shots/run.json:
[{"wait":2500},{"shot":"start"},{"move":[0.5,0.4]},{"mouse":"left","down":true},{"move":[0.2,0.4],"ms":500},{"shot":"pulled"},{"mouse":"left","down":false},{"wait":3000},{"shot":"later"}]
then run: node tools/look.mjs shots/run.json --name run --size 540x960
It prints the page's console output and the screenshot paths. Open the PNGs with Read and compare them with the reference frames. Look often, and fix what looks wrong.
- Bash: one simple command per call, with no pipes, redirects, &&, ; or $, forward slashes in paths, and only inside this folder. ls, cat, mkdir, cp, mv and rm work on workspace paths. Any other script you want to run (node, python, Blender) goes to a human reviewer first and may wait, so do the work in the game itself where you can.

FOR OUR RECORDING (our recorder opens game/index.html without a query string, so give each of these a key too)
- P (or ?demo=1) plays the whole level on its own like a good player: a visible hand pointer moves to the right pin and pulls it, room after room, and wins. O (or ?demo=fail) plays it like the ads do: it pulls the wrong pin and fails.
- Keys 1-4 (or ?room=N) jump straight to a room; Space starts; R retries.
- window.__game exposes plain state for our recorder: the room, the pins left, the gold count, the hero alive or not, won/lost.
- The game runs from game/ alone, offline. No network requests at runtime.

RULES
- Do the whole job on your own. Don't ask me anything and don't wait for my approval; make every decision yourself.
- No clock, but don't overbuild: one polished level that hits every beat above and looks like the ad beats a big unfinished one. Stop when it looks and plays like the ad.
- At the end, write game/README.md: the game's name, what you built, the controls, the keys and URL options, and every asset with its source page and licence.

Two details came from the last build. Opus found out there, the slow way, that font files are refused, so this prompt says it up front. And because the recording browser opens the game without any options, every test mode got a key: P plays the level like a good player, O plays it like the ads do and fails, and 1 to 4 jump to a room. Those keys still work in the copy on this site.

Minute by minute: how Opus built it

Round one took 72.9 minutes. Here's what happened, with Opus's own words from the log:

TimeWhat happenedOpus said
0:00–8:24Read the brief, studied the 12 frames and checked the three.js features it planned to use"I'll start by exploring the workspace and reading the reference materials."
8:26–12:25Went shopping for free models, textures and sounds"Assets gathered (characters, chest, trees, stone texture, sky HDRI, CC0 sound packs)."
12:35–13:01Tried to read my screenshot tool's source code, was refused, and learned the tool by poking it with tiny test files"Probing the screenshot tool's supported steps (key presses, URLs) so I can test the game in the browser."
14:00–14:58Loaded the characters in the browser to list their animations"WebGPU fails on this machine and three.js falls back to WebGL2, so that's the path I'll test most."
19:40–43:52Wrote the whole game without running it once: 18 files, about 4,030 lines"Now the shared config and the 2D physics engine (coins, gems, lava/water fluid, stone, bodies, pins)."
43:55Pressed play for the first time"Let me run it for the first time and see what breaks."
44:42–47:38Judged its own screenshots and fixed the look"the liquids render as stripes, the coins look washed out"
47:59–59:19Played every room, every wrong pin and Retry"Lava-first in room 1 melts the gold and fails correctly; performance is a solid 60 fps with ~2 ms CPU per frame."
61:16–68:25Polish: the chest's golden glow, bubbles, sounds, a funnier death"the hero now hops up out of the lava, charred and smoking, before collapsing"
70:19–72:56Wrote the README and stopped"The game is done: Pin & Plunder — Tower of Traps"

It went shopping first

Minutes 8 to 12 were shopping. Opus picked a knight, a skeleton with a blade and a mage for the cage from KayKit's free character packs, then compared three treasure chests, four stone wall textures and two kinds of pine tree by looking at their preview pictures. For the walls it said it wanted "light, chunky blocks like the ad". The guard's log shows 32 downloads, all from the allowed sites.

Nine free 3D model and texture previews Opus compared: the Chest with Gold, Chest, Stone Brick Wall, Pine Trees and Bushes circled as picked; another chest, Castle Wall Slates, Defense Wall and a single pine not used
Previews Opus looked at while choosing props. Circled: the ones it used, free (CC0) models by Quaternius and a texture from Poly Haven. The characters are from KayKit.

4,000 lines before the first run

Then it stopped looking and wrote. For 24 minutes it made few tool calls, and most of them were whole files: the physics engine at minute 25, then the tower, the liquid renderer, the coins, the characters, the four rooms (it called that file "the big one"), the main game loop, and an autopilot that plays the level with a visible hand. Only then did it press play.

Tool calls in each 5 minutes of round one

Minutes into round one

Tool calls in each 5 minutes of round one
2.520
7.533
12.596
17.54
22.52
27.514
32.59
37.55
42.512
47.549
52.548
57.546
62.547
67.535
71.515

Counted from the session log: 435 tool calls in 72.9 minutes.

The spike near the start is the shopping: 96 calls in five minutes, most of them searches, downloads and looks at preview pictures. The flat stretch is Opus writing the game. The plateau after it is the loop of playing, looking at screenshots and fixing.

How the gold, the lava and the water work

In these ads everything flows. The gold pours like sand, the lava and the water slosh around, and when they meet, the lava turns to stone. That's the hard part of this game, and it's why I picked this ad.

three.js draws things, but it doesn't simulate them. So Opus wrote its own engine: one file, 555 lines today, nearly all of it written in one go before anything had run. Here's how it works, in plain words:

  • It's 2D physics inside a 3D picture. Everything that moves is a small circle on a flat plane. The 3D coins, the glowing lava and the knight are drawn on top of that plane.
  • Everything is a particle. When the level starts there are 1,543 of them: 865 of lava, 509 of water, 145 coins, 20 gems and four heavy bodies (the sword, the barrel, the skeleton and the bomb). The eleven pins, the walls and the knight are simple shapes the particles bump into.
  • Coins behave like sand. A coin can't overlap its neighbours and rubs against them, so a pile holds its slope, and then avalanches when you pull the pin under it.
  • Lava and water behave like liquid. Each drop checks how crowded it is and pushes its neighbours away until the crowd is back to normal. That one rule comes from a 2005 graphics paper by Clavet, Beaudoin and Poulin, and it's enough to make a blob that levels out, splashes and fills a tank. Lava gets more than five times the viscosity of water, so it oozes.
  • Stone is a rule, not an animation. When a lava particle touches water, it becomes a stone particle and the water becomes steam. Fresh stone cools any lava it touches, so the cooling runs through the pool like a wave.
  • It takes 180 small steps a second, three for every frame at 60 fps, which keeps the piles and the liquids stable.

Drawing it is a second trick. Hundreds of little circles would look like frogspawn, so the game never draws the liquid particles. Every frame it stamps them into a small picture of how dense the liquid is, 157 by 125 pixels per room, and one shader paints lava or water wherever that picture is above a threshold. The same shader runs whether the liquid sits in a tank or pours, so it always reads as the same stuff.

Room two in the finished game: water first, then lava. Every drop is a particle, and the stone is lava that touched water.

On the test machine the whole game, physics included, used about 1 to 2 milliseconds of processor time per frame, out of the 16.7 a frame has at 60 fps.

It played its own game 31 times

Like in the last build, I didn't ask Opus to playtest. It did anyway: 31 runs through the screenshot tool in round one. It wrote little scripts (press P, wait, take a screenshot, drag from here to there), then read the pictures and compared them with the ad.

Its first verdict on its own work, 47 seconds after the first run, was harsh: "the liquids render as stripes, the coins look washed out". A minute later: "the hero is too small". It fixed all three before moving on.

My favourite moment is at minute 55. Opus tried a real mouse drag on a pin, and nothing happened: "The mouse drag didn't grab the pin. Let me add a debug log to see whether the pointer event arrives and what gets picked." Fifty-four seconds later it had the answer, and the bug was its own: "The look tool takes fractional coordinates (0–1), not pixels." It had been clicking at pixel positions while my tool expected fractions of the screen. The game was fine. It removed the debug logs and carried on.

Then it tested every way to lose. It pulled the lava pin first in room one to check that the gold melts. It pulled the arrow pin. It opened the gate with the skeleton still alive, dropped the wizard's cage into the lava, and set off the bomb. And when the lava death looked dull on camera, it changed it: "the hero now hops up out of the lava, charred and smoking, before collapsing".

Its final report was honest about what it couldn't check. On sound: "I couldn't listen to the audio; I only confirmed that all 50 sounds load and the audio context runs." And on the newer graphics path, WebGPU, which wouldn't start in the test browser: "I never saw the WebGPU path run. It uses only standard three.js materials and shader nodes, but it's untested." Remember that line. It comes back at the end.

Round one: every beat of the ad

After 72.9 minutes and $26.94, it said it was done. And honestly, it's all there. Pull the right pin and the gold pours down on the knight, and he grabs his sword. Water first, and the lava hisses into stone. A skeleton on a bridge, with a barrel to drop on its head. A wizard in a cage shouting "HELP!" over a pool of lava, a chest worth 500, and victory with three stars.

Then I played it, and got pincushioned

The pin right next to the knight looked like it opens the way out. So I pulled it first. It was holding back a wall of arrows.

Round one, my own first move: “Pincushioned!”, about three and a half seconds after my tap.

Fair enough. That's the ad's whole joke. On the second try I got the gold and made it through the lava room, but next to the real ad the game still looked wrong. So I sent Opus four complaints, written against the ad's frames:

My notes for round two
I played Pin & Plunder start to finish (P, O, and by hand: I pulled the pin right next to the hero first because it looked like it opens the way to NEXT LVL, got pincushioned, retried, then cleared rooms 1 and 2). Great work: every beat of the ad is there, it runs at 60 fps, and the lava hissing into black stone with glowing cracks looks great. Now make it look like the ad. Put your portrait screenshots next to reference/ad-01, ad-04 and ad-09 and fix these, most important first:

1. The camera. In the ad one room fills the phone screen, so the hero, the pins and the gold are big. In portrait ours shows two rooms at once inside a narrow tower: the hero is about a twentieth of the screen height and the bottom third of the screen is empty grass. Frame the current room so it fills the width of the screen with a small margin, keep every pin's ring handle inside the frame (now the side rings sit at the very edge; room 2's water pin is at the right edge of the screen), and follow the hero up when he climbs to the next room. Landscape can keep showing more of the tower.
2. The lava and the water at rest look like flat blurred rectangles, like stickers on the wall. In the ad the lava is a glossy, glowing liquid with a wavy bright surface and bubbles, and the water is clear and shiny with a moving surface. Make the resting liquids read as liquids (a wavy shiny surface, bubbles and glow in the lava, highlights and depth in the water), and keep them the same liquid when they flow.
3. The gold. In the chamber and after it pours, the coins read orange-brown, not gold. Make them bright yellow gold with highlights and sparkles, like the ad's pile, so the heap looks like treasure.
4. The captions. The "99% FAIL" sticker covers the puzzle at the start of rooms 1 and 2, and "ONLY 1% CAN SOLVE THIS!" sits half hidden behind the tower in room 1. Put captions above or below the room, never over the pins or the hero, and always in front of the scene.

Keep everything else as it is: the four rooms with their solutions and fails, the keys (P, O, 1-4, Space, R, F), ?demo and ?room, window.__game, the sounds and the captions' wording. Check each fix with screenshots in portrait 540x960 and in landscape. Keep this round short and focused; stop when these four read clearly. Then update game/README.md.

The third note is funny in hindsight. The gold looked brown partly because, at minute 58 of round one, Opus had toned down the coins' shine on purpose, after deciding they glared.

Round two: 22 minutes, one room and real gold

Round two took 22.1 minutes, $12.22 and 137 tool calls. Opus started by putting its own screenshots next to the ad's frames. Then it:

  • Framed one room wall to wall. In portrait the room is now about 25% larger, and the rest of the tower is dimmed, so one room reads as the whole screen. The camera follows the knight up the ladder and frames the next room the same way.
  • Moved every ring handle onto the wall, so no pin sits at the very edge of the screen. That left almost no room to drag, so a short outward drag of about 12 pixels now pulls a pin, and a tap still works.
  • Rewrote the liquids. The lava got a wavy, white-hot surface, slow bubbles and a glow. Opus also found why it had looked pink: the game's tone mapping was washing out the over-bright orange. The water became clear, with a foam line on top.
  • Fixed the gold, and explained it: the coins now have "a yellow self-glow (so the lava's orange light can't turn the coins brown)". Resting coins also turn their faces to the camera, like the pile in the ad.
  • Moved the captions into the bands above and below the room, so nothing covers the puzzle.

There was a small detective story in there too. The dimming around the room didn't show up in its first screenshot. Instead of guessing, Opus made it "temporarily solid red to see whether it renders at all". It did, so "the gradient was simply too faint", and it turned it up.

And it fixed a bug it had no way to see. While rewriting the liquid shader it noticed that one function call wouldn't be valid on WebGPU: "Reversed-edge smoothstep is undefined in WGSL, so I'll replace those calls with a safe helper to keep the WebGPU backend correct". Its test browser couldn't run WebGPU at all, so nothing would ever have shown that bug to it.

Round two, room one: the right pin. The gold pours, the counter races up and the sword flies into his hand.

The wizard got toasted

So I played it again. This time I got through the gold, the lava room and the skeleton, all the way to the top, where the wizard was screaming for help. So I pulled his chain first, and dropped him straight into the lava.

Round two, my own play: “The wizard got toasted!”

Second try: water first, the lava cools, the cage smashes open on the stone, and he's free. I finished with 3,210 gold and two stars, because one fail costs a star.

How room four is supposed to go (the winning autopilot): “FREE!”, “MY HERO!”, +500, victory.

One more honest note. Opus's winning autopilot isn't perfect either. In one of my recordings, in a square window, it pulled the lava pin in room two before the water had finished spreading, burned the knight, retried and then won. Only 1% can solve this, and even its maker slips.

Next to the real ad

Here's the finished game next to two frames from the ad Opus was given: the gold chamber, and the lava cooled into stone.

The pins, the gold with the sword in it, the arrows, the lava turning into stone, even the "NEXT LVL" sign. The difference is that this one you can actually play. And because the brief banned anything from the real ads, every character, name and logo is different: the models are free ones from KayKit and Quaternius, and the tower, the pins, the coins and the liquids were made in code.

What it cost: time, tokens and tool calls

Round oneRound twoTotal
Time72.9 min22.1 min95.0 min
Cost (API prices)$26.94$12.22$39.16
Tool calls435137572
Playtests (screenshot runs)311041
Tokens written by Opus399,497114,383513,880
of which thinking193,60264,858258,460
Tokens read from cache67.5 million42.7 million110.1 million

The cost is what the logged tokens would cost at API list prices, as Claude Code reports it. It isn't what I paid on a subscription. Almost all of it is Opus; a small helper model (Haiku 5.5) used a fraction of a cent. Most of the token count is Opus re-reading its own growing context, which is why prompt caching matters so much in long agent runs.

Where the 572 tool calls went
  • Read files31.1%
  • Edit code29.2%
  • Run commands24.8%
  • Write files9.3%
  • Search code3.7%
  • Other1.9%

Both rounds, counted from the session logs. Reading includes Opus looking at its own screenshots; running commands includes the 41 playtests and the downloads.

And this is the finished code, file by file:

FileLinesWhat it does
main.js756The game loop, the camera, the room flow, winning and failing
rooms.js688The four rooms: layouts, pins and puzzle logic
physics.js555Coins, gems, lava, water, stone and heavy bodies
tower.js291The stone tower, ladders, trapdoors, torches and signs
fluid.js226Drawing the lava, the water and the stone
pins.js222The golden pins: drag, tap and pull
everything else1,554Sounds, effects, interface, coins, characters, landscape, autopilot, page and styles
Total4,292

Compared with the Last War build

Headcount Heroes (Last War ad)Pin & Plunder (pull the pin ad)
Time96.8 min95.0 min
Cost (API prices)$37.76$39.16
Tool calls555572
Playtests4741
Lines of code3,9684,292
Hardest partHundreds of animated soldiers at onceGold, lava and water that flow

Same model, same tools, same two rounds, and almost the same bill: this one was about two minutes faster and $1.40 more expensive. The problems were different, though. The Last War game needed hundreds of animated characters to run smoothly. This one needed liquids. Both times Opus wrote the hard part itself: a crowd renderer there, a physics engine here.

Play Pin & Plunder, and how to solve every room

The tower takes a minute or two. Drag a pin out by its ring, or just tap it. These are its four rooms:

If you're stuck, here are the answers:

RoomThe right orderWhat goes wrong
1. Gold RushThe diagonal pin under the goldThe pin by the knight fires the arrows ("Pincushioned!"). The lava pin first melts the gold.
2. Hot & ColdWater, then lavaLava first: "Burned to a crisp!"
3. Bone BruteThe barrel pin or the bridge pin, then the gateGate first: the skeleton charges ("Monster snack!")
4. RescueWater, then the chainChain first: "The wizard got toasted!" The bomb pin: "KABOOM!"

You get three stars for a run with no fails, two for one or two fails, and one after that. On a computer you can also press P to watch the game solve itself, or O to watch it fail the way the ads do.

On a phone, hold it upright, like the ad. On a computer it also works in a wide window, where you see more of the tower:

The same room in landscape.

Now, about that line from Opus's report: "I never saw the WebGPU path run." Neither had I. Every run and every recording was on the older WebGL2 path, because WebGPU wouldn't start in the locked test browser. So the first time this game ever ran on WebGPU was when I tested the copy on this site in regular Chrome. It worked first time, looked the same, and ran at 115 to 240 fps on my laptop's RTX 5090 with the frame cap off. I can't tell whether the fix Opus made blind in round two is what saved it, but nothing needed fixing.

For this site I made a few small changes to Opus's game, and nothing in the gameplay: links back here and to this article, "tap" or "click" wording to match your device, a hint to turn a phone upright, and an automatic resolution drop on slow phones so the frame rate holds. I tested the copy in Chrome at phone and desktop sizes, with touch and with a mouse.

More games from the videos are on the games page.

Questions people ask

Is there a real pull the pin game?

Yes, several. Pull the Pin by Popcore Games and How to Loot - Pin Pull by Azura Global each have over 100 million downloads on Google Play, and Pull Him Out by Lion Studios has over 50 million. They were all released in 2020, after the ads had made the puzzle famous. Pin & Plunder plays the knight, gold and lava version of the ad, free in your browser.

Is Hero Wars actually like the ads?

Mostly not. Hero Wars is an RPG about collecting and upgrading heroes, and one of its own producers said players spend 80% of their time in menus. The developer did add pin puzzles by December 2019. A fan guide counted nine of them in the first seven chapters of the campaign, paying out gear and hero shards. The game around them is still the RPG.

Why do mobile game ads show pull the pin puzzles?

Because they get people to install. A puzzle that someone is solving badly is easy to understand in three seconds, and it makes you want to do better. UA consultant Matej Lancaric wrote that Hero Wars "popularised the 'pull-the-pin' mechanic as a tool for capturing user interest". Nexters, the studio behind Hero Wars, surveyed 5,212 players about this in 2023. Almost 75% of those in Europe and the US agreed, fully or somewhat, that lots of misleading ads "turned out to be more fascinating than the actual in-app experiences". And when they named the games that had hyped them in the ad and disappointed them afterwards, the top five included "Puzzles" and Hero Wars itself.

Were pull the pin ads banned?

Two of them were, in the UK. On September 30, 2020, the Advertising Standards Authority ruled that Playrix's pin ads for Homescapes and Gardenscapes were misleading, and that the small "Not all images represent actual gameplay" label didn't fix that. I found no ruling anywhere against Hero Wars' pin ads. Its only UK ruling, in November 2025, was about not disclosing loot boxes.

How do you beat Pin & Plunder?

Room one: pull the diagonal pin under the gold. Room two: water first, then lava. Room three: drop the barrel on the skeleton, then open the gate. Room four: water first, then the wizard's chain, and never the bomb. The full table is above.

Can Claude build a game with real physics?

It did here. Claude Opus 5.5 wrote a particle engine for the coins, the lava and the water from scratch, 555 lines, in one go, and then tested it by playing the game through screenshots. What made the difference was the same as in the first build: reference frames to compare against, a way to see its own game, and a clear rule on when to stop.

How much does it cost to make a game like this with AI?

This one cost $39.16 at API prices for 95 minutes of the model working, plus my time playing it and writing one round of notes. The Last War game before it cost $37.76. On a Claude subscription you don't pay per token, so your real cost depends on your plan and on how long the model works.

Can I play it on my phone?

Yes. It runs in any modern browser on a phone or a computer, with no install and no sign-up. Tap a pin to pull it, or drag it by its ring. It uses WebGPU where your browser has it and WebGL2 where it doesn't.

Sources