Skip to content
UPEEC

Pygame and Pygame Zero

The classic 2-D game library, and a beginner-friendly layer on top (Pygame Zero).

Beginner
Comments 0
import pygame
pygame.init(); screen = pygame.display.set_mode((640, 480)); clock = pygame.time.Clock()
running = True
while running:
    for e in pygame.event.get():
        if e.type == pygame.QUIT: running = False
    screen.fill("black"); pygame.display.flip(); clock.tick(60)

pygame-ce is the actively developed community edition.

Spotted a mistake or want to add detail? Suggest an improvement — Content Contributors' edits are reviewed by editors before they go live.

Discussion (0)

Sign in or join free to ask questions and discuss this topic.