So basically this year I have a project to do for school, and I chose to do a Tetris and an AI to go with it.
And I figured I could share the sources online for some people that may be interested.
For the moment I haven't programmed the AI, but the game itself is playable, I'll update this topic when there is more content. Although it is not user friendly at all, I plan to do an enhanced version in the future but in C++, using raylib
that I recently discovered, but I don't really have the time right now and my C++ is rusty.
Anyway, the current version is in Python and uses PySFML
. The sources are available here
I didn't pay much attention to the interface but I made the gameplay as smooth as I could and I used official guidelines. (I used Arika SRS btw, but you can easily change back to SRS in the code if you want)
Oh and the keys I use are: arrows (up for clockwise rotation), numpad1 to hard drop, numpad2 to hold and numpad6 to rotate counter-clockwise.
Here is a screenshot:
If you have questions, remarks or anything, let me know.