Answer the question
In order to leave comments, you need to log in
Why is a Pygame window not responding immediately after opening?
import pygame
import sys
W, H = 10, 20
TILE = 45
GAME_RES = W * TILE, H * TILE
FPS = 60
pygame.init()
game_sc = pygame.display.set_mode(GAME_RES)
clock = pygame.time.Clock()
run = True
while run:
game_sc.fill(pygame.Color('black'))
for event in pygame.event.get():
if event.type == pygame.QUIT:
run = False
pygame.display.flip()
clock.tick(FPS)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question