Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

python pygame fps

FPS = 30 # frames per second setting
fpsClock = pygame.time.Clock()

while True: # the main game loop
  #...
  
  for event in pygame.event.get():
    if event.type == QUIT:
      pygame.quit()
      sys.exit()

pygame.display.update()
fpsClock.tick(FPS)
Source by inventwithpython.com #
 
PREVIOUS NEXT
Tagged: #python #pygame #fps
ADD COMMENT
Topic
Name
8+7 =