Mauvesoft

Programming games with Python

A talk I game to Hampshire Linux User Group was accompanied by this Box2D demo/slideshow.

Status
Unmaintained
Platform
OpenGL, Gloss, Box2D
Language
Python
Webpage
http://www.hantslug.org.uk/cgi-bin/wiki.pl?6March2010
Filed under
Games, Talks

Programming games with Python 1.0

Installation Instructions

This demo requires PyOpenGL and pyBox2D.

PyOpenGL should work from the distribution, but at the time of writing, pyBox2D is not packaged and the archive on the Python Package Index (PyPI) that would be installed with easy_install, does not compile.

Installing Box2D from SVN

You will need subversion installed to check out pyBox2D and swig which is required by the build process to generate the bindings. You will also need gcc and so on, and python development tools.

Under Debian/Ubuntu these would be provided by the packages build-essential, python-dev, swig and subversion.

  1. $ svn checkout http://pybox2d.googlecode.com/svn/trunk/ pybox2d
  2. $ cd pybox2d
  3. $ python setup.py build
  4. $ sudo python setup.py install

If you do not have root access or do not want to install pyBox2D into your system Python site-packages directory, replace step 4. with

  1. $ python setup.py install --user

Running this demo

Download the demo from the link below.

As well as Box2D as described above, the demo requires Pygameand PyOpenGL. (On Debian, run

$ sudo aptitude install python-pygame python-opengl

). Extract the archive, and from that directory, run

python talk.py

Then

To advance a slide/action, right click. Drag objects with the left mouse button. To quit, press Ctrl + Escape

To change screen resolution, specify the -r option at the commandline

python talk.py -r 1024x768

To run fullscreen, specify the -f option at the commandline

python talk.py -f

Downloads

Ian Brazier 9:25 p.m. 6th March 2010

Hi Dan

Just to say thanks, it works a treat...

Cheers
Ian

Add a comment

If you would like to leave a comment about this project, please complete the following form: