A riff on Erin Catto's box2D