tPhysics: A Multi-Touch Physics Sandbox

Lately I have been working on a Multi-Touch Physics application.  It is pretty much a big 2D physics sandbox, you can spawn new objects, make joints, then throw them at stuff.  Its written in Python, using Box2D for the Physics engine.  TouchPy is used for TUIO Parsing, and PyGame for graphical output.

It does support a ZUI, but it is not a “full ZUI”.  It does have simulation limits, so if an object happens to leave this limit it will freeze(as seen in video below).  It also does not implement the Gear Joint, but all the other joints are supported.

Its still in early development, so it has its share of bugs.  The biggest has to do with triangles.  When you choose to make an arbitrary polygon, it works fine with any number of vertices between 4 and 8, but once you try 3 weird things happen.  Half of the time it will work, and the other half it won’t.  Due to the way PyBox2D was coded, I can’t catch this error either(or any Box2D error, for that matter), so the program will unceremoniously exit.

Code can be had from the downloads page, and here is a video!

Advertisements

3 comments so far

  1. jimihertz on

    great job, Xela !
    your re on a great path !

  2. kne on

    You didn’t specify your errors, but perhaps they could be fixed by using the polygon definition-checking function: b2PolygonDef.checkValues()

  3. xelapondsstuff on

    Thank kne! Ill definitely look into that. I must admit I didn’t look over the Box2D Documentation very much:P


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: