30 Days of Vibe Coding - Day 4 - Tetris
A classic Tetris game with 3D-styled blocks, the Korobeiniki theme, sound effects, and all the features you'd expect from a real Tetris clone.
*A classic Tetris game with 3D-styled blocks, the Korobeiniki theme, sound effects, and all the features you'd expect from a real Tetris clone.* Day 4. Everyone knows Tetris. That's what makes it a good test. You know exactly what it should feel like, so you notice immediately when something is off.
The Prompt
> "I want to create a web-based Tetris game with 3D-styled blocks, music, and sound effects"
How It Was Built
This one went through Watchfire like the others. The package name in the repo tells the story: watchfire-0001-initialize-nextjs-project-with. It started from a single prompt and Watchfire broke it into tasks covering project setup, game state management, the board renderer, piece definitions with rotation states, the audio system, and the UI components.
The architecture it chose was React with hooks. Three custom hooks handle the core logic: useGameState for the game reducer and tick loop, useGameMusic for the Korobeiniki theme, and useSoundEffects for all the in-game audio. The game state itself is a proper reducer with actions for every move, rotation, hard drop, and pause. Wall kicks, line clearing, level progression, scoring. All the Tetris fundamentals.
What I Got
This one genuinely surprised me.
The blocks have actual depth. Each tetromino type has its own color scheme with a main color, a light highlight for the top-left edges, a dark shadow for the bottom-right edges, and a glow effect. The I-piece is cyan with a soft blue glow. The T-piece is purple. The Z-piece is red. They look like little 3D candy pieces sitting on a dark grid. I asked for "3D-styled blocks" and it delivered something that looks genuinely polished.
It plays the Korobeiniki theme. The actual Tetris melody, generated in real-time using the Web Audio API. No audio files. It creates oscillators and gain nodes on the fly, plays a square-wave melody with a triangle-wave bass line, and loops it seamlessly. The music speeds up as you level up, going from 1.0x at level 0 to 1.5x at level 15. It even remembers your mute preference in localStorage.
The sound effects are surprisingly good. There are 8 distinct sound effects: move click, rotate whoosh, piece landing thud (with noise buffer for impact texture), line clear arpeggio, a special Tetris fanfare for clearing four lines, hard drop swoosh, a sad descending game over arpeggio, and a celebratory level up jingle. All synthesized. No audio files anywhere.
Add a comment: