An attempt at a physics engine