Tetris
This is a game I wrote my junior year of high school to help a friend learn C++ and Windows. It uses solely Windows API calls and namely GDI to draw. Therefore, it is obviously a Windows only game.
Features
It features alpha transparent drawing when the lines are cleared as they fade out. The program saves its data through the registry to show how this is done in Windows. It also shows how to toggle full screen with only API calls (unenabling the title bar and changing the screen resolution). Finally, it has a very rudimentary sound engine.
Use as Learning Tool
I did not spend much time on it, and it has some bugs. But, to learn, this could be helpful. Also, if you want to use this as a learning experience, then the best way to tackle it is to attempt to add more to it.
Namely, add 1) Highscore Additions, 2) Fix Bug when rotating to the left side, 3) Add Music, 4) Add ability to start at any level previously attained.
Namely, add 1) Highscore Additions, 2) Fix Bug when rotating to the left side, 3) Add Music, 4) Add ability to start at any level previously attained.
Development, Compiling
This game was developed using Visual Studio 6.0. The zip file contains the workspace and project file for this IDE. The code given should work with any compiler as long as you link with the correct libraries.
Notes on Tetris
Tetris was designed by Alexey Pajitnov.
Download
|
[ download (8.30MB) ] - Windows Binary with Source
|
View Source
|
[ source directory ] - Click here to view the 'Tetris' source directory on the server.
|













