Personally, I would check collision before updating the screen. So your game loop would check gravity, then check collision, and apply it after all that, which would put your movement back to 0,...