Tetris 2.0
I think at this point it's been established that these posts are not going to be coming up with any semblance of frequency.
With that said, I've rewritten my Tetris game from the ground up, incorporating many new features. For one, the hold functionality is finally implemented, after 4.5 years. The process for checking valid moves is also significantly less hacky (still pretty hacky though), which means less bugs in theory. The music actually pauses when you toggle it off, and, very importantly, pausing the game actually remembers what state you left the music in. Amazing. The ghost piece is also implemented, along with the hard drop. On top of it all, you can rotate both clockwise and counterclockwise. Revolutionary, I know.
It's not completely finished yet. Size scaling is nonexistent right now, meaning it won't work on any screen size smaller than my laptop screen. Luckily, the entire playing field is a div that can be scaled via CSS transforms, so that hopefully won't be too bad. Also, the piece indicators on the sidebar are all done in-engine, which is cool, but they're ugly and off-centered and I think I'd be better off just making them images. That's coming down the pipeline too. More sound effects are also a goal. Ideally, the game would also preload properly, but I don't know if I'll ever get around to that. Likewise, I don't think I'll ever make this mobile compatible - dealing with touch gestures for things like the soft drop would probably be more hassle than it's worth.
Nonetheless, it's kind of cool to see how far I've come. Tetris was the first game I ever uploaded to this site (though Blackjack was programmed chronologically before Tetris), and it's nice to see just what a difference 4+ years can make.
The new version of Tetris can be found in exactly the same place as the original - under the Games menu - or via this link. For historical curiosity, my original Tetris game is still accessible here.
Posted By: Michael Xing