Giter VIP home page Giter VIP logo

pgzero's Introduction

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

pgzero's People

Contributors

agiledata avatar arve0 avatar avaren avatar drobban avatar encukou avatar fkorling avatar funkyhat avatar geekjosh avatar kr1 avatar lordmauve avatar navi7 avatar ntoll avatar pawel-lewtak avatar r1chardj0n3s avatar takluyver avatar tjguk avatar tom-dalton-fanduel avatar xoliver avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.