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
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 Github:
https://github.com/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
Release files for pgzero 1.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pgzero-1.2.1.tar.gz | 2.3 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pgzero-1.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 2.3 MB
Release files / pgzero-1.2.1.tar.gz
| Download URL | pgzero-1.2.1.tar.gz |
|---|---|
| Size | 2.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8cadc020f028cbac3e0cbd3bb9311a1c045f1deedac7917ff433f986c38e6106
|
|
BLAKE2b-256 checksum How to use checksums |
be76972af9c4ad453ecdb22115fcfaa9fca7147207aa73a93caab8a7a23c5b6a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.9.2
|
Release files / pgzero-1.2.1-py3-none-any.whl
| Download URL | pgzero-1.2.1-py3-none-any.whl |
|---|---|
| Size | 71.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
734e1de1a99804c2610f90aa419411fc2b31200b9d683b6c9fc710c7a8e36606
|
|
BLAKE2b-256 checksum How to use checksums |
2c66bc46c203802d47fa30a6caa92d13392274bcbebbb9ffcd0c5ed8030b3611
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.9.2
|