Project
Tetris
Tetris under modern guideline rules: SRS with wall kicks, T-Spins, Back-to-Back, combos, Perfect Clear, and a hold capped at 10 uses.
Objective
A Tetris implementation following the genre's modern guideline, part of the Arcade monorepo. The game engine is DOM-free and runs on a single controller hook that manages the render loop, input, audio, and local persistence, with support for both keyboard and touch controls.
Mechanics
- Super Rotation System Rotation with wall kicks: pieces can shift slightly to fit near walls and other pieces.
- Next queue Preview of the next 5 pieces plus a 7-bag randomizer for fair piece distribution.
- Ghost piece Outline showing where the current piece will land before it drops.
- Tactical hold Stash a piece for later use, capped at 10 uses per game.
- Match history Stores the last 50 games locally along with the best score.
Scoring
- Lines per level Line-clear points are multiplied by the current level, following modern Tetris guideline rules.
- T-Spin Rotating a T-piece into a tight spot right before it locks awards bonus points.
- Back-to-Back Chaining hard clears (Tetris or T-Spin) without a simple clear in between grants a bonus.
- Combo Clearing lines on consecutive piece locks builds up a combo multiplier.
- Perfect Clear Emptying the entire board on a clear awards the maximum possible score.
Level progression
- Line credits Every clear grants credits; harder clears are worth more — a Tetris grants 8 credits instead of 4.
- Configurable starting level The starting level sets how many credits are needed to level up.
- 15 levels Drop speed increases with every level up to 15, which always represents 600 accumulated credits.
Stack
Astro 5React 19TypeScriptVitest 3i18nextAWS CDK v2S3CloudFrontRoute 53