Skip to content

Instantly share code, notes, and snippets.

@stamaniorec
Created October 31, 2015 11:48
Show Gist options
  • Select an option

  • Save stamaniorec/fc4899628ee34f9bbf93 to your computer and use it in GitHub Desktop.

Select an option

Save stamaniorec/fc4899628ee34f9bbf93 to your computer and use it in GitHub Desktop.
#pygame cap fps
clock = pygame.time.Clock()
FPS = 60
...
while is_running:
for event in pygame.event.get():
...
...
pygame.display.update()
clock.tick(FPS)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment