I've decided to post my first major XNA work for review, criticism, etc: Tetris.
This game was originally programmed in VB.NET 2008 and XNA 3.1. I made all the graphics myself and all the sounds effects are public domain. The current version uploaded uses VB.NET 2010, .NET4 and XNA 4.0.
In order for you to get the sound to work, you'll need to download bass.dll here. It's the link at the VERY TOP of the page that says: "Platform: Win32, OSX" with two very tiny "Download" links. The Bass.NET library found further down the page is not used. The bass.dll file must simply be in your output directory.
If you drop OGG or MP3 files in the "Music" directory created in the output directory, it'll random shuffle them and play them as you play the game. Once again, you need the bass.dll library to make this work.
I chose to use the Bass.dll library over the native XNA methods for it's native support of MP3s (thus making file sizes much smaller), it's easy on-demand firing of sound FX and it's simplicity. Compared to the ugly behemoth XNA gave me which requires conversions of audio files with the XACT tool and only allowing storage of those audio files as bulky WAV files, it was a no-brainer.
The game is completely keyboard driven:
F1 = New Game
Esc = Quit Program
Left - Right Arrow Keys = Move Piece
Down Arrow = Drop Piece
Up Arrow = Rotate Piece
I tried to keep the game action as faithful to the arcade original as I could, thus, there's extensive coding in just mapping how the controls work with things like grace periods before a piece is considered "stacked" and auto-repeat for holding left and right. I really was impressed by how much time I had to spend tweaking the controls; it was something I totally didn't expect. Leaving the controls as simple keypresses made for lackluster game play on the early levels and immense frustration at the higher levels when pieces would unforgivingly stack as soon as they made contact. It was certainly a learning experience.
I'm not entirely happy with the actual code I used; it's probably some of my sloppiest work, but I was trying to go for functionality over form with this project. Plus, I upgraded the project several times without rewrite and it shows.
Anyways, download it, compile it, tell me what you think. Tear it apart and show me how I could have written it better or study it to learn how to make your own VB.NET/XNA games. I appreciate all comments.
Project files only (no binary code, needs XNA installed and bass.dll): Tetris.zip
UPDATE: Full solution package with binaries, bass.dll, XNA runtime installer and setup project..
UPDATE: Here is an updated version that has been modified to work in Visual Studio 2010 under .NET 4 and XNA 4.0. This contains project files only. You'll need bass.dll to make it work: Tetris_NET4_XNA4.zip