Matchmaking queue

0

Hello. I have this matchmaking configuration

{
    "name": "GOF-Matchmaking-6P",
    "ruleLanguageVersion": "1.0",
    "teams": [{
        "name": "Dragons",
        "minPlayers": 6,
        "maxPlayers": 6
    }],
    "playerAttributes": [{
        "name": "rank",
        "type": "number",
        "default": 0
    }],
    "rules": [{
        "name": "RankProximity",
        "type": "distance",
        "measurements": [ "avg(teams[*].players.attributes[rank])" ],
        "referenceValue": 0,
        "maxDistance": 20
    }],
    "expansions": [{
        "target": "teams[Dragons].minPlayers",
        "steps": [{
            "waitTimeSeconds": 10,
            "value": 5
        }, {
            "waitTimeSeconds": 30,
            "value": 4
        }, {
            "waitTimeSeconds": 60,
            "value": 3
        }, {
            "waitTimeSeconds": 90,
            "value": 2
        }]
    }, {
        "target": "rules[RankProximity].maxDistance",
        "steps": [{
            "waitTimeSeconds": 20,
            "value": 50
        }, {
            "waitTimeSeconds": 40,
            "value": 60
        }, {
            "waitTimeSeconds": 60,
            "value": 70
        }, {
            "waitTimeSeconds": 90,
            "value": 80
        }, {
            "waitTimeSeconds": 120,
            "value": 90
        }, {
            "waitTimeSeconds": 150,
            "value": 100
        }]
    }]
}

The matchmaking configuration is sending to SNS -> Lambda -> DynamoDB and from here I'm parsing the players to join the match. As you can see, there's a relax time and let's say for example, you have to wait for 90 seconds for the match to play with 2 players. (This if 2 players pressed the start button at the same time). This is all fine, after 90 seconds SNS is triggered and it updates the database and it shows me that 2 players were found and I can continue to travel to the server map. What I want is this. In case of 2 players are pressing the START button at the same time, SNS to send to the database right after, or to create already a potential match and if no one is pressing in the meantime, to start the match after 90 seconds. If, before 90 seconds are passed, a new player is pressing the START (to search for a match), to update the Potential Match to 3 players. Is this possible? I've seen in other games for example, that in the lobby are 2 players (and still waiting for other players) and in case no players are found, after 90 seconds to start the game with those 2 players only. Hope I made myself clear. Thank you!

zerox
asked 3 months ago812 views
1 Answer
0

To create a match with two players with room for additional players to join in the future (for example, for the next 90 seconds), you might find value in using Backfill (see https://docs.aws.amazon.com/gamelift/latest/flexmatchguide/match-backfill.html for more details). Have the matchmaking configuration create a valid match with a minimum of 2 players, and then you can backfill any open spots in the created match for the next 90 seconds. This can be achieved either via automatic Backfill or manually by calling StartMatchBackfill. Once 90 seconds has elapsed, call StopMatchmaking (for automatic Backfill) or StopMatchBackfill (for manual Backfill) and have the gameplay start.

AWS
answered 2 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions