I built a playable 3D mystery city with Blender and Codex. Here’s how.
Eleven locations, five suspects, ten clues and one cat. How an architect turned product designer built Bellora, a first-person mystery that runs in the browser.
Whip team ·

I wanted to build a city you could walk through, enter, investigate and finish inside a browser. The first render looked like a city. The first playable build exposed every shortcut: windows were flat black rectangles, people floated above the street, building gaps had no collision, interiors felt interchangeable, and materials that looked stable in Blender flickered as soon as the camera moved.
I am an architect turned product designer, and Bellora was my attempt to find out how far I could take a complete 3D experience with an AI coding agent and a browser. Codex wrote scene-building scripts, gameplay systems, tests and export fixes while I directed the environment through briefs, reference images and repeated visual reviews.
Bellora became a first-person mystery with eleven locations, five enterable interiors, five suspects, ten clues, twelve moving residents and one cat. The story is fixed and authored. AI helped build the game, while the player experiences a deterministic mystery with a real solution.

The city needed a case before it needed buildings
I started with the investigation graph. Every clue had a location, character and dependency. The museum log establishes the time of the theft. A café witness connects a blue coat to a wooden case. A shipping receipt points to waterfront locker four. The final accusation only succeeds after the player proves access, timing, the marked crate and the location of the painting.
That graph produced the city plan. The museum, café, hotel, antique shop, atelier, tram stop and waterfront existed because the mystery needed them. Streets connected evidence instead of filling a background, and each interior received different furniture and material rules because each conversation needed a distinct place.
The story state lives in plain JavaScript without runtime AI. This keeps the case testable. I can verify that every clue is reachable, incomplete evidence rejects the accusation, and a clean save can reach the real solution.
A reference render and a playable world have different jobs
I generated a visual target before committing to the final scene. It gave me an elevated museum, green metro canopy, café frontage, tram, hotel, harbour light and reflective cobbles in one frame.
A browser has a different constraint from an offline render. Cycles can spend seconds on one frame. A 60 FPS game has roughly 16.7 milliseconds for the city, characters, lights, atmosphere, post-processing and interface.
I copied relationships rather than pixel detail. Cool sky light and warm practical lamps mattered. Recessed openings mattered. Wetness needed to catch highlights in selected places. Dense vegetation belonged near the player, while distant buildings used simpler silhouettes.
The windows forced the geometry pipeline to grow up
The early café windows were dark planes with shutters beside them. They had no wall depth, jamb, sill, frame thickness or interior layer, so the façade looked like a stage flat.
I rebuilt one window as a measured component with a recessed pocket, stone reveal, projecting sill, separate glass, interior darkness, sash rails, mullions, curtains, shutter louvers, hinges and a handle. Once the café version worked, I reused the same construction logic at lower detail on the museum, hotel, antique shop and secondary buildings.
“Make the windows realistic” produced inconsistent additions. A component contract worked better: opening dimensions, reveal depth, sill projection, frame thickness, glass offset, allowed materials and triangle budget.
The same rule fixed the museum door, columns, tram wheels and planters. Objects began to feel physical when every heavy form had believable contact with the object below it.

Small Blender passes made mistakes recoverable
I drove Blender through MCP and focused Python scripts. Each script handled one concern: city expansion, windows, architectural finishing, materials, foliage, lighting or export. Important boolean operations kept hidden source geometry, and every accepted stage was saved as a new Blender file.
This structure made reviews precise. Instead of asking whether the whole city was “better,” I could ask whether a window pass improved the café without changing navigation, the museum or frame time.
I used CC0 assets from Poly Haven for the surface and streetscape pass. The museum uses White Stucco, the café uses Whitewashed Brick, eastern buildings use Red Brick, and the stairs use Brick Floor 02.
The textures helped only after UV scale was correct. Brick courses needed to align across faces, wood grain needed to follow individual boards, and normal and roughness maps needed non-colour data settings. Roughness became the main realism control: matte plaster, satin shutters, metallic brass and selective wet cobbles.
The browser exposed problems that Blender hid
The most disruptive bug appeared while walking. Façades shimmered and materials seemed to change as the camera moved. The shader was stable. Several old geometry passes were still exported at nearly the same depth, so overlapping windows and walls were fighting over the same pixels.
A still render hid the duplicate geometry. A camera route revealed it immediately. I began checking each GLB for material IDs, UV counts, triangles and batches, then walking the same route before accepting a scene pass.
Ambient occlusion produced a similar lesson. A screen-space version added a second normal render, raised the plaza from roughly 82 draws to around 150 and dropped performance into the 35 to 40 FPS range. I replaced it with a restrained cavity contribution inside the existing façade shader.
The game now has three quality modes: full-resolution 2K textures for captures, an 85 percent balanced mode and a 75 percent performance mode with 1K textures. A built-in 30-second route records average FPS, p95 frame time, draw calls and visible triangles on the current machine.
Feet and sound made the city feel inhabited
The first residents looked like pieces sliding over a board. Better meshes did not solve the problem because the missing signal was contact.
Each human becomes a Three.js SkinnedMesh with an authored walking and conversation clip. Terrain sampling sets vertical position, while stance correction and contact shadows keep feet attached to the paving. The cat uses a smaller rig with walk and idle clips.
Audio follows the same physical rule. The Web Audio system plays an original procedural mystery motif and starts muted until the player enables it. Footsteps come from actual distance travelled rather than held keys, so pressing into a wall stays silent. Doors, dialogue, evidence, the casebook, tram bell and completed case receive separate cues.

The workflow became a repeatable loop
The process that survived was consistent:
- I wrote an acceptance condition for one pass.
- Codex edited one Blender script or runtime system.
- Blender MCP applied the change to a saved scene copy.
- I reviewed one fixed camera.
- The exporter produced browser GLBs.
- I built the app and walked the same route.
- Tests checked navigation, clue reachability, accusation gating, animation, materials, UVs and audio state.
The verification commands stayed short:
node --test scripts/game.test.js scripts/texture-audio.test.js
npm run buildFourteen automated tests now cover the case and its technical systems. I still complete a clean manual playthrough because interaction conflicts are easier to feel than to predict.
The best prompts behaved like production briefs. They named the collection, materials, camera, triangle budget, performance test and expected screenshot. “Hyperrealistic” became useful only after it was translated into physical requirements.
A fixed story graph made the city buildable. A fixed camera made visual comparisons honest. A fixed route made performance measurable. Versioned Blender passes made mistakes recoverable.
Walk through Bellora and solve the case
Tools and references
- OpenAI: How to build games with Astra
- Blender
- Blender MCP
- Three.js
- Poly Haven, CC0 materials, HDRIs and models

We built GTA 6 Fight Club with AI. Here’s how.

I built an immersive 3D world, entirely with Claude