openblocks is a Tetris reimplementation with classic, familiar controls, rules, layout, and visuals: the palette, levels, scoring, gravity, and the feel of the controls all match the original. It should feel familiar to anyone who has played it. This implementation is bare-bones but complete, and runs natively on Windows, macOS, Linux, Android, and iOS, plus directly in the browser via WebAssembly.

I built this for myself, mostly on weekends. Rebuilding a classic from nothing is the best way I know to understand why it felt good in the first place, and this one gets the feel right. That was the whole goal.
The game logic is one platform-independent C file, shared unchanged everywhere. Everything else — drawing, input, audio — goes through raylib on every platform except iOS, which has its own native backend written in Metal with no raylib at all.
On the desktop builds, openblocks can record your gameplay directly to an MP4 — toggle it from the menu before you start. (Recording is desktop-only; the mobile and web builds leave it out.)
Rendering modes
There are two layouts, and the platform decides which you get.
- Landscape — the desktop layout: a fixed 640×480 frame, scaled up to fit the window, with three columns — piece statistics on the left, the playfield in the middle, and lines / score / level / next on the right.
- Portrait — the phone layout: it adapts to the screen size, with a title bar on top, a score / lines / level / next band beneath it, the playfield filling the middle, and a row of on-screen buttons along the bottom.
Desktop, Android, and iOS each use one layout. The browser build is compiled with both and picks at runtime from the device: a phone or tablet gets portrait, a desktop browser gets landscape. A menu toggle lets you switch either way.
Controls
The control surface follows the layout: keyboard for landscape, touch for portrait.
Keyboard — desktop, and desktop browsers:
| Key | Action |
|---|---|
| Left / Right, A / D | Move |
| Down, S | Soft drop |
| Space, Up, W, X, Z | Rotate |
| Enter | Pause / resume |
| Escape | Return to menu |
| Alt+Enter | Toggle fullscreen |
Touch — Android, iOS, and mobile browsers:
| Control | Action |
|---|---|
| ◀ / ▶ buttons | Move (hold to auto-repeat) |
| Rotate button, or tap the playfield | Rotate |
| Drop button | Tap for a hard drop, hold for a soft drop |
| ☰ button (top-right) | Back to the menu |
| Swipe up / down, tap | Menu navigation and select |
In the browser (WebAssembly)
The same C is compiled to WebAssembly with Emscripten, so the browser version is the actual game, not a separate port — same rules, same feel, same code. It runs both layouts and detects your device: keyboard and the landscape layout on a desktop browser, touch and the portrait layout on a phone or tablet, with a menu toggle to override. You can play it here — nothing to install.
Download
Prebuilt downloads for every platform are linked below: Linux, macOS, and Windows archives, the Android APK, the iOS .ipa, and a WebAssembly bundle. Or just play it in your browser. Source is on GitHub; see the README for full project information.
The iOS build is an unsigned .ipa (install by sideloading — it isn’t on the App Store). Everything else installs or runs directly.