A tribute to Tetris — a fond memory from the childhood of so many of us.
← → move · ↑ rotate · ↓ soft drop · space hard drop · P pause · Enter / R reset · S sfx · M music · − / + level
drag to turn the console · double-click or press 0 to reset the view
tap the console’s own buttons to play · drag anywhere to turn it · double-tap to face it square-on
built by Junaid Qadir
A playable recreation of the Brick Game — the cheap, cream-coloured Tetris handheld that turned up in millions of childhoods through the 1990s, sold under a hundred names and usually badged “9999 in 1”. This one is a single HTML file: the console is real 3D geometry you can pick up and turn, and the game runs on its LCD.
Arrow keys move and rotate the piece, down soft-drops, space hard-drops. P pauses, R or Enter restarts, S toggles sound effects, M toggles the music, and − and + change the level. You can also just press the console’s own buttons with the mouse, or tap them on a phone.
Drag anywhere on the background to turn the console in your hands — it spins freely on both axes and coasts to a stop like a bearing. Double-click, double-tap, or press 0 to bring it back square-on.
Three.js, no build step, no framework, one file. The shell is a single extruded profile: the ridge across the middle and the scoop behind it are exact circular arcs, so the surface has no creases. The LCD is a 2D canvas painted every frame and used as a texture; the keys are lathed profiles with hover and press states; the music and the bleeps are synthesised with the Web Audio API rather than loaded as files.
Junaid Qadir, as a weekend tribute. More of my work at junaidqadir.com.
Tetris is a trademark of The Tetris Company. This is an unaffiliated homage, made for love of the original object.