[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] My Pong is slow (was Re:Drawing directly or loading images)



* Pete Shinners <pete@shinners.org>:

> Classical Pong was of course all solid rectangles. This is a prime case
> for drawing directly to the screen. I would recommend the Surface.fill()
> method.

I tried your recommendation and modified the TomPong from the
pygame-tutorial. I also added some tweaks to the blitting and drawing
(using dirty rectangles) as recommended in another tutorial. But: the
ball does not really fly smooth on the screen. Is it just my slow
monitor or is there really the old ball position visible? Maybe it has
something to do with the framerate and the speed of the ball, I don't
know.

Please take a look at my modified version
http://www.glorybox.de/pong.py

The TomPong has some glitches and bugs, which I will fix an recommend to
the original author. My version should look like played on a old TV:
http://www.glorybox.de/pong_mockup.png

Regards,
--  
  Kai Weber
» kai.weber@glorybox.de   http://www.glorybox.de   gpg-key: 0x594D4132