Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lordmauve/pgzero
A zero-boilerplate games programming framework for Python 3, based on Pygame.
https://github.com/lordmauve/pgzero
education game-framework pygame python-game-development python3
Last synced: 16 days ago
JSON representation
A zero-boilerplate games programming framework for Python 3, based on Pygame.
- Host: GitHub
- URL: https://github.com/lordmauve/pgzero
- Owner: lordmauve
- License: lgpl-3.0
- Created: 2018-02-25T13:16:02.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-04-16T09:14:09.000Z (7 months ago)
- Last Synced: 2024-10-01T20:41:45.796Z (about 1 month ago)
- Topics: education, game-framework, pygame, python-game-development, python3
- Language: Python
- Homepage: https://pygame-zero.readthedocs.io/
- Size: 3.63 MB
- Stars: 534
- Watchers: 29
- Forks: 190
- Open Issues: 120
-
Metadata Files:
- Readme: README.rst
- License: COPYING
- Authors: AUTHORS
Awesome Lists containing this project
- starred-awesome - pgzero - A zero-boilerplate games programming framework for Python 3, based on Pygame. (Python)
README
.. image:: https://img.shields.io/github/workflow/status/lordmauve/pgzero/Run%20tests/master
:target: https://github.com/lordmauve/pgzero/actions/workflows/test.yml
:alt: GitHub Test Status.. image:: https://img.shields.io/pypi/v/pgzero
:target: https://pypi.org/project/pgzero/
:alt: PyPI.. image:: https://img.shields.io/pypi/dm/pgzero
:target: https://pypistats.org/packages/pgzero
:alt: PyPI - Downloads.. image:: https://img.shields.io/readthedocs/pygame-zero
:target: https://pygame-zero.readthedocs.io/
:alt: Read the DocsPygame Zero
===========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, 10def draw():
screen.clear()
alien.draw()def update():
alien.x += 1
if alien.left > WIDTH:
alien.right = 0Installation
------------See `installation instructions`__.
.. __: http://pygame-zero.readthedocs.org/en/latest/installation.html
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