Tuesday, May 6, 2008

Tetris [C++/OpenGL/Cross-platform]


I stayed up literally all night doing this, starting at 6pm last night and going to sleep at 8am this morning only to wake back up again at 10am to go to class.

I have pre-compiled binaries for a variety of systems, most likely yours, but source is provided of course if you want to compile it yourself.

One small note on windows compilation, apparently there is not a cross platform way to sleep, in linux I used my own Sleep() function with a wait time of 50000, in windows simply include windows.h, comment out my sleep function, and change the wait time to 50. This only affects the animation when a row is dropped. If someone knows a better way to sleep, please let me know.

I am on campus right now, so I can only provide a win32 screenshot



win32: http://www.moparisthebest.com/projects/tetriswin32.exe
linux32: http://www.moparisthebest.com/projects/tetrislnx32
linux64: http://www.moparisthebest.com/projects/tetrislnx64

project with project description and make file:
http://www.moparisthebest.com/projects/tetris.tar.gz

only the source (.h and .cpp) files:
http://www.moparisthebest.com/projects/tetrissrc.zip

Have fun, and try to leave some feedback.

No comments: