This is a Tetris game written in JavaScript designed for modern desktop web browsers. The game generally follows the official Tetris guidelines implementing features from different Tetris games.
The aim of the game is to score as many points as possible by arranging falling tetrominoes. Tetrominoes are made up of four connected squares, arranged in various shapes.
The player must rotate and move the tetrominoes so that they fit into rows at the bottom of the game field (the stack). When a row is filled, it disappears, and the player scores points. As the player clears more rows the level increases, and so does the speed of the game. The game ends when the blocks reach the top of the screen.
- Simple user interface.
- Control tetrominoes using keyboard input.
- Score and level-up functionality.
- Background music and sound effects for game events.
- A settings panel that allows the user to change game behavior.
- A help panel listing game controls.
- HTML
- CSS
- JavaScript
Clone or download the repository.
Open the index.html file in a web browser.
Alternatively, a live demo can be found here
Click on "Start" to play the game. Try to complete as many rows as possible to score points and level up. Basic controls:
- Press the left and right arrow keys to move the tetrominoes sideways.
- Press the up arrow or Z key to rotate the tetrominoes.
- Press the down arrow key to make the tetrominoes fall faster.
- Press space to drop the tetrominoes to the bottom immediately.
- Press the C key to hold a tetromino.
- Implement a scoreboard
- Optimize game layout for different screen sizes
- Allow a 1/2 second lock before a tetromino is locked in the stack
- Optimize canvas resizing to keep a sharp look without using excessive resources
Made by Jose M. Espinola-Lopez at Qwasar SV -- Software Engineering School <img alt='Qwasar SV -- Software Engineering School's Logo' src='https://storage.googleapis.com/qwasar-public/qwasar-logo_50x50.png' width='20px'>