• Stars
    star
    490
  • Rank 89,811 (Top 2 %)
  • Language
    Python
  • License
    GNU Lesser Genera...
  • Created almost 7 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A zero-boilerplate games programming framework for Python 3, based on Pygame.
GitHub Test Status PyPI PyPI - Downloads Read the Docs

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

More Repositories

1

chopsticks

Chopsticks is an orchestration library: it lets you execute Python code on remote hosts over SSH.
Python
159
star
2

wasabi2d

Cutting-edge 2D game framework for Python
Python
144
star
3

adventurelib

A minimal library for writing text adventure games in Python 3
Python
135
star
4

flake8-html

Generate HTML reports of flake8 violations
Python
52
star
5

pyfxr

Sound effects generation for Python, in fast Cython code, compatible with Pygame and Pyglet.
Python
16
star
6

puppy

A prototype IDE for education; the precursor to mu https://github.com/mu-editor/mu
Python
11
star
7

goblit

Award-winning adventure game from PyWeek 19
Python
9
star
8

gamemaths

Slides for my remote.python.pizza 2020 talk
Python
7
star
9

lepton

Lepton: A high-performance, pluggable particle engine and API for Python
C
7
star
10

wasabi-geom

A 2D geometry library for Python, with ergonomic vector classes in optimised Cython code.
Cython
6
star
11

axium

Space shooter being built for PyWeek 32
Python
6
star
12

dark-world

A Pyweek 25 entry, for the theme "Two Worlds"
JavaScript
4
star
13

weddinglights

Fadecandy based lighting
Python
4
star
14

lightvolume

2D light volume rendering in OpenGL
Python
3
star
15

edubundle

Portable python bundle for Windows
Python
3
star
16

what-the-frog

What The Frog? - a PyWeek 27 entry
Python
3
star
17

lzf

CFFI-based Python binding for LZF stream compression
Python
3
star
18

python-now

Interactive Python tutorial, in the browser
JavaScript
3
star
19

wasabi-scenegraph

Python
2
star
20

fake-news

A fake news generator
Python
2
star
21

infinisweeper

Infinite game of minesweeper
Python
2
star
22

empty

Empty files in various languages
2
star
23

wvec

A Python vector implementation in Rust
Rust
2
star
24

doodlr

Python
1
star
25

korovic

Python
1
star
26

heightfield

Python
1
star
27

murder

A murder mystery game for Pyweek 23
Python
1
star
28

difflib-talk

Python
1
star
29

snowgame

Snow fall game
Python
1
star
30

wasabi-peace

Python
1
star
31

battleships

Python
1
star
32

pep666

The anti-linter for Python code
Python
1
star
33

wor

Python
1
star
34

dojos10e01

Instagram-like filters with numpy and Pillow
Jupyter Notebook
1
star
35

bamboo-warrior

Python
1
star
36

jumpatron

A one-button jumping game made for the Rock Band drum kit
Python
1
star
37

tetrish

Something like tetris
1
star
38

moonbaseapollo

Python
1
star
39

art-attack

Python
1
star
40

python-loglab

Python
1
star
41

nucleon

Python
1
star
42

ldnpydojos7e10

Wikipedia bot
Python
1
star
43

gardenkingdom

Exploring Ren'Py
Ren'Py
1
star