I'm not putting Pong up, it was hacked together and I'm not very proud of it.
I am, however, putting up Breakout! I coded a finite-state-machine, a basic button GUI system, all of my states, the paddle, the ball, the bricks, all object-oriented with beautiful pygame! And everything is completely commented, with classes having long documentation strings. It comes in at a little over four-hundred lines, and the executable is here:
BREAKOUT !
And the source (along with the executable file and setup.py):
BREAKOUT SOURCE !
I am very proud of this code. It looks (and feels) beautiful, and I can't wait to work on some more games (I see space invaders in the future!).
I'm going to eventually write a source analysis and talk about it more, however it's pretty late and I should probably get to bed.
See you guys tomorrow !
And I'm back! That was some good sleep!
So, I made a video of the game!
And I'm really happy with how it turned out! I'm working on adding more levels as we speak !
A Few Hours Later - And I'm back!
I'm actually uploading the files in the morning, however there is now:
FOUR AWESOME LEVELS!
SOME BRICKS TAKE TWO HITS, AND IF THEY ARE HIT A DIFFERENT TEXTURE (BROKEN BLOCK) IS DISPLAYED!
MAPS ARE AWESOMELY GENERATED USING EITHER A LIST COMPREHENSIONS OR TRADITIONAL FOR LOOPS!
COLORS ARE RANDOM!
THERE IS A RANDOM MAP, A PYRAMID MAP, AND A RAINBOW MAP!
THERE IS A MAIN MENU!
THERE IS A GAME OVER SCREEN!
ONCE YOU COMPLETE A LEVEL YOU ADVANCE TO THE NEXT LEVEL. IF THE BALL GOES OFF THE SCREEN YOU GO TO THE GAME-OVER SCREEN!
I believe it is finished! Have fun :)!
NEXT PROJECT: SPACE INVADERS, SUPERMAN3275 STYLE!
And where is the screenshot?