Last Train To Nowhere: Day 3

Two features dropped today.

The first and greater is a pure-python physics engine built on geometry code from retrogamelib and Super Effective's vector. So for once I don't have to worry about people not being able to compile PyBox2D or Pymunk - I just have to worry about it being chuffing slow. It doesn't have a broad phase yet, but it does have a rough and ready collision solver. So what you're seeing here is the dude standing on a box that he can also push around (hence they are both highlighted green).

The other thing I landed was a basic character animation system, which as promised keeps most of the animation state in the scenegraph, loaded from JSON. A trick for entering up animation data was to set up a quick optparse-based script which modifies a JSON document. So I can add a new animation to pc.json by running:

python -f pc.json -n running -f 0.3 -a 69,14 pc-walk{1..8}.png

It doesn't modify anything you don't specify on the commandline, so I can add more animations or tweak one property of an animation quite easily. Effectively I can get structured data into the game without writing an complicated editor, writing a complicated parser, editing ugly data files by hand or running the risk of making syntax errors.

Here's a random shot of our chappy pushing a crate out of the back of the train just because he can:

(log in to comment)


I've also decided to write a simple pure python physics engine instead of relying on an external library for it.  Cheers!