Ever seen those little grey hand-held Tetris games, with lots of variants built in? This is based on those. It's relatively simple (there's only a handful of extra game modes, and they're all variants of, well, Tetris), but you can mix and match to whatever suits your fancy.
When I first wrote this post I marked it as beta code, but I'm now satisfied it's stable and ready to put down as a "final release". By whatever coincedence wojbie posted his mirror util at about the same time as this, which was fortunate as it allowed me to quickly pick up some holes in my monitor-handling logic (since fixed).
I guess I may be able to claim the "first ComputerCraft game with music" title here - if one or more Iron Note Blocks from MoarPeripherals are available, along with the "note" resource pack downloadable from the same link, the game will play background music!
So, without further ado:
pastebin get nKQZwgtv bbtetris
Version History
2013/11/09Beta 1.0
Initial release.
2013/11/10
Beta 1.1.0
Terminate command now triggers the program's exit routine.
An INI file is now generated on first launch ("BBTetris.ini").
Beta 1.1.1
No longer responds to resizes of monitors it doesn't control…
Beta 1.1.2
… nor touches on monitors it doesn't control, nor does it try to restore from such displays on exit.
2013/11/16
Beta 1.1.3
Condensed code somewhat.
2013/11/18
Beta 1.1.4
Trimmed things down a fraction further.
"Trick" blocks chopped down to my "final" intended spawn rate (one in thirty).
2013/11/21
Version 1.0.0
No longer marked as beta.
"Trick" blocks are now one in twenty.
Fixed issues when trying to run from a read-only environment.
Seems later versions of CC use a case-sensitive file system, so switched all file references to lower-case for convenience.
2013/11/24
Version 1.0.1
No longer offers to save the game while running off a read-only disk (this did "work", but the saves were discarded when quitting).
2014/03/31
Version 1.0.2
ComputerCraft 1.6 compatibility (due to term.restore() changes).
2014/04/15
Version 1.0.3
More ComputerCraft 1.6 compatibility (due to textutils.serialize() changes).
2014/07/07
Version 1.0.4
MoarPeripherals Iron Note Block support.
2015/04/06
Version 1.0.5
Updated to newer MoarPeripheral's directory layouts.
CC 1.74's "mouse_up" and "key_up" events will not halt the intro animation.
2015/05/17
Version 1.0.6
Apparently setTextScale now triggers a monitor_resize event a tick or two later. Added a handler for that.
Added Pocket Computer support.