Skip to main content

A zero-boilerplate 2D games framework

Project description

A zero-boilerplate games programming framework based on Pygame.

Some examples

Pygame Zero consists of a runner pgzrun that will run a Pygame Zero script with a full game loop and a range of useful builtins.

Here’s some of the neat stuff you can do (each one of these would be a self-contained, runnable script):

Draw graphics (from the images/ directory):

def draw():
    screen.blit(, (10, 50))

Play a sound (from the sounds/ directory) when you click the mouse:

def on_mouse_down():

Update and draw an “actor” object:

alien = Actor('alien')
alien.pos = 10, 10

def draw():

def update():
    alien.x += 1
    if alien.left > WIDTH:
        alien.right = 0


  1. Install Pygame for Python 3

  2. Install Pygame Zero (python install)

  3. “python3 -m pgzero <pgzero program>” or (if installed correctly) pgzrun <program>


The full documentation is at

Read the tutorial at for a taste of the other things that Pygame Zero can do.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pgzero-1.0beta1.tar.gz (141.1 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page