small changes to player movement

made game run when window lost focus.