game loop skeleton