기술 자료

지원

Matchmaker

Matchmaker

규칙 샘플

Apply example matching rules for common game scenarios like one-versus-one, team-based, and asymmetrical matches.
읽는 시간 3분최근 업데이트: 21일 전

다음은 다양한 유형의 매치를 생성하는 데 사용되는 규칙의 몇 가지 예시입니다.

1 대 1

{ "Name": "1v1", "BackfillEnabled": false, "MatchDefinition": { "Teams": [ { "Name": "Teams", "TeamCount": { "Min": 2, "Max": 2 }, "PlayerCount": { "Min": 1, "Max": 1 } } ] }}
다음 코드는 티켓과 플레이어 데이터의 예제입니다.
{ "queueName": "Default", "attributes": {}, "players": [{ "id": "swsqozxo6qxm9fmm38khh3tddv35", "customData": {} }]}

매치 내 모든 플레이어의 QoS가 동일

{ "Name": "1v1", "MatchDefinition": { "Teams": [ { "Name": "Teams", "TeamCount": { "Min": 2, "Max": 2 }, "PlayerCount": { "Min": 1, "Max": 1 } } ], "MatchRules": [ { "Name": "QoS", "Type": "Difference", "Source": "Players.QosResults.Latency", "Reference": 20, "Not": false, "EnableRule": true } ] }, "BackfillEnabled": false}
다음 코드는 티켓과 플레이어 데이터의 예제입니다.
{ "queueName": "Default", "attributes": {}, "players": [{ "id": "w4505uhp7ohr27di0ob9qdncaq5b", "customData": {}, "qosResults:":[ // list the regions supported by the fleet where the match will be allocated { "regionId": "61dd5b48-d24c-11ed-afa1-0242ac120002", "packetLoss": 0.8, "latency": 50 }, { "regionId": "cf32c6e1-46ff-4904-9a37-359fc66bf382", "packetLoss": 0.0, "latency": 10 } ] } ]}

5 대 5, Team Red 대 Team Blue

다음 코드에는 두 개의 아이템이 있습니다. 플레이어가 자신이 플레이할 팀을 선택한 상황입니다.
{ "Name": "5v5 - Red vs Blue", "MatchDefinition": { "Teams": [ { "Name": "Team Red", "TeamCount": { "Min": 1, "Max": 1 }, "PlayerCount": { "Min": 5, "Max": 5 }, "TeamRules": [ { "Name": "Team Red", "Type": "Equality", "Source": "Players.CustomData.Team", "Reference": "Red", "Not": false, "EnableRule": true } ] }, { "Name": "Team Blue", "TeamCount": { "Min": 1, "Max": 1 }, "PlayerCount": { "Min": 5, "Max": 5 }, "TeamRules": [ { "Name": "Team Blue", "Type": "Equality", "Source": "Players.CustomData.Team", "Reference": "Blue", "Not": false, "EnableRule": true } ] } ], "MatchRules": [] }, "BackfillEnabled": false}
다음 코드는 호환되는 티켓과 플레이어 데이터의 예제입니다.
{ "queueName": "Default", "attributes": {}, "players": [{ "id": "e16naw0e6cgm8kw3vimtxt9qmhva", "customData": { "Team": "Blue" } } ]}

60명의 플레이어

60명의 플레이어가 참여하는 매치이며, 팀 없이 진행되는 배틀 로얄 장르와 유사합니다. 매치 내에서 가장 오래된 티켓이 생성된 지 15초가 지나면 게임을 시작하기 위한 최소 플레이어 수가 30명으로 완화됩니다. 백필(backfill)이 활성화되어 매치가 생성된 후에도 플레이어가 매치에 참여할 수 있습니다.
{ "Name": "60 Players", "MatchDefinition": { "Teams": [ { "Name": "Team", "TeamCount": { "Min": 1, "Max": 1 }, "PlayerCount": { "Min": 60, "Max": 60, "Relaxations": [ { "Type": "RangeControl.ReplaceMin", "AgeType": "Oldest", "Value": 30, "AtSeconds": 15 } ] }, "TeamRules": [] } ], "MatchRules": [] }, "BackfillEnabled": true}
다음 코드는 호환되는 티켓과 플레이어 데이터의 예제입니다.
{ "queueName": "Default", "attributes": {}, "players": [{ "id": "x7e9zb9t1928r0zw8x5j1sxhowkl", "customData": {} } ]}

3명의 플레이어로 구성된 팀 20개

다음 샘플에는 정확히 3명의 플레이어로 구성된 팀이 20개 있습니다. 매치 내에서 가장 최근에 생성된 티켓이 생성된 지 15초가 지나면 게임을 시작하기 위한 최소 팀 수가 완화됩니다. 한 팀의 플레이어 수는 항상 3명입니다.
{ "Name": "20 teams of 3 players", "MatchDefinition": { "Teams": [ { "Name": "Team", "TeamCount": { "Min": 20, "Max": 20, "Relaxations": [ { "Type": "RangeControl.ReplaceMin", "AgeType": "Youngest", "Value": 10, "AtSeconds": 15 } ] }, "PlayerCount": { "Min": 3, "Max": 3, "Relaxations": [] }, "TeamRules": [] } ], "MatchRules": [] }, "BackfillEnabled": true}
다음 코드는 호환되는 티켓과 플레이어 데이터의 예제입니다.
{ "queueName": "Default", "attributes": {}, "players": [{ "id": "91isf42z1n95lpv52upxrjc4ttvj", "customData": {} } ]}

팀 내 모든 플레이어가 서로 다른 캐릭터를 선택

{ "Name": "20 teams of 3 players", "MatchDefinition": { "Teams": [ { "Name": "Team", "TeamCount": { "Min": 20, "Max": 20, "Relaxations": [] }, "PlayerCount": { "Min": 3, "Max": 3, "Relaxations": [] }, "TeamRules": [ { "Name": "Different characters", "Type": "Equality", "Source": "Players.CustomData.Character", "Not": true, "EnableRule": true } ] } ], "MatchRules": [] }, "BackfillEnabled": true}
다음 코드는 호환되는 티켓과 플레이어 데이터의 예제입니다.
{ "queueName": "Default", "attributes": {}, "players": [{ "id": "1v0wykm1d3edny8mcdnx53yr7wrg", "customData": { "Character":"Cloud" } } ]}

비대칭적 5 대 1 - Human 대 Monster

Human 팀의 모든 플레이어는 Human 값이
true
여야 합니다.
Monster 팀의 플레이어는 Monster 값이
true
여야 합니다.
이렇게 규칙을 작성하면 플레이어가 2개 이상의 역할을 선택할 수 있습니다.
{ "Name": "Asymmetrical 5v1", "MatchDefinition": { "Teams": [ { "Name": "Human", "TeamCount": { "Min": 1, "Max": 1, "Relaxations": [] }, "PlayerCount": { "Min": 5, "Max": 5, "Relaxations": [] }, "TeamRules": [ { "Name": "Human", "Type": "Equality", "Source": "Players.CustomData.Human", "Reference": "true", "Not": false, "EnableRule": true } ] }, { "Name": "Monster", "TeamCount": { "Min": 1, "Max": 1 }, "PlayerCount": { "Min": 1, "Max": 1 }, "TeamRules": [ { "Name": "Monster", "Type": "Equality", "Source": "Players.CustomData.Monster", "Reference": "true", "Not": false, "EnableRule": true } ] } ], "MatchRules": [] }, "BackfillEnabled": false}
다음 코드는 호환되는 티켓과 플레이어 데이터의 예제입니다.
{ "queueName": "Default", "attributes": {}, "players": [{ "id": "ngbbufcpbph227f42rpdv0v8zs75", "customData": { "Human": "true", "Monster": "false" } } ]}

매치에서 특정 역할의 최소 인원 요구

다음 규칙은 아래의 역할을 지닌 플레이어가 Human 팀에 포함되어야 한다고 요구합니다.
  • Medic 1명
  • Tank 2명
  • DPS 2명
{ "Name": "Asymmetrical 5v1", "MatchDefinition": { "Teams": [ { "Name": "Human", "TeamCount": { "Min": 1, "Max": 1, "Relaxations": [] }, "PlayerCount": { "Min": 5, "Max": 5, "Relaxations": [] }, "TeamRules": [ { "Name": "Human", "Type": "Equality", "Source": "Players.CustomData.Human", "Reference": "true", "Not": false, "EnableRule": true }, { "Name": "Medic", "Type": "GreaterThanEqual", "Source": "Players.CustomData.Medic.Sum", "Reference": 1, "Not": false, "EnableRule": true }, { "Name": "Tank", "Type": "GreaterThanEqual", "Source": "Players.CustomData.Tank.Sum", "Reference": 2, "Not": false, "EnableRule": true }, { "Name": "DPS", "Type": "GreaterThanEqual", "Source": "Players.CustomData.DPS.Sum", "Reference": 2, "Not": false, "EnableRule": true } ] }, { "Name": "Monster", "TeamCount": { "Min": 1, "Max": 1 }, "PlayerCount": { "Min": 1, "Max": 1 }, "TeamRules": [ { "Name": "Monster", "Type": "Equality", "Source": "Players.CustomData.Monster", "Reference": "true", "Not": false, "EnableRule": true } ] } ], "MatchRules": [] }, "BackfillEnabled": false}
다음 코드는 호환되는 티켓과 플레이어 데이터의 예제입니다.
{ "queueName": "Default", "attributes": {}, "players": [{ "id": "l142lvdrbuyox8lwxs5sfyt8lshv", "customData": { "Human": "true", "Monster": "false", "Medic": 1, // the role the player chose "Tank": 0, "DPS": 0 } } ]}

Lobby와 유사한 게임 서버

다음 규칙은 실행 중인 서버가 없을 때 누군가가 티켓을 생성하면 곧바로 게임 서버를 요청합니다. 실행 중인 서버가 있는 경우 Backfill이 해당 서버를 채웁니다.
{ "Name": "City", "MatchDefinition": { "Teams": [ { "Name": "City", "TeamCount": { "Min": 1, "Max": 1, "Relaxations": [] }, "PlayerCount": { "Min": 1, "Max": 100, "Relaxations": [] }, "TeamRules": [] } ], "MatchRules": [] }, "BackfillEnabled": true}
{ "queueName": "Default", "attributes": {}, "players": [{ "id": "cb108q26yxt3lldyjfg54p8uuayk", "customData": {} } ]}

플레이어가 거주 도시 선택 가능

매치 내 모든 플레이어의 도시가 동일해야 합니다. 해당 도시 내에서 매치를 찾지 못하면 Matchmaker가 해당 도시에 새로운 할당을 요청합니다.
{ "Name": "City", "MatchDefinition": { "Teams": [ { "Name": "City", "TeamCount": { "Min": 1, "Max": 1, "Relaxations": [] }, "PlayerCount": { "Min": 1, "Max": 100, "Relaxations": [] }, "TeamRules": [] } ], "MatchRules": [ { "Name": "City", "Type": "Equality", "Source": "Players.CustomData.City", "Not": false, "EnableRule": true } ] }, "BackfillEnabled": true}
다음 코드는 호환되는 티켓과 플레이어 데이터의 예제입니다.
{ "queueName": "Default", "attributes": {}, "players": [{ "id": "cb108q26yxt3lldyjfg54p8uuayk", "customData": { "City": "Azarel" } } ]}