Implement server-side physics

This implements server-side physics.