Skip to content

Sonseldeep/lspp-tetris

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

12 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽฎ Enhanced Tetris Game with Matrix Rain Effect

Tetris Game Screenshot JavaScript HTML5 CSS3 Mobile

๐ŸŒŸ A modern, feature-rich Tetris game with dramatic sound effects, visual celebrations, and Matrix-style background rain! ๐ŸŒŸ

๐ŸŽฎ PLAY NOW | ๐Ÿ“‚ Clone Repository


๐Ÿš€ Live Demo

๐ŸŽฏ Play the game now: https://sonseldeep.github.io/lspp-tetris/


โœจ Features Overview

๐ŸŽต Intensive Sound System

  • Web Audio API generated sound effects for every action
  • Dramatic line clear sounds with ascending melodies
  • Epic Tetris celebration with bass and harmony
  • Level up fanfares and game over sequences
  • Movement feedback sounds for rotation, drops, and piece placement

๐ŸŽ† Visual Effects & Celebrations

  • Particle explosion system for line clears and Tetris achievements
  • Screen shake effects for dramatic impact
  • Sparkling level-up animations across the entire screen
  • Dynamic color particles with realistic physics (gravity, fade)
  • Visual synchronization with sound effects

๐ŸŽฏ Advanced Gameplay Features

  • Next piece preview with 3D-style rendering
  • Hold piece functionality (press C to hold/swap pieces)
  • Ghost piece projection showing drop location
  • Official Tetris scoring system with proper multipliers
  • Progressive difficulty with faster drop speeds per level

๐Ÿ† Competitive Elements

  • High score system with persistent localStorage
  • Top 10 leaderboard with automatic ranking
  • Achievement notifications for new high scores
  • Difficulty multipliers affecting final scores

๐ŸŽฎ Difficulty System

  • ๐ŸŸข Easy Mode: Slower pace, 0.8x score multiplier
  • ๐Ÿ”ต Normal Mode: Standard gameplay, 1.0x multiplier
  • ๐ŸŸ  Hard Mode: Faster drops, 1.3x score multiplier
  • ๐Ÿ”ด Extreme Mode: Ultra-fast, 1.6x score multiplier
  • Live difficulty switching during gameplay

๐Ÿธ Animated Frog Companion

  • Mood-based animations reacting to your performance
  • Score-triggered celebrations with special animations
  • Real-time emotional feedback based on game state
  • Tetris achievement reactions with explosive celebrations

๐ŸŒง๏ธ Matrix Rain Background

  • Multi-cultural character set: Nepali, Korean, Japanese, Greek
  • Scientific formulas: Physics, chemistry, mathematics, programming
  • Dynamic color system with 15+ vibrant colors
  • Responsive performance optimized for all screen sizes
  • Organic movement patterns with variable speeds and trails

๐Ÿ“ฑ Mobile & Touch Support

  • Intuitive touch controls: Swipe to move/rotate, tap to drop
  • Responsive design for phones, tablets, and desktops
  • Optimized UI scaling for different screen sizes
  • Touch-friendly difficulty selection and game controls

๐ŸŽจ Modern UI Design

  • Matrix-themed styling with green glow effects
  • Glassmorphism design with backdrop blur effects
  • Smooth animations and transitions throughout
  • Interactive welcome screen with feature highlights
  • Professional game over screen with detailed statistics

๐Ÿ”ง Quick Start

๐ŸŒ Option 1: Play Online (Easiest)

Simply visit: https://sonseldeep.github.io/lspp-tetris/

๐Ÿ’พ Option 2: Clone & Run Locally

# Clone the repository
git clone https://github.com/Sonseldeep/lspp-tetris.git

# Navigate to project directory
cd lspp-tetris

# Open with any method below:

# Method 1: Direct file opening
# Simply open index.html in your browser

# Method 2: Local server (recommended)
# Python 3
python3 -m http.server 8000

# Python 2
python -m SimpleHTTPServer 8000

# Node.js (if you have it)
npx serve .

# PHP (if you have it)
php -S localhost:8000

Then open your browser and go to http://localhost:8000

๐Ÿ“ฆ No Dependencies Required!

  • โœ… Pure vanilla JavaScript (ES6+)
  • โœ… Standard HTML5 Canvas
  • โœ… CSS3 with modern features
  • โœ… Web Audio API for sounds
  • โœ… Works in all modern browsers

๐ŸŽฎ How to Play

๐Ÿš€ Getting Started

  1. Launch the game by clicking "๐ŸŽฎ Start Game" or pressing SPACE
  2. Choose difficulty from the left panel (๐ŸŸข Easy โ†’ ๐Ÿ”ด Extreme)
  3. Use controls to move and rotate Tetris pieces
  4. Clear lines by filling complete horizontal rows
  5. Achieve Tetris by clearing 4 lines simultaneously for massive points!

โŒจ๏ธ Desktop Controls

Key Action
โ† โ†’ Move piece left/right
โ†“ Soft drop (faster descent)
โ†‘ Rotate piece clockwise
SPACE Hard drop (instant drop)
C Hold/swap current piece
P Pause/unpause game
R Restart game

๐Ÿ“ฑ Mobile Touch Controls

Gesture Action
Swipe Left/Right Move piece horizontally
Swipe Down Soft drop
Swipe Up Hard drop (instant)
Tap Rotate piece
UI Buttons Difficulty, hold, restart

๐ŸŽฏ Scoring System (Official Tetris Rules)

  • Single Line: 40 ร— (level + 1) ร— difficulty multiplier
  • Double Lines: 100 ร— (level + 1) ร— difficulty multiplier
  • Triple Lines: 300 ร— (level + 1) ร— difficulty multiplier
  • TETRIS (4 lines): 1200 ร— (level + 1) ร— difficulty multiplier
  • Soft Drop: +1 point per cell dropped
  • Hard Drop: +2 points per cell dropped

๐Ÿ† Difficulty Bonuses

  • ๐ŸŸข Easy: 0.8ร— score (great for learning)
  • ๐Ÿ”ต Normal: 1.0ร— score (standard challenge)
  • ๐ŸŸ  Hard: 1.3ร— score (increased difficulty)
  • ๐Ÿ”ด Extreme: 1.6ร— score (ultimate challenge)

๐ŸŽŠ Special Features

  • Hold System: Store a piece for later use (C key)
  • Ghost Piece: See where your piece will land
  • Level Progression: Every 10 lines = next level
  • Speed Increase: Pieces drop faster as you level up
  • Visual Celebrations: Particle effects for achievements
  • Sound Feedback: Audio cues for every action

๐Ÿ› ๏ธ Technical Details

๐Ÿ“‹ System Requirements

  • Modern web browser (Chrome 60+, Firefox 55+, Safari 12+, Edge 79+)
  • JavaScript enabled
  • HTML5 Canvas support
  • Web Audio API (for sound effects)
  • localStorage (for high scores)

๐Ÿ—๏ธ Architecture

lspp-tetris/
โ”œโ”€โ”€ index.html          # Main game interface & styling
โ”œโ”€โ”€ tetris.js           # Game logic & systems
โ”œโ”€โ”€ README.md           # This documentation
โ””โ”€โ”€ [GitHub Pages]      # Automatic deployment

๐ŸŽต Audio System

  • SoundManager Class: Procedural sound generation
  • Web Audio API: High-quality, browser-native audio
  • Dynamic Tones: Frequency-based sound effects
  • No External Files: All sounds generated in real-time

๐ŸŽจ Visual Effects Engine

  • VisualEffects Class: Particle system management
  • Canvas Rendering: Hardware-accelerated graphics
  • Physics Simulation: Gravity, momentum, fade effects
  • Performance Optimized: 60fps particle animations

๐Ÿ’พ Data Persistence

  • High Scores: Stored in browser localStorage
  • Settings: Difficulty preferences saved locally
  • Cross-Session: Data persists between browser sessions

๐ŸŒŸ Advanced Features

๐Ÿ”Š Sound Effects Breakdown

  • Movement: Subtle sine wave tones
  • Rotation: Square wave confirmation
  • Landing: Triangle wave impact
  • Line Clear: Ascending melodic sequence
  • Tetris: Epic multi-layered celebration
  • Level Up: Triumphant musical progression
  • Game Over: Dramatic descending sequence

๐ŸŽ† Visual Effects Details

  • Line Clear: 20 particles per cleared line
  • Tetris Celebration: 100+ colorful explosion particles
  • Level Up: 30 sparkling particles across screen
  • Screen Shake: Intensity varies with achievement level
  • Particle Physics: Realistic gravity and momentum

๐Ÿธ Frog Companion Moods

  • ๐Ÿ˜ด Neutral: Starting state (0 points)
  • ๐Ÿค” Thinking: First points scored
  • ๐Ÿ˜Š Content: Moderate progress (500+ points)
  • ๐Ÿ˜„ Happy: Good performance (2000+ points)
  • ๐Ÿ˜Ž Cool: Expert level (5000+ points)
  • ๐Ÿคฉ Excited: Master level (10000+ points)
  • ๐ŸŽ‰ Celebration: Special Tetris achievements

๐ŸŽฏ Performance Tips

๐Ÿ† Scoring Strategies

  1. Focus on Tetris: 4-line clears give massive point bonuses
  2. Use Hold Wisely: Save I-pieces for Tetris setups
  3. Higher Difficulty: More challenging but better score multipliers
  4. Level Progression: Higher levels = higher point multipliers
  5. Avoid Gaps: Keep your stack clean and organized

๐Ÿ“ฑ Mobile Optimization

  • Touch Sensitivity: Adjust gesture speed to your preference
  • Screen Orientation: Landscape mode recommended for tablets
  • Performance: Game optimized for 60fps on modern mobile devices

๐Ÿค Contributing

๐Ÿ› Bug Reports

Found a bug? Please open an issue with:

  • Browser and version
  • Device type (desktop/mobile)
  • Steps to reproduce
  • Expected vs actual behavior

๐Ÿ’ก Feature Suggestions

Have ideas for improvements? We'd love to hear them!

๐Ÿ”ง Development

Want to contribute code?

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test thoroughly
  5. Submit a pull request

๐Ÿ“œ License

This project is open source and available under the MIT License.


๐ŸŽ‰ Credits & Acknowledgments

๐Ÿ‘จโ€๐Ÿ’ป Developer

  • Sonseldeep - Main developer and designer
  • GitHub: @Sonseldeep

๐ŸŽฎ Game Design

  • Based on the classic Tetris game concept
  • Enhanced with modern web technologies
  • Inspired by Matrix visual aesthetics

๐Ÿ› ๏ธ Technologies Used

  • Vanilla JavaScript for game logic
  • HTML5 Canvas for rendering
  • CSS3 for styling and animations
  • Web Audio API for sound generation
  • GitHub Pages for hosting

๐Ÿ“ž Support

๐Ÿ†˜ Need Help?

๐ŸŒ Links


๐ŸŽฎ Enjoy the most enhanced Tetris experience on the web! ๐ŸŽฎ

Built with โค๏ธ by Sonseldeep

โญ Star this repo if you enjoy the game! โญ

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 67.5%
  • HTML 32.5%