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

[pygame] PyGame Windows Key Behaviour



Hi there!

I've written a small demo pong game. There are 2 players, one is cpu
controlled. To sync there movement i use

clock = pygame.time.Clock()

and in the while loop:

milli = clock.tick()
seconds = milli/1000.

on checking the events it's:

if event.type == KEYDOWN:
    if event.key == K_DOWN:
        b_y += seconds * playerspeed

cpu changes his position with an equal function, until it reaches the
height of the ball

under winXP cpu and player can move with an equal speed
under win7 the player is significant slower than the cpu. it seems
that a player only can move 2/3 the distance than the cpu player is
able to

Do you have any hint's what can be done to fix this?

with kind regards
Thomas