A Pygame framework that facilitates the creation and development of projects https://shampoo.ooo
Go to file
Frank Demarco c8f7d7785f old print formatted 2012-12-23 19:20:36 +09:00
pgfw old print formatted 2012-12-23 19:20:36 +09:00
.gitignore old print formatted 2012-12-23 19:20:36 +09:00
MANIFEST.in added distutils setup script 2012-08-25 00:05:25 -04:00
README sfx-path existence check 2012-12-16 22:41:43 +09:00
sample.py Initial commit 2012-07-05 17:21:49 +09:00
setup.py added distutils setup script 2012-08-25 00:05:25 -04:00

README

----------------
Pygame Framework
----------------

Classes that facilitate the creation of Pygame projects


Example
=======

Save and run the following script to create a project that redraws a square at a
random location every second.  This script is also written in the `sample.py`
file.

from time import sleep
from random import randint

from pgfw.Game import Game

class SampleGame(Game):

    square_width = 30

    # update is a special method that runs once every frame 
    def update(self):
        sleep(1)
        screen = self.get_screen()
        bounds = screen.get_size()
        screen.fill((0, 0, 0))
        screen.fill((255, 255, 255),
                    (randint(0, bounds[0]), randint(0, bounds[1]),
                     self.square_width, self.square_width))


if __name__ == '__main__':
    SampleGame().play()


License
=======

This software is dedicated to the public domain.  See
http://creativecommons.org/publicdomain/zero/1.0/ for details.


Todo
====

- Remove unecessary python libraries from windows build


Contact
=======

frank dot s dot demarco at gmail
http://usethematrixze.us