Pygame Template

Source URL: N/A

Language: python

Created on: 2020-04-09 02:53:17

import pygame,sys

#game initialization
pygame.init()
window = pygame.display.set_mode((900,600),0,32)
pygame.display.set_caption('Basic Pygame Template')
clock = pygame.time.Clock()

#game loop
while True:
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            pygame.quit()
            sys.exit()
    #game code here
    
    pygame.display.update()
    clock.tick(60)
Pygame Template
content_copy