Sunday, July 11, 2010

2.1.0 Branch Status


How's everything? Make any games lately? Me? Oh, I'm still alive and kicking over here.

So anyway, here are some of the updates following my last post about r246 a good 6 months ago (all of those changes are still mostly true).

  • Updated to the latest Box2D svn, added loop/edge shapes (edges work, loops do not)
  • kwargs for all functions
  • Reworked the framework system to be more OO-friendly -- pyglet/pygame frameworks are derived from a base class now
  • Pyglet is basically working with the newest version 1.1.4 -- but it's got some major issues that need to be dealt with. If there are any Pyglet experts out there, let me know.
  • Added a PyQt4 framework with basic functionality. I have a few plans for it... [pictured above]
  • world.CreateCircleShape, world.CreatePolygonShape, and so on, which allow kwargs for both the shapes and the fixture, so that things like this are possible:
    world.CreatePolygonFixture(box=(1, 1), friction=0.2, density=1.0)

    remember that 'box' is a property from the polygon shape, and 'friction' and 'density' are from the fixture definition.
  • Experimental 'b2' namespace:
    > from Box2D.b2 import *
    > vec2(1,1)
  • CreateStaticBody and CreateDynamicBody, and other changes to CreateBody and CreateFixture. There's also world.Create*Joint(), body.CreateShapesFromFixtures, and probably some others
New tests:
  • Tiles
  • Pinball
  • CharacterCollision
  • Bullet
  • Most of the old ones, converted to the new style
Still needs a lot of work. But if you ever want this version to see the light of day, please do give it a try and let me know what you think (and of course if you have any issues, which you likely will):
% svn checkout pybox2d-svn

Also, given that the Box2D wiki has been down for ages, I guess it's a good time to find a new place to host a pybox2d wiki. Any recommendations?