backlinks to this page:
A zero-boilerplate games programming framework for Python 3, based on Pygame.
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.
See github link for some (beautiful) examples. To run the examples, type
It is also possible to modify pygamezero programs to run directly from python:
import pgzrun # ---- start of pgzero code --- # (replace with other example) WIDTH = 800 HEIGHT = 600 def draw(): screen.clear() screen.draw.circle((400, 300), 30, 'white') # -----end of pgzero code ---- # instead of typing 'pgzrun <filename>' use this python line: pgzrun.go()