How can i move different things in the game with different speeds? Using pygame.time.delay
or pygame.time.wait
will have an impact on the whole game. I want something like having a Rect moving at clock.tick(30)
while another Rect moves at clock.tick(10)
. How can i do this?
Edit:
What i'm looking for is actually not only the movement (this could be done of course with different movement amounts to be added to Rect.x
andRect.y
). For example i have drawn a man on its Surface who should run after a ball, i press the K_UP or K_DOWN and want also his legs to move (to have a more nice running picture!), so i draw them again at different positions and so on. So i need something more of controlling the frames rate i think.