A HTML5 Tetris Implementation
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
README.md Added the readme Apr 8, 2014
tetris.html Initial commit Apr 5, 2014
tetris.js Initial commit Apr 5, 2014


HTML5 Tetris

Has the world ever seen such a thing? Tetris in HTML5!!! Admittedly, tetris isn't as cool as 2048 nowadays. However, tetris has some very interesting problems to study. More can be found here.

My focus was on implementing optimal algorithms, an Tetris AI and playing around with some new web-technologies. The features of Tetris include:

  • Customizable Tetris Tiles/Board
  • A Tetris AI
  • Gamepad API
  • Devicemotion API
  • Animated Favicon

The Game

The colors of the game board are a little orientated on n-blox - I hope you can forgive me, but I really like them.

You can participate in the highscore, hosted on my site as long as you don't change the tiles and the view of the board (and haven't used the AI ;-) ).

![](http://oi61.tinypic.com/ev88kh.jpg =350x)

Tetris AI

Just press a on your keyboard and enjoy the screensaver-esque thing. After increasing the speed, it's much more fun.

Gamepad API

You got a PS3 or XBOX? Connect the controller to your computer and try it in your favorite browser. There is an experimental API for game controllers in modern browsers, which works pretty well after some hacking. Just activate it in the Tetris edit menu and enjoy - I didn't play tetris on a gamepad as well, but it's cool.

Tetris Tiles

It's possible to customize the tetris tiles - and to send the custom tetris game to your friend via the edit menu on the right hand side. The URL is changed and can be copied/pasted.

![](http://oi57.tinypic.com/k4tnoy.jpg =350x)

The Hacker Emblem was added to make it a little more difficult for the AI and also for you, if you want to participate in the highscore table.