nczempin / fluxagama

2d vertical shooter based on PyGame.
3 stars 0 forks source link

Movement speed needs to be constant regardless of CPU #2

Closed nczempin closed 12 years ago

nczempin commented 12 years ago

Right now, the game plays faster on faster machines: The ship moves faster, and so does the bullet.

There needs to be some kind of mechanism to have a constant game speed across platforms.

nczempin commented 12 years ago

This should help: http://www.pygame.org/docs/ref/time.html

nczempin commented 12 years ago

I used the tick() method, setting the frame rate to 60. however, this made the game very slow (so apparently it runs at a much higher rate than 60). We need to adjust the animation speed (how far the shot moves per tick, how far the ship moves per tick).