Player input, gravity, and collisions