combined resize and gameloop