Skip to main content

A zero-boilerplate 2D games framework

Project description

A zero-boilerplate games programming framework for Python 3, 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. Note that each of these is a self-contained script. There’s no need for any imports or anything else in the file.

Draw graphics (assuming there’s a file like images/dog.png or images/dog.jpg):

def draw():
    screen.clear()
    screen.blit('dog', (10, 50))

Play the sound sounds/eep.wav when you click the mouse:

def on_mouse_down():
    sounds.eep.play()

Draw an “actor” object (with the sprite images/alien.png) that moves across the screen:

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

def draw():
    screen.clear()
    alien.draw()

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

Installation

See installation instructions.

Documentation

The full documentation is at http://pygame-zero.readthedocs.org/.

Read the tutorial at http://pygame-zero.readthedocs.org/en/latest/introduction.html for a taste of the other things that Pygame Zero can do.

Contributing

The project is hosted on BitBucket:

https://bitbucket.org/lordmauve/pgzero

If you want to help out with the development of Pygame Zero, you can find some instructions on setting up a development version in the docs:

http://pygame-zero.readthedocs.org/en/latest/contributing.html

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.2.tar.gz (2.2 MB view details)

Uploaded Source

Built Distribution

pgzero-1.2-py3-none-any.whl (70.0 kB view details)

Uploaded Python 3

File details

Details for the file pgzero-1.2.tar.gz.

File metadata

  • Download URL: pgzero-1.2.tar.gz
  • Upload date:
  • Size: 2.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pgzero-1.2.tar.gz
Algorithm Hash digest
SHA256 91e641d545c6235a24719dea0fd83c8429e92a8b5ab1756bef145128e8db9017
MD5 b627a2667ad7c2ccbe22c3875bbd2822
BLAKE2b-256 4087fbb77cfd9c6f2dbe63d09d3e693aa2bcde63995f6f014b3b0bda5d3dbcdd

See more details on using hashes here.

File details

Details for the file pgzero-1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for pgzero-1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f90d1e61cb6945ad55bd1cb2a4a13ca6f1a3850a31c173dce3a739df9b024b8f
MD5 f8aa9ac31c7813cea3682bf9686ebb0b
BLAKE2b-256 48e5e5f14292373cb5fc7539aa01307b184c1e3c954d68945d8c44778669dd82

See more details on using hashes here.

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