3D Tetris — One Shot, Full Game
I wanted to test out DeepSeek-V4-Flash Q2 to see what its capable with a one shot prompt, using a RTX 3090 — 24GB VRAM, 96GB DDR5 RAM. It runs at 13.5 tokens/sec which is quite slow and took around 30 minutes to create the code. I gave it a single prompt describing a 3D Tetris game. What came back was a complete, playable game with SRS rotation, 7-bag randomizer, ghost piece, hold, scoring, and bloom post-processing — all coded in one shot, running locally on one RTX 3090.
The Prompt
Build a playable Tetris game rendered in 3D using Three.js. The game should look visually appealing with 3D blocks, proper lighting, and standard Tetris gameplay mechanics.
That's it. No architecture doc, no tech stack specified beyond Three.js, no wireframes. One paragraph describing what I wanted to play.
The Simulation
Arrow keys or WASD to move, space to hard drop, Z to rotate counter-clockwise. Ghost piece shows where you'll land. Hold C or Shift to swap a piece aside.
What It Does
The game implements 16 distinct features:
- 7 tetromino types — I, O, T, S, Z, J, L with standard Guideline colors
- SRS rotation — Super Rotation System with wall kick tables (JLSTZ and I-piece)
- 7-bag randomizer — Fair piece distribution, no long droughts
- Ghost piece — Translucent preview of where the piece will land
- Hold piece — Swap current piece aside for later use
- Next queue — Preview of 5 upcoming pieces
- Line clearing — Full rows removed, blocks above fall, scoring by count
- Scoring — Soft drop (+1/cell), hard drop (+2/cell), line clears [100/300/500/800] × level
- Level progression — Level up every 10 lines, official SRS speed curve (1000ms → 17ms)
- DAS (Delayed Auto Shift) — 170ms initial delay, 50ms repeat for smooth holding
- Lock delay — 500ms grace period with anti-stall reset cap (15 resets)
- 3D rendering — Rounded blocks via RoundedBoxGeometry with clearcoat materials, three-point lighting, soft shadows
- Bloom post-processing — Subtle glow on blocks and particles via UnrealBloomPass
- Line-clear effects — Particle bursts, bloom flash, lock flash, text feedback ("Single"/"Double"/"Triple"/"Tetris!")
- Camera drift — Subtle sinusoidal movement for cinematic feel
- Game states — Start menu, pause (P key), game over with restart
The Numbers
Built with Three.js r184 loaded from CDN. Single HTML file. No build step, no dependencies to install. Runs in any modern browser.
How It Was Built
This wasn't a single model call. The PI Agent Harness ran a 4-agent pipeline — each agent handling one job, coordinating through structured prompts and a shared task board. All running locally on a single RTX 3090.
The Pipeline
What Each Agent Did
- Researcher — Researched Three.js capabilities, SRS mechanics, wall kick tables, collision patterns, lighting, post-processing (32KB research report with source citations)
- Reviewer — Validated the research, confirmed the approach was sound before coding began
- DeepSeek-V4-Flash (Coder) — Wrote the complete 978-line implementation in ONE SHOT: game logic, rendering, input, effects, UI. The coding was done in a single call by DeepSeek-V4-Flash Q2 from Unsloth, running locally on one RTX 3090.
- Reviewer — Final audit: 12/12 criteria verified, verdict: complete
Why It Matters
This is what a local AI agent team can ship. No API keys, no cloud credits, no vendor lock-in. One prompt describing a game I wanted to play — and a pipeline of specialised agents that researched, designed, built, and reviewed the whole thing on a single consumer GPU.
The model that drove the coding was DeepSeek-V4-Flash — a 284B-parameter Mixture-of-Experts model with only 13B activated parameters per token, running quantised (Q2 GGUF) locally. It has a 1-million-token context window and an MIT licence.
The model is available on HuggingFace and the GGUF variants at HuggingFace GGUF.
The harness that made this possible is documented in the PI Agent Harness bundle — ebook, video series, and all agent definitions.