Hi,

On 10/26/06, Taylor Boon <[EMAIL PROTECTED]> wrote:
Kai -

Pygame already does something like this - key.get_pressed. You can either
use it directly or you can rewrite is_pressed like this:

from pygame import key

def is_pressed(theKey):
    return key.get_pressed()[theKey]

This is not what I wanted it to. This returns true as long as a key is pressed
(and I already use it for some cases). The problem was to check only for
a single keypress not for a *holding down* key. :)

But I've got a new problem.. my Pong is damn slow.
I am going to write a new message later on. If you cannot wait, you
could take look at http://m26s09.vlinux.de/trac/Pong/browser/trunk/pong.py
and help me finding out why this thing is terribly slow. (Means: The
ball is lagging and the paddle too). :>

HTH,
Taylor

Thanks (Farai too)!
Kai

Reply via email to