Game Loop optimization