Tetris.js is another Tetris clone using JavaScript and HTML5 https://projects.kingofdog.de/Tetris.js
Go to file
2018-02-24 10:01:36 +01:00
js Small language improvements 2018-02-24 10:01:36 +01:00
lib Add Hammer.js library 2018-01-18 12:02:52 +01:00
.gitignore Small language improvements 2018-02-24 10:01:36 +01:00
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md 2017-12-17 13:44:42 +01:00
index.html Eliminated graphic bug that tiny gaps appear between blocks + added new theme "Clean" 2018-02-23 19:55:30 +01:00
LICENSE Initial commit 2017-12-15 19:55:54 +01:00
main.js Adjustments for release of v0.0.3a 2018-02-17 19:52:30 +01:00
package.json Adjustments for release of v0.0.3a 2018-02-17 19:52:30 +01:00
README.md Add even more things to do 2018-02-18 13:15:18 +01:00
style.css Fix settings menu displaying errors 2018-02-23 17:33:45 +01:00

Tetris.js

Another Tetris clone made in a Html5 canvas and native JavaScript ECMA6

Basics - What is Tetris?

Tetris is an old classic arcade game from Russia. The first version ever released was published on 6th June, 1984 by Alexei Paschitnow who is also the inventor of this cult game. Although, he got inspiration by the puzzle game Pentomino To date, over 100 million copies were sold and there exist over 65 ports for different plattforms.

The game consists of seven different blocks called Tetrominos (I, J, L, O, S, T). The letters represent the forms of the Tetrominos, which all possess four squares as the building material.

These are the existing, default Tetrominos

My clone of this game principle is made up by one HTML5 file containing a canvas element and a JavaScript file using ECMA script 6. It has a minimalistic look and keeps the focus on the actual tiles, not on anything else. I hope you have at least somewhat fun playing this game - or browsing my source code. Feel free to critize it - at least I want to learn from projects like this one.

Setup

Tetris.js is very intuitive and easy to set up. Just download the repository or the most recent release of this project and extract the downloaded file into a new folder. Now you just have to start the index.html-file or the TetrisJS.exe of the release version.

ToDo

Currently, Tetris.js is a very minimalistic game with the smallest possible amount of features. There are many things I want to implement into the game in the future. A few of them are listed here:

  • Detect slow hardware to optimize performance
  • Multiplayer (network connection)
  • Display highscore
  • Global highscore ranking
  • Game Over Screen
  • Add more languages
  • Add pause button in order to allow mobile users to pause the game
  • Implement different color schemes
  • Implement light/dark mode
  • ~Display the upcoming tile(s)~
  • ~Distribute content of tetris.js to multiple classes~
  • ~Hold one tile and swap them with the current one~
  • ~Mobile optimization~
  • ~Cooler graphics of the tiles~
  • ~Multiple themes?~
  • ~Improve performance~
  • ~Better layout of texts~
  • ~Highscore saving~
  • ~Title screen~
  • ~Multi-language support~
  • ~Better controls (WASD + Arrow keys for moving?, Q+E for rotating?, F for swapping with the currently holded tile?)~
  • ~Pause the game~
  • ~Menu to reset a running game~
  • ~Show the grid of the little blocks~
  • much more...