Tiny Arcade five small games
  1. Tiny Arcade
  2. Blocks

Blocks

Seven shapes, one narrow well. Rotate, drop, clear rows, and try to stay ahead of a stack that only gets faster.

Your browser does not support the canvas element. The game cannot run, but the rules are described below.
Score 0 Rows 0 Level 1 Best 0

← → move · Z rotate · ↓ drop faster · Space start

The rules

Seven piece types fall one at a time into a well ten columns wide and twenty rows tall. Each piece is made of four blocks. You can shift a piece left and right and rotate it, but you cannot stop it: it descends continuously, faster at higher levels, until it lands on the floor or on the stack.

When a row becomes completely filled it clears, everything above it drops one row, and you score. When four rows go at once the reward is disproportionately large, which is the whole strategic tension of the game: build a flat, well-ordered stack and clear high, rather than chasing single rows and burying yourself in holes.

Controls

← → or A DMove the piece sideways (holding repeats)
ZRotate clockwise, with wall kicks
XRotate anticlockwise
↓Drop faster, one point per cell
SpaceStart, or restart after a game over

Reading the board

The hollow outline under the falling piece is a ghost piece. It shows exactly where the piece will come to rest without any sideways input, which makes it possible to judge a drop precisely instead of guessing. The ghost is drawn as an outline rather than a filled shape so it never gets mistaken for the piece in play.

Notes on the implementation

Each of the seven shapes is stored as four rotation states, so rotation never needs matrix maths at runtime and never produces a malformed piece. Rotating against a wall would normally fail, so rotation tries a short list of horizontal kick offsets before giving up — that is what lets you turn a piece while flush against the edge, an interaction that looks trivial and is not.

Pieces are dealt from a seven-bag: one of each shape is shuffled and dealt, then the bag is refilled. Every piece appears exactly once per seven draws, so a run cannot be destroyed by a twenty-piece drought of the only shape that fits the gap you left. Horizontal movement uses a short repeat delay, so a tap is one cell and a held key slides.