player movement optimalization