Tetris

Classic Tetris โ€” guideline-compliant, T-spin detection, replay system, vs AI

Windows / Linux / macOS / Web Rust (macroquad) / TypeScript Games

Tetris is a faithful, guideline-compliant implementation with modern features: T-spins, 7-bag randomizer, replay analysis, and AI opponent.

Features

  • Guideline Compliant โ€” SRS rotation, 7-bag randomizer, hold, ghost piece, 3+ next
  • T-Spin Detection โ€” Mini, regular, double, triple with bonus scoring
  • Replay System โ€” Full input recording; frame-perfect playback; export .tetris-replay
  • AI Opponent โ€” Configurable difficulty (beginner to TGM master); learns from your play
  • Multiplayer โ€” Local VS, LAN, online (WebRTC); spectator mode
  • Web Version โ€” Play instantly at tetris.neohiro.dev
  • Statistics โ€” APM, PPS, VS%, survival time, T-spin rate, B2B chains

Play Now

Web: tetris.neohiro.dev (WASM)

Desktop:

  • Windows: Tetris-Setup.exe from Releases
  • Linux: Flatpak / AppImage / cargo install tetris-neo
  • macOS: brew install --cask tetris-neo

Scoring (Guideline)

Action Points
Single 100 ร— level
Double 300 ร— level
Triple 500 ร— level
Tetris 800 ร— level
T-Spin Mini 100 ร— level
T-Spin 400 ร— level
T-Spin Double 1200 ร— level
T-Spin Triple 1600 ร— level
Back-to-Back ร—1.5
Perfect Clear 2000 ร— level (single), 3600 (Tetris)

Modes

Mode Description
Marathon 150 lines; variable goal
Sprint 40 lines; fastest time
Ultra 3 minutes; max score
Master TGM-style; invisible, 20G
VS AI 1v1 against configurable bot
VS Human LAN / WebRTC / local

Controls

Action Keyboard Gamepad
Move โ†/โ†’ D-Pad / Left Stick
Soft Drop โ†“ Down / A
Hard Drop Space / โ†‘ Up / Y
Rotate CW Z / X LB / RB
Rotate CCW Shift / C LT / RT
180ยฐ A Back / Select
Hold C / Ctrl Left Stick Press

Replay Format

.tetris-replay is JSON with:

{
  "version": 1,
  "seed": 1234567890,
  "mode": "marathon",
  "inputs": [
    {"frame": 0, "input": "right"},
    {"frame": 3, "input": "rotate_cw"}
  ],
  "stats": {"apm": 62.4, "pps": 1.8, "tspin_rate": 0.23}
}

Requirements

  • Desktop: OpenGL 3.3+; 512 MB RAM
  • Web: WebGL 2; 1 GB RAM
  • Binary size: ~3 MB (compressed)