Skip to content

Instantly share code, notes, and snippets.

@hortonew
Created January 11, 2013 00:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hortonew/4507023 to your computer and use it in GitHub Desktop.
Save hortonew/4507023 to your computer and use it in GitHub Desktop.
Pygame - Control FPS
import pygame
pygame.init()
screen = pygame.display.set_mode((800,600))
clock = pygame.time.Clock()
def update():
#update objects here
if __name__ == "__main__":
while True:
update()
pygame.display.flip()
clock.tick(30)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment