- Table of Contents
- Features
- Controls
- Technologies Used
- Installation and Setup
- Deployment
- Demo
- Contribute
- License
- Classic Tetris gameplay mechanics.
- Responsive design – play on both mobile and desktop.
- Leaderboard to track high scores.
- Smooth animations and sound effects.
- Dark mode for night-time playing.
- Arrow Keys:
- Left Arrow: Move the tetromino left.
- Right Arrow: Move the tetromino right.
- Down Arrow: Soft drop (speeds up the tetromino's descent).
- Up Arrow: Rotate the tetromino clockwise.
- JavaScript – The core logic of the game.
- Vite – A build tool that offers a faster and leaner development experience for frontend projects.
- Vercel – For continuous deployment and hosting of the app.
- Clone the Repository
git clone https://github.com/wrujel/tetris-javascript.git
cd tetris-javascript
- Install Dependencies
Make sure you have Node.js and npm installed. Then:
npm install
- Run Locally
npm run dev
Visit http://localhost:3000
in your browser to play the game.
This project is deployed on Vercel. If you wish to deploy your own version:
- Fork and clone the repository.
- Set up Vercel and link your GitHub account.
- Create a new project on Vercel and link it to your Tetris app repository.
- Vercel will automatically build and deploy the app. You can then access your live site from the provided URL.
Experience the game here:
Want to contribute? Great! Fork the repo, create a new branch, make your changes and submit a pull request.
This project is open-source and available under the MIT License. Feel free to use it as a reference for your own projects, or contribute to make it better!
Made with ❤️ by wrujel.