Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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