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
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pgzero-1.2.1.tar.gz
.
File metadata
- Download URL: pgzero-1.2.1.tar.gz
- Upload date:
- Size: 2.3 MB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8cadc020f028cbac3e0cbd3bb9311a1c045f1deedac7917ff433f986c38e6106 |
|
MD5 | 38a339dec8740747e199d8d9fe94e959 |
|
BLAKE2b-256 | be76972af9c4ad453ecdb22115fcfaa9fca7147207aa73a93caab8a7a23c5b6a |
File details
Details for the file pgzero-1.2.1-py3-none-any.whl
.
File metadata
- Download URL: pgzero-1.2.1-py3-none-any.whl
- Upload date:
- Size: 71.3 kB
- Tags: Python 3
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 734e1de1a99804c2610f90aa419411fc2b31200b9d683b6c9fc710c7a8e36606 |
|
MD5 | 055651f0136e3d8b362ff99dbc2a25b4 |
|
BLAKE2b-256 | 2c66bc46c203802d47fa30a6caa92d13392274bcbebbb9ffcd0c5ed8030b3611 |