Forums - Open Redstone Engineers

Full Version: Pygame... Pong? ._.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
No, it's not a super-nooby "OOH I FIGURED OUT THE BOUNCING ALGORITHM" pong. I actually added quite a few features to this... and probably the worst source I've ever seen. Consider this also to be my entry to Xeo's worst code thread.

Here you go... at least it's commented...
https://www.dropbox.com/s/j73gqiecyo5umbl/pong.py

A cool thing I did was to make the ball's initial direction controlled by two floats, thus there are as many possible games as there are floats between 0 and the ball's speed (1.8)... squared. <3

Aaaand, bouncing is also slightly randomized, so you get essentially infinite games. Ta!