Back to library
3 lines381 words

Tetris Game

Applies across 0 technologies and 4 prompt categories. Save it to your workspace or launch it with your favorite assistant.

Technologies

No specific tooling required for this prompt.

Categories
Arcade Games
Puzzle Games
Tetris
Web Games

Build a complete Tetris game using HTML5 Canvas, CSS3, and JavaScript. Implement all seven classic Tetromino pieces (I, O, T, S, Z, J, L) with accurate rotation mechanics using the Super Rotation System (SRS). Create a 10-wide by 20-tall playing field with a preview area showing the next 3-5 pieces. Add smooth piece movement with left/right arrow keys, down arrow for soft drop, and space bar for hard drop (instant drop). Implement piece rotation with up arrow key or Z/X keys for counterclockwise/clockwise rotation. Add wall kicks allowing pieces to rotate even when against walls or other pieces. Include a hold piece feature allowing players to swap current piece with a held piece. Implement line clearing with smooth animation for disappearing rows. Add gravity that increases speed as levels progress. Include a level system where clearing 10 lines advances to next level with faster drop speed. Implement a detailed scoring system: single line (100 points × level), double (300 × level), triple (500 × level), Tetris/4-lines (800 × level), plus bonus points for T-spins and combos. Add a combo counter for consecutive line clears. Include a high score system saving top scores with localStorage. Implement a ghost piece showing where the current piece will land. Add smooth animations for piece movements, rotations, and line clears. Include particle effects for line clears, especially Tetrises. Create a next piece queue display with preview of upcoming pieces. Add a hold piece display showing the held piece. Implement game over detection when pieces stack to the top. Include pause functionality with overlay menu. Add sound effects for piece movement, rotation, landing, line clears, level up, and game over, plus background music (all with mute option). Implement different game modes: Marathon (endless), Sprint (40 lines as fast as possible), Ultra (highest score in 2/3 minutes), and Zen (no game over, relaxation mode). Add customizable controls and key mapping. Include detailed statistics: total lines cleared, Tetrises achieved, T-spins, longest game, average pieces per second. Create different visual themes including classic Game Boy, NES, modern, and neon styles. Add background effects and animations. Implement a leaderboard for each game mode. Include accessibility features with customizable colors and high contrast mode. Make the design responsive for all devices with touch controls for mobile (swipe to move/rotate, tap to drop).