player moving without lag and with top and bottom boundaries