A simple implementation of the game Tetris using Vanilla Javascript, HTML, and CSS.
- Super Rotation System (SRS)
- Lock Delay
- Customizable keybinds
- Customizable game parameters
- ARR and DAS
Go to https://khusyasy.com/tetris-js/ to play the game.
You can also play locally, clone this repository and opening index.html
in your browser or by using npx serve .
in the project directory.
Action | Name | Keybind |
---|---|---|
Move Left | mv_left |
a |
Move Right | mv_right |
d |
Soft Drop | softdrop |
w |
Hard Drop | harddrop |
s |
Rotate CCW | rot_ccw |
← |
Rotate CW | rot_cw |
→ |
Rotate 180 | rot_180 |
↑ |
Hold | hold |
Shift |
You can open the keybinds menu by clicking the Change Keybinds
button on the bottom of the screen.
Change the Keybinds mode to Custom
to change the keybinds. And click on the keybinds you want to change, then press the key you want to bind to that action.
The keybinds will be saved to your browser's local storage. Even when you change it back to Default
, the keybinds will still be saved.
Advanced players should be familiar.