🎮 Play Tetris

The game runs in your browser via WebAssembly, served straight from GitHub Pages. No build, no install, no account. Just blocks.

How to play

You control a stream of tetrominos — seven shapes made of four blocks each — that fall from the top of a 10-wide, 20-tall well. Slide and rotate them as they fall, slot them together to fill horizontal lines, and the lines vanish. The stack grows with every misfit. When it reaches the ceiling: game over.

Controls

KeyAction
Move tetromino left
Move tetromino right
Soft drop (faster fall)
Rotate tetromino
SpacePause / resume
PPause / resume
EscPause / open menu

On mobile, the game canvas renders on-screen Rotate, Start / Pause, and Soft Drop buttons.

Scoring

Level increases every 10 lines. Drop speed increases with each level.

Tips

Build it yourself

git clone https://github.com/calebe94/tetris
cd tetris
git submodule update --init --recursive
make all
./bin/tetris

Desktop: needs g++, SDL2, SDL2_ttf, SDL2_mixer, SDL2_image. Web build: needs Emscripten SDK → make web.