Ported game loop