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 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xpgzero-1.2.5.tar.gz (2.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xpgzero-1.2.5-py3-none-any.whl (73.1 kB view details)

Uploaded Python 3

File details

Details for the file xpgzero-1.2.5.tar.gz.

File metadata

  • Download URL: xpgzero-1.2.5.tar.gz
  • Upload date:
  • Size: 2.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.2

File hashes

Hashes for xpgzero-1.2.5.tar.gz
Algorithm Hash digest
SHA256 63d4a67bb54c265a799403bfc93179143c1173f4f193447a0496c8c19ef14fb4
MD5 705d20251e0d03535d182528d8b8e441
BLAKE2b-256 03dc75e5923cf1e9a42315365b32dcf61dec569509aa2ed38100eb4f3772c76b

See more details on using hashes here.

File details

Details for the file xpgzero-1.2.5-py3-none-any.whl.

File metadata

  • Download URL: xpgzero-1.2.5-py3-none-any.whl
  • Upload date:
  • Size: 73.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.2

File hashes

Hashes for xpgzero-1.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 867bb5c5851cb8a30fdf48f76f47ea1e37df94a2a9b26b9e895ae37fedbc126f
MD5 951913dcd6e0ead4f7fde239cbcc3ab9
BLAKE2b-256 068d772c720866da4091e959d7cc22475340eeda696ac0460ff8448d3a009416

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page