pygame is
Python
Simple DirectMedia Layer
 
 
pygame.org is
Site Swing
PongClone

PongClone - 4

Hayden Dennison (hidas)

Tags:

Description

This small game uses pygame.draw() for every game object except for the fonts and display. It should work on any operating system that supports pygame and python. (no os.path.join!) It's released under the GNU General Public License.

Changes

PongClone has gone through a few updates, the most noticeable of these sound effects. It also uses my own custom menu system, SimMen. The collision bugs have been fixed, also.

Links

Home Page: http://toxicblobs.weebly.com/python-games.html
Source: http://toxicblobs.weebly.com/uploads/3/6/7/0/3670719/pongclone.zip

Screenshot


click to view original size

Releases

PongClone - 4 - Jan 20, 2011
PongClone - 3.1 - Jan 11, 2011
PongClone - 3 - Jan 9, 2011
PongClone - 2 - Jan 8, 2011

Pygame.org account Comments

If you wish to leave a comment with your pygame.org account, please sign in first.

February 25, 2011 6:08pm - Zachariah Callaway - nickname: (xzcallaway)
A .deb package of Pong Clone is available for download at dotdeb.com on the Arcade page.
January 18, 2011 8:48am - Hayden Dennison - nickname: (hidas)
Thanks, Chris!

1. Yes, the ball just reverses direction whenever it hits either paddle. I'll have to add some code that detects whether it's stuck inside a paddle and adjust accordingly.

2. The AI moves at a steady 5 pixels when the ball is under or over it's centery. As you said, it stops and starts when the ball's yspeed is under 5 pixels.

3. Yep. My goal for this project was to have sound, images, and things dynamically generated within the code, but I'm going to scrap this to add some sound and a menu, since two people have asked for it so far.

Again, thanks for the comment, your opinion, and the good score. :)
January 17, 2011 2:22am - Chris - nickname: (cng1024) - 3/5
I played the Atari Pong game as a kid, and I must say, this appears to be a pretty good recreation.

I rated it 3/5 because it does have some bugs.

1) If you hit the ball with the top or bottom of the paddle, the ball gets 'stuck' for about 250ms before moving again. Your collision detection needs a bit of a tweak there.

2) The ai opponent paddle's motion appears 'jittery' when the ball's vertical motion is slow. I didn't take a really good look at the code, but it appears to be a side effect of the paddle's perfection in countering any vertical movement the ball makes. It could be fixed by adding a threshold value to the calculations. If the ball's y-coordinate gets outside a +/- range of so many pixels, have the ai counter the ball's movement. Perhaps shrink the threshold as the ball's speed increases?

3) This isn't really a bug, but it might be nice to shine the game up some. I wouldn't do a thing to the graphics or game play, but it would be nice if there was that classic 'thunk' sound when the ball is hit and a simple menu would just be icing on the cake.

Aside from these small issues, its a very nice game. Falls into that addictive category for me anyway. :-)
January 8, 2011 2:24pm - Maxime - nickname: (spacemax) - 3/5
It's working fine. Just add some sound and why not some features.
spotlight

 
our projects
pygame.org welcomes all python game, art, music, sound, video and multimedia projects. If they use pygame or not.
 
recent releases
Oct 20, 2014

Oct 16, 2014

Oct 9, 2014

Oct 8, 2014

Oct 7, 2014

Oct 4, 2014

Oct 1, 2014

Sep 19, 2014

Sep 17, 2014

Sep 9, 2014

Sep 8, 2014

Sep 7, 2014

... more!
 
for pygame related questions, comments, and suggestions, please see help (lists, irc)