# Example file showing a basic pygame "game loop" import pygame # pygame setup pygame.init() screen = pygame.display.set_mode((1280, 720)) clock = pygame.time.Clock() running = True while running: # poll for events # pygame.QUIT event means the user clicked X to close your window for event in pygame.event.get(): if event.type == pygame.QUIT: running = False # fill the screen with a color to wipe away anything from last frame screen.fill("purple") # RENDER YOUR GAME HERE # flip() the display to put your work on screen pygame.display.flip() clock.tick(60) # limits FPS to 60 pygame.quit()
# RENDER YOUR GAME HERE
#OLD CODE - fill the screen with a color to wipe away anything from last frame screen.fill("purple") #NEW CODE - fill the screen with a color to wipe away anything from last frame screen.fill((128, 0, 128))#Purple as you can get it...
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)