framerate, number of frames per second, clock.tick(30), sets a program’s framerate to 30 frames per second, clock, keeps framerate consistent, clock = pygame.time.Clock(), creates a clock object to control timing, tick, advances the clock one frame, clock.tick( ), moves the program forward one frame, timer variable, keeps track of time that has passed, timer += clock.get_time(), adds elapsed time to the timer, duration, amount of time between two things happening, duration = now - then, calculates time between two events.

Rangliste

Visuel stil

Indstillinger

Skift skabelon

)
Gendan automatisk gemt: ?