Since everybody is hopping on the Javascript games bandwagon, I figured I should show off my latest creation, which has been almost two months in the making. I present to you: TETRIS
http://charlo.gamemakersgarage.com/games/tetris.phpIt has *most* of the features of the original, except that the pieces never get any faster. I plan on adding that feature soon. Otherwise, it's just good ol' tetris. The scoring system I used is from the NES version of the game. Same with the piece colors. Gotta pay homage to the classics.
Surprisingly, this game was somewhat of a challenge to program. Finding a way to hold the game state and the state of the active piece in an efficient manner was a fun task. In the end I just used two-dimensional arrays, with each piece having an array of two-dimensional arrays (a three-dimensional array??) to indicate all the ways in which it could be rotated.
Try it out and tell me what you think! It's possible there are some bugs and stuff, but I am so tired of tetris that I would rather not test it anymore.
*Edit* probably should mention the controls, it's left/right/down arrow to move piece, up arrow to rotate, space to start and pause.