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
File details
Details for the file pgzero_yt-1.5.16.tar.gz
.
File metadata
- Download URL: pgzero_yt-1.5.16.tar.gz
- Upload date:
- Size: 75.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.5.0.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | acd7916e7c2440cfd3740090c196854bd5234438ba66c2f4f9995107bfbfa04f |
|
MD5 | 6c7697bfd7f9d332e094effdf6d97bf6 |
|
BLAKE2b-256 | fe17c9136fa620c3c2ef0a031a553cbbd063fc8cc64057443e135aebef518ae8 |