Why does GKMatchmaking always find only the minimum number of players?

If three different devices try to find a match, then almost always only two users find a match, and the third one does not. I need that when searching for a match, all available players get there, not the minimum pair.


GKMatchRequest *request = [[GKMatchRequest alloc] init];
    request.minPlayers = 2;
    request.maxPlayers = 4;
    
    
GKMatchmaker *matchmaker = [GKMatchmaker sharedMatchmaker];
[matchmaker findMatchForRequest:request withCompletionHandler:^(GKMatch *match, NSError *error) {
        if (!match) {
            _print_v("match find automatch failed! match is null");
            return;
        }
        _print_v("im finded match!!!!! <<<<<<<<");
}];



If three different devices try to find a match, the almost always only two users find a match, and the third one does not.


All devices have a unique account. All three devices are physical (not virtual).

Even if the devices are on different networks, this does not solve the problem.


Very rarely, sometimes GameKit matches all devices in a match, but this happens once out of twenty when the search for a match at the same time.


I finish the match selection only in two minutes. During this time, the third player does not find a match.

I tried to search for a match at the same time. I tried to search for a match at intervals of five and ten seconds in turn.


How to solve this problem? 99% of guides and examples are designed for testing in pairs or show a demonstration in pairs. I have not found a single solution that would guarantee the work of more than the minimum number of opponents.


p.s.:a decision is also made on swift.

iPhone 14 Pro Max

Posted on Oct 13, 2023 7:19 AM

Reply

Similar questions

1 reply

Oct 13, 2023 8:24 AM in response to daryana192


daryana192 wrote:

If three different devices try to find a match, then almost always only two users find a match, and the third one does not. I need that when searching for a match, all available players get there, not the minimum pair.
How to solve this problem? 99% of guides and examples are designed for testing in pairs or show a demonstration in pairs. I have not found a single solution that would guarantee the work of more than the minimum number of opponents.


Maybe set this boolean differently? canStartWithMinimumPlayers | Apple Developer Documentation


If two players is permissible to start and two are available, I’d expect things to start…


Per Apple also indicates adding progressively, if you’ve not already tried that:

If you set this property to true, players can optionally start a multiplayer game when the minimum number of players accept their invitations. Design your game to progressively add additional players up to the maximum number of players. The default value for this property is false.

To set the minimum and maximum number of players, see Finding multiple players for a game.


If you’re stuck here—and this is a part of GameKit I haven’t used, Apple has technical one-on-one sessions available right now: View - Meet with Apple Experts - Apple Developer



Housekeeping info for those that might arrive at this thread later—and if it gets a better answer over there—this question is cross-posted to: https://stackoverflow.com/questions/77288154/why-does-gkmatchmaking-always-find-only-the-minimum-number-of-players


This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Why does GKMatchmaking always find only the minimum number of players?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.