r/threejs • • 4h ago

Tutorial I had Claude build a 3D game where you wreck a paper-model office, then voice the staff. Prompts, pitfalls and the bill

3 Upvotes

TL;DR: I asked Claude for a first-person venting game: break into an office while everyone's working and destroy all of it against the clock. I picked the look from four style frames it rendered in three.js, it built the game (160 breakable things, five tools, ten paper-doll colleagues), and after the test link I asked for real sound and voices. It went live with 260 voiced lines and the staff bickering among themselves. $237.29 in total, priced at Anthropic's API list prices. Free to play in the browser, link at the bottom.

The style frame I picked the look from, and the game as it went live.

What I actually asked

One message, roughly:

I need a 3D game called Destroy the Office. You break into a mid-sized office while your colleagues and bosses are working and wreck the whole place with all sorts of tools. It has to feel satisfying, with a speed score, a verdict at the end and a results picture. The NPCs react. Think up fun bits and player pain points and put them in. Show me an art style first. Build the whole thing on Fable 5.2 xhigh.

What I asked

It started planning a picker page. I was short on time, so:

Just give me the art directions, I'll decide from those. Otherwise we'll run out of time: Fable's about to refresh.

Four came back as text: blue-and-white porcelain (its recommendation), comic ink, a paper model, and vinyl toys. Text wasn't going to settle it, so:

Give me style frames.

25 minutes later I had four frames of the same moment, a bat going into a monitor, each rendered live in three.js rather than painted.

Four looks, the same moment, each rendered live in three.js. I picked 3.

Each option came with how things would break and what the results picture would be:

Blue-and-white porcelain (its pick): porcelain figurines for staff, gold kintsugi cracks on the first hit, shards on the second, your office mended with gold at the end. "The most satisfying to smash."

Option 1, Claude's recommendation: blue-and-white porcelain.

Comic ink: halftone shading, impact frames, flying sound words, a comic cover at the end. "Quickest to build, but common."

Option 2: comic ink.

Paper model: cardboard desks, paper-doll staff, tearing and red stamps, a stamped exit interview at the end. "Best fit for the theme, but the hits feel softer."

Option 3, my pick: the paper-model office.

Vinyl toys: glossy blind-box figures popping apart at the seams, a collector's card at the end. "The cutest, but more toy than venting."

Option 4: vinyl toys.

I replied "3, then", and paper it was: corrugated cardboard desks, sticky notes, marker-drawn screens and paper-doll staff, all on a green cutting mat.

What it added

I'd asked it to think up fun bits and pain points. Here's what it put in:

  • The desk phone rings. Smash it while it's ringing and the damages are four times higher.
  • Smash the punch clock: 5 seconds off your time. Smash the coffee machine: you swing faster.
  • Go 3.5 seconds without hitting anything and an arrow points you at the next thing.
  • Late in the run your colleagues pick things up and join in.
  • The results card is an exit interview: time on site, a job title ("Hostile Takeover"), damages, three remarks written from how you played ("Printer gone in 15 seconds. It had it coming.") and a sticky note with one thing to try next time.
Fun bits and pain points it added when asked.
The results card: an exit interview written from how you played.

How it got built

  • While I was choosing, it wrote everything that doesn't depend on the look: walking, five tools (bat, sledgehammer, 9-iron, fire extinguisher, stapler), debris, the staff's behaviour, the clock and the score.
  • The room is plain data, the look is a "skin", and the rules are the engine. A corner shop next would be a new data file, not a new game.
  • Then the weekly usage limit ran out mid-build and everything stopped for three hours.
  • After that, five agents built the paper look in parallel: the room and lighting, the destruction effects, 50 kinds of furniture, the machines and small things, and ten paper dolls.
The shipped game.

Things that bit

  1. Draw calls. 1,434 at the start of a run. Batching all the furniture nobody had hit yet brought it to 377.
  2. Obfuscation. We obfuscate the code that ships. On the heavy settings the game's own code went from about 1 ms a frame to about 10. It's on the light settings now.
  3. Phones. An automatic check at eight window sizes found the sound and pause buttons covering the fifth tool, a results button falling off a sideways phone, and the results picture shrunk to thumbnail size on an upright one.
  4. Late sound. On a slow machine the recordings arrived after the door had already been kicked in, so you missed the kick and the boss's first line. The first sounds now load as soon as your pointer moves over the game.
Four things that bit.

The sound round

After the test link my one note was:

Use ElevenLabs for all the sound. Add some dialogue too, NPC voices.

My one note after the test link, and what came back.

What came back:

  • 22 sound effects (38 takes), lobby hold music for the title card and a 124 BPM groove for the run that opens up as the office comes down.
  • 260 voiced lines: ten colleagues with their own voices, and an announcer calling the combos ("Synergy!", "Paradigm shift!", "Hostile takeover!") and your job title at the end.
  • 17 short exchanges between colleagues, early and late in the run. My favourite: "Are we insured for this?" "There's a form." "Then fill it in!" "It was in the printer."
  • Every line was transcribed back and compared with the script: 255 of 260 exact, the rest only spelling a number or a noise differently.
  • Speech bubbles are timed to the recordings, and the voices duck the music.
Overheard while you work: 17 recorded exchanges.

That round was $16.19 in tokens plus 6,638 ElevenLabs credits, about 5% of a month on my plan.

What it cost

Token usage priced at Anthropic's public API list prices:

Token usage priced at Anthropic's API list prices.

Claude Fable 5.2 built the game; Claude Opus 5.5 did the sound round. The four style frames cost more than the whole sound round. Choosing from pictures took me one word.

Not done yet

  • No real graphics card has drawn it. Every check ran on software rendering at about one frame a second, so I don't know the frame rate on a laptop or a phone yet.
  • The gamepad path is written but untested, and so is the feel with a real mouse.
  • The par times for the grades are estimates. The autopilot finishes in about 40 seconds.
  • One room so far, and no VR.

What I'd tell anyone trying this

  • Ask for pictures before code. Four frames of the same moment made the choice obvious.
  • Ask it to think up fun bits and pain points; you get things you wouldn't have listed.
  • After the first playable version, ask for one concrete change at a time.
  • Ask what every step costs.

Play it in the browser, free, no sign-up: https://skillbay.dev/skills/destroy-the-office-3d?utm_source=reddit&utm_medium=social&utm_campaign=destroy-the-office-build-log

Free to play in the browser.

It's one of the skills on my site, skillbay.dev. Happy to answer questions about any of it.


r/threejs • • 7h ago

Demo Open Source 400hz sim racer running in web gpu

Post image
7 Upvotes

The pre demo version of probably the most advanced sim racer running in web gpu is available in itch.io with the name Open Grid or through GitHub or directly in: open-grid.racing

I would really appreciate it if you can give me some feedback on features and bugs the game has and also your opinion on if you would like to see this game getting finalized. You can also contribute to the game directly through my GitHub: https://github.com/Konstantinos-Chatzistavrou/Open-Grid

Don't forget to star the repo to stay updated with any updates because this project is only 5 weeks old.

Don't be too harsh 😅, thank you!


r/threejs • • 11h ago

Criei um fan game do Dragon Ball Z para jogar direto no navegador! 🐉🔥

0 Upvotes

Fala galera! Sou desenvolvedor solo e acabei de lançar o Caminho da Serpente Z, um fan game inspirado em Dragon Ball Z onde o objetivo é encarar a famosa e interminável estrada até o planeta do Sr. Kaioh.

Havia criado o jogo em uma versão antiga então ontem resolvi fazer uma atualização criar movimentos na pista

Sempre fui fan de Dragonballz então quis deixar minha homenagem ao jogo lembrando que não cobro nada e totalmente gratuito para jogar Toei animation por favor não me processe não tenho nada a perder vai perder seu tempo.


r/threejs • • 16h ago

I built my personal site as one halftone planet. Single camera path, custom GLSL, no framework

5 Upvotes

Every chapter of the site is a part of the planet: the surface, a shield that gets attacked, a cutaway core, the moon, the sun and the night side. Scrolling just moves one camera around it.

three.js r160 for the scene, the rest is hand-written shaders and plain JS. Would love feedback on performance, especially on phones.

Live: https://kohli.world Source: https://github.com/Assassin-1234/kohli-world