advertisement1
Falling blocks

JavaScript Tetris

Jake Gordon's compact canvas implementation demonstrates how much arcade rhythm can fit in a small, readable codebase. This pinned MIT-licensed version is hosted locally with a responsive embedded viewport.

Time
3–15 min
Input
Keyboard
License
MIT
advertisement2
Ready when you are
Locally hosted

JavaScript Tetris

Controls and source details are below. The game will only load after you choose to start.

No autoplay and no account—the game runs locally in your browser.

01

How the game works

Rotate falling pieces, clear complete rows, and manage the rising stack.

02

Your goal

Clear rows for as long as possible without letting the stack reach the top.

03

How to play

  1. Press Space to start or drop a piece.
  2. Move and rotate each piece while it falls.
  3. Complete horizontal rows to clear space and increase your score.
04

Controls

Desktop

Left/Right move, Up rotates, Down soft-drops, Space hard-drops, Esc quits.

Mobile

The pinned upstream version is keyboard-only; use a physical keyboard.

05

Rules & scoring

  • A complete row disappears and makes room above it.
  • Pieces lock when they land on the floor or another piece.
  • Falling speed rises as more rows are cleared.

Completed rows award points, with larger clears worth more. The score is session-only.

06

Useful tactics

  • Keep the surface flat enough to accept several piece shapes.
  • Leave a single deep channel only when saving a long piece for a four-row clear.
  • Look at the next-piece preview before committing a rotation.
07

Questions

Does this need a keyboard?

Yes. This upstream implementation does not provide touch buttons.

Who wrote it?

Jake Gordon and contributors released the project under the MIT License.

Does it save a score?

No. The score resets when the play frame reloads.

advertisement3