JavaScript Tetris
By Dan Steinman

Here's a neat little Tetris game built entirely with JavaScript and Dynamic HTML. To play this game you must use either Netscape 4.0 or Internet Explorer 4.0 - although I highly recommend you use Netscape because the game runs much faster in it. Also, if you use Netscape on Win95/NT you should hear the 2-song MIDI soundtrack to the game.

There's still a few bugs that I'll eventually have to fix, but there's nothing wrong with it that should cause any major problems. Due to JavaScript limitations I couldn't make the game super-fast, and to compensate for the higher levels I made the blocks make bigger jumps. On level 13 (if you're that good) you'll notice it.

These are the keys you use to move the blocks:

Left: 4
Right: 6
Speed Drop: 5
Rotate CW: V,0 (zero)
Rotate CCW: C

If you'd like to learn how to make games and animation using JavaScript, you can read through my JavaScript/Dynamic HTML tutorial: The Dynamic Duo

JavaScript Tetris was made by:
Dan Steinman (

copyright © 1998 Dan Steinman

Casa de Bender