Answers for "pygame open a window"

1

pygame window

import pygame
pygame.init()
screen = pygame.display.set_mode((800,600))
pygame.display.set_caption('A bit Racey')
clock = pygame.time.Clock()
running = True
while running:
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            running = False
    pygame.display.update()
    clock.tick(80)   
pygame.quit()
quit()
Posted by: Guest on August-06-2021

Python Answers by Framework

Browse Popular Code Answers by Language