Alleytris
Friday, July 4th, 2008 | Programs
For more including Author's Notes download the eBook pages with this program's code listing.
Alleytris is a variation of the famous block dropping game known as Tetirs, a game which needs no introduction.
This variation of Tetris is only 4 columns wide. Playing the game in such a narrow space cleared lines are frequent and failing to pay attention to the next piece can be deadly. Getting 100 lines is an accomplishment. It contains a lot of the features found in most modern version of the game including quick drop, “infinite spin,” and shadows that help you properly place pieces.
Alleytris is written by Joseph Larson inspired by a game by Alex Pajitnov.
6 Comments to Alleytris
205 lines.
I just wanted to mention my high score. At that point it was so fast that I couldn’t rotate fast enough to effect infinite spin, which technically shouldn’t ever be possible. I may take the speed out of the thing (since I always do insta-drop anyways) and see how far I could make it on stacking skills alone. But still, 205 lines. Not bad.
Didn’t take long either. This game goes fast.
July 29, 2008
Holy smackzilla. Check this out:

I so wish I was recording this.
I’m going to make a recording of me playing this game because it wasn’t until I saw someone else (and I do not for the life of me remember who or where) really showing me the combinations possible that I started to enjoyed the game myself.
July 30, 2008
Made that recording:
http://cymonsgames.retroremakes.com/alleytris-video
August 1, 2008
*sigh* Okay, I think I’ve got a Tetris addiction to get out of my system, so forgive me, but that video has led me to find 2 other versions of Tetris:
Tetrinet (now blocktrix) and Cultris. The former has more options, the latter has more polish. Fortunately I don’t know anyone else as crazy as me right now, and since they’re network games there’s less incentive to load ‘em up. Right now.
August 2, 2008
Hi Joe, I really like your game, it reminds me of “Big Block” mode from the “Tetris: The Grand Master” series. If you’re not familiar with the series, there’s some really great videos up on youtube, here’s a few links to the videos of the aforementioned big mode:
TGM1: http://www.youtube.com/watch?v=g71mhAnidgg (with added 20G)
TGM2: http://www.youtube.com/watch?v=kJrXLntEjgs (also 20G)
TGM3: http://www.youtube.com/watch?v=EIK0ZseIA08
Anyways, my best score on Alleytris so far is 401 lines. (However, this record was through wine on linux, so I’m not sure the game was running 100% as intended. Screenshot here: )

. Once again, thank you very much for your great game, and thank you for making the source code available; it makes for very instructive reading!
September 5, 2008
I did a little tweaking on the routine in main() for Alleytris so it would take the command-line parameter for number of columns, or, barring its existence or bounds limit exceeding, would then use the default width.
Then it would go into the init() routine which would do a dynamic buffer allocation. And after the game loop is finished, prior to endwin(), it deallocates through some free() calls.
All in all it wasn’t that big of a change, but it does allow one to play Alleytris with variable-width columns without having to recompile. So you can have the classic 10-column Tetris style, or whatever size you really want. But you can expand it simply by pushing against the side with a block.
Really cool. This may be the version that I put in the book. For everyone that wants to check it out here:
It’s fun to experiment with widths. 5 is actually pretty cool to play.
Next what’d be neat is a game with variable width as you play. Maybe one that starts out 10 and whenever it gets a chance (ie all are clear on the left or right) it crunches it inwards until a minimum with (which I assume would be 4).
Leave a comment
Subscribe
Support Cymon's Games
Recent Comments
- Bill on Numbrix
- Joe on Should I do tutorials?
- Alan Monroe on Should I do tutorials?
- Alan Monroe on Should I do tutorials?
- Peter on StarTrek
- Joe on Others Teaching Programming
- Devin Watson on Others Teaching Programming
- Joe on Programming Math
















July 5, 2008