- Newest
- Most votes
- Most comments
The behavior you're observing with Amazon GameLift FlexMatch is related to how the matchmaking service processes requests when there are no active game sessions and multiple players attempt to join in quick succession.
When you set minPlayers to 1 in your matchmaking ruleset, you're essentially allowing FlexMatch to create a match as soon as a single player is available. This can lead to the scenario you've described.
Here's what's likely happening:
-
When there are no active game sessions and two players try to join almost simultaneously, FlexMatch processes these requests independently.
-
For each player, FlexMatch sees that the minimum player requirement (1) is met, so it proceeds to create a new game session for each player separately.
-
This results in two separate game sessions being created, with one player in each, instead of matching the players together.
-
Once a game session is active, subsequent players will be matched to that existing session as you've observed.
This behavior occurs because FlexMatch is designed to create matches as quickly as possible when the minimum requirements are met, and it doesn't have a built-in mechanism to wait for potential additional players when minPlayers is set to 1.
To address this issue, you have a few options:
-
Increase minPlayers: Set minPlayers to 2 or higher in your ruleset. This will force FlexMatch to wait for at least two players before creating a match.
-
Implement a waiting period: In your game logic, you could implement a short waiting period before requesting a match. This gives more time for other players to join the queue.
-
Use FlexMatch's backfill functionality: If your game can start with one player but you want to add more as they become available, you can use FlexMatch's backfill feature to add players to existing game sessions.
-
Adjust your matchmaking configuration: You might want to tweak other parameters in your FlexMatch configuration to optimize for your specific use case, such as adjusting the maximum time to match or implementing more complex rules.
By implementing one or more of these strategies, you can better control how matches are created and reduce the likelihood of creating multiple single-player game sessions when multiple players are available.
Sources
Adding FlexMatch matchmaking - Amazon GameLift
How Amazon GameLift FlexMatch works - Amazon GameLift
FlexMatch rule set examples - Amazon GameLift
Relevant content
- asked a month ago
- asked 4 years ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated 2 years ago
- How do I troubleshoot a WorkSpaces Personal WorkSpace that fails to join an Active Directory domain?AWS OFFICIALUpdated a month ago
Ok, well suppose I set the minPlayers to 2, and 4 players try to simultaneously join a match? Would GameLift create other game sessions for players 3 and 4? My goal is to basically place players in a game session based on a certain criteria.