https://github.com/invzfnc/tetris-in-browser
A classic Tetris game built using HTML, CSS, and vanilla Javascript
https://github.com/invzfnc/tetris-in-browser
game html5-canvas javascript javascript-vanilla tetris
Last synced: 5 months ago
JSON representation
A classic Tetris game built using HTML, CSS, and vanilla Javascript
- Host: GitHub
- URL: https://github.com/invzfnc/tetris-in-browser
- Owner: invzfnc
- License: mit
- Created: 2024-08-16T09:08:04.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-29T15:29:10.000Z (over 1 year ago)
- Last Synced: 2024-12-24T15:39:09.376Z (over 1 year ago)
- Topics: game, html5-canvas, javascript, javascript-vanilla, tetris
- Language: JavaScript
- Homepage: https://invzfnc.github.io/tetris-in-browser/
- Size: 5.29 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Tetris in Browser
A classic Tetris game built using HTML, CSS, and vanilla Javascript.
## Features
- **Standard tetrominos**: Includes all 7 pieces (`I`, `J`, `L`, `O`, `S`, `T`, `Z`) with the standard color scheme.
- **Levelling system**: Clear five lines to level up, with the game's speed increasing at each level.
- **Preview pane**: View the next 3 upcoming tetrominos.
- **Ghost piece**: A shadow displaying where the current piece will land.
- **Hold piece**: Temporarily store a piece for later use.
- **Timer**: Shows time elapsed.
## Usage
A running instance is available through this [link](https://invzfnc.github.io/tetris-in-browser/index.html).
## Preview

## Controls
This game supports keyboard input only. Use the following keys to control the tetrominos:
|Key|Function|
|---|---|
|Arrow up|Rotate|
|Arrow down|Soft drop|
|Arrow left|Move left|
|Arrow right|Move right|
|Space|Hard drop|
|C or Shift|Hold|
|Esc|Pause game|
## License
This software is licensed under the [MIT License](https://github.com/invzfnc/tetris-in-browser/blob/main/LICENSE) © [Cha](https://github.com/invzfnc)