> For the complete documentation index, see [llms.txt](https://docs.edgegap.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.edgegap.com/docs.edgegap.com-ko/learn/matchmaking.md).

# 매치메이킹

매치메이킹을 빠르게 시작하고 다양한 장르의 예시 시나리오를 살펴보세요.

매치 기반 게임에서 매치메이킹의 일반적인 목표는:

* **다른 플레이어를 찾는 것** 지역, 지연, 실력 또는 게임 매개변수와 같은 기준에 따라;
* **서버를 검색하는 것** 사용 가능한 수용량\[또는 핑, 지역, 실력, 지도, 모드]에 따라 참가하기 위해;
* **새 서버를 시작하는 것** 기존 서버가 가득 찼거나 플레이어 기준을 충족하지 않을 경우.

플레이어 경험을 최우선으로 하며, 우리의 핵심 목표를 정의합니다:

* 높은 매치 채움률과 소셜 기능 통합(그룹으로 친구와 함께 플레이),
* 제어된 매치 품질(낮은 지연, 공유된 선호도)로 빠른 매치,
* 전 세계적으로 이용 가능한 신뢰할 수 있고 예측 가능한 매치메이킹 프로세스.

{% hint style="success" %}
또는 플레이어가 **지속적(항상 온라인) 서버를 선택하도록** 목록에서 [서버 브라우저](/docs.edgegap.com-ko/learn/server-browser.md).
{% endhint %}

다음 영상을 따라가며 Matchmaker 서비스 시작하기:

{% embed url="<https://youtu.be/HxtvzvJ1FTk>" %}

## ✔️ 준비

**이 서비스를 테스트하는 것은 전적으로 무료이며 신용카드가 필요하지 않습니다.**

무료 요금제는 각 재시작 후 공유 테스트 클러스터에서 최대 3시간의 런타임을 허용합니다.

이 튜토리얼은 다음을 이미 완료했다고 가정합니다:

* [Edgegap의 배포 모델을 이해한](https://docs.edgegap.com/docs.edgegap.com-ko/learn/pages/1e75126474c80b6c476cbd5e97b171fce5779d47#id-1.-just-in-time-deployment-dedicated-servers),
* Edgegap에 서버 애플리케이션을 배포한(게시한)[Unreal Engine](/docs.edgegap.com-ko/unreal-engine.md), [Unity](/docs.edgegap.com-ko/unity.md)),
* 게임 클라이언트에서 Edgegap의 서버에 성공적으로 연결한

### 매치메이킹 아키텍처

이 가이드는 다음에 초점을 맞춥니다 **매치메이킹 API와 백필 API**.

<figure><img src="/files/159d6faabb1b3b55c8864e32bfccf0d52ebd34c1" alt=""><figcaption></figcaption></figure>

매치메이킹이 관련될 때 중요한 데이터 흐름은 네 가지(4가지)가 있습니다:

1. [매치메이킹 API](/docs.edgegap.com-ko/learn/matchmaking/matchmaker-in-depth.md#matchmaking-api) **는 게임 클라이언트가 Matchmaker와 통신하는 데 사용됩니다:**
   1. 그룹 관리, 서버 할당 및 모니터링을 위해,
   2. 핑 측정을 위해 [핑 비콘](/docs.edgegap.com-ko/learn/orchestration/ping-beacons.md).
2. [배포](/docs.edgegap.com-ko/learn/orchestration/deployments.md) API는 Matchmaker가 귀하의 전용 서버를 배포, 확장 및 관리하는 데 사용됩니다.
3. [Netcode 전송](/docs.edgegap.com-ko/docs/sample-projects.md) 는 게임 클라이언트와 전용 서버 간 통신에 사용됩니다.
4. [심층 살펴보기](/docs.edgegap.com-ko/learn/matchmaking/matchmaker-in-depth.md#backfill-match) **실행 중인 서버에 플레이어를 교체하거나 추가하기 위해.**

{% hint style="info" %}
출시 후, **귀하의 매치메이커는 24/7 실행되어야 하며** 전 세계 플레이어가 서버에 참여할 수 있도록 보장합니다.
{% endhint %}

## 🍀 간단한 예시

간단한 예시로 시작하여 기본 매치메이킹 플레이어 흐름을 테스트하세요:

* 공유된 환경에서 매치메이커 인스턴스를 생성하고 [심층 살펴보기](/docs.edgegap.com-ko/learn/matchmaking/matchmaker-in-depth.md#hosting-cluster),
* 매치메이커에서 규칙과 설정을 정의하고 [심층 살펴보기](/docs.edgegap.com-ko/learn/matchmaking/matchmaker-in-depth.md#configuration),
* 를 사용해 플레이어 흐름을 테스트하고 티켓을 관리하기 [심층 살펴보기](/docs.edgegap.com-ko/learn/matchmaking/matchmaker-in-depth.md#matchmaking-api).

### 1. 무료 티어에서 설정

☑️ [무료 Edgegap 계정에 등록하세요](https://app.edgegap.com/auth/register) 그리고 다음을 여세요 [Matchmaker 대시보드 페이지](https://app.edgegap.com/matchmaker-management-v2/matchmakers/list).

☑️ 다음을 클릭하세요 **매치메이커 생성** 를 먼저 누른 다음 다음을 입력하세요:

* 매치메이커 이름 - 본인 참고용, 예: `quickstart-dev` ,
* Simple Example JSON 구성을 업로드하세요.

🍀 **Simple Example(최소 권장 구성):**

{% hint style="danger" %}
**애플리케이션을 변경해야 합니다** **`이름`**  **및** **`버전`**  **다음과 일치하도록** [앱 및 버전](/docs.edgegap.com-ko/learn/orchestration/application-and-versions.md).
{% endhint %}

<pre class="language-json"><code class="lang-json">{
  "version": "3.2.5",
  "inspect": true,
  "max_deployment_retry_count": 3,
  "profiles": {
    "simple-example": {
      "ticket_expiration_period": "5m",
      "ticket_removal_period": "1m",
      "group_inactivity_removal_period": "5m",
      "application": {
        "name": "<a data-footnote-ref href="#user-content-fn-1">my-game-server</a>",
        "version": "<a data-footnote-ref href="#user-content-fn-2">2024.01.30-16.23.00-UTC</a>"
      },
      "rules": {
        "initial": {
          "match_size": {
            "type": "player_count",
            "attributes": {
              "team_count": 1,
              "min_team_size": 2,
              "max_team_size": 2
            }
          },
          "beacons": {
            "type": "latencies",
            "attributes": {
              "difference": 100,
              "max_latency": 200
            }
          }
        },
        "expansions": {}
      }
    }
  }
}
</code></pre>

**문제 해결 및 FAQ:**

<details>

<summary><code>애플리케이션 구성은 프로필 XYZ에 대해 유효하지 않습니다.</code></summary>

* 다음을 찾을 수 없습니다 [앱 및 버전](/docs.edgegap.com-ko/learn/orchestration/application-and-versions.md)를 확인해 주세요 `애플리케이션`  값들.

</details>

<details>

<summary><code>'2024.01.30-16.23.00-UTC'용 Docker 이미지가 캐시되어 있지 않습니다.</code></summary>

[**🌟 종량제 요금제로 업그레이드하기**](https://app.edgegap.com/user-settings?tab=memberships) **잠금 해제하려면** [**캐싱을 통한 즉시 배포**](https://docs.edgegap.com/docs.edgegap.com-ko/learn/pages/1e75126474c80b6c476cbd5e97b171fce5779d47#id-1.-start-a-deployment)**.**

* 4GB 이상의 캐시되지 않은 이미지는 배포에 더 오랜 시간이 걸릴 수 있으며, 그로 인해 [/pages/1e75126474c80b6c476cbd5e97b171fce5779d47#id-4.-deployment-error](https://docs.edgegap.com/docs.edgegap.com-ko/learn/pages/1e75126474c80b6c476cbd5e97b171fce5779d47#id-4.-deployment-error "mention")입니다. 서버 이미지 크기 최적화를 고려하세요 ([언리얼 엔진](/docs.edgegap.com-ko/unreal-engine.md#optimize-server-build-size) / [Unity](/docs.edgegap.com-ko/unity.md#optimize-server-build-size)).
* 어쨌든 진행할 수 있으나 배포 시간을 테스트할 것을 권장합니다.

</details>

☑️ 유효성 검사 오류가 나타나지 않으면, 다음을 누르세요 **생성 및 시작** 그리고 프로세스가 완료될 때까지 기다리세요. 그러면 Simple Example 매치메이커와 함께 새 무료 클러스터가 시작됩니다.

✅ 이제 다음 단계로 진행할 수 있습니다.

### 2. 구성 살펴보기

Matchmaker에 업데이트를 릴리스할 때마다 새 버전은 [의미적 버전 관리](/docs.edgegap.com-ko/learn/matchmaking/matchmaker-in-depth.md#changelog) major.minor.patch 형식을 해석하여 변경 사항의 영향을 명확하게 전달합니다 `major.minor.patch`:

* 🔥 `major` 버전은 호환성 깨짐 변경을 포함하며 통합 검토가 필요합니다,
* 🌟 `minor` 버전은 상당한 하위 호환 개선을 포함합니다,
* 🩹 `patch` 버전은 버그 수정과 사소한 개선을 포함합니다.

[티켓 검사](/docs.edgegap.com-ko/learn/matchmaking/matchmaker-in-depth.md#matchmaking-api) 개발 중 가능한 매치메이킹 흐름을 더 잘 이해하고 디버그하기 위해. 실제 매치메이커에서는 inspect API를 비활성화하는 것을 권장합니다.

**일부** [**배포에서는 오류가 발생할 수 있습니다**](https://docs.edgegap.com/docs.edgegap.com-ko/learn/pages/1e75126474c80b6c476cbd5e97b171fce5779d47#id-4.-deployment-error)**.** 이를 해결하기 위해 배포를 최대 `max_deployment_retry_count` 회까지 자동으로 재시도합니다(클라이언트 확인 없이).

예기치 않은 클라이언트 충돌이나 버려진 티켓이 오래 남아 매치메이커 리소스를 차지하지 않도록, 매칭되지 않은 티켓은 다음 후 취소됩니다 `ticket_expiration_period` 상태가 다음으로 변경되도록 하여 `CANCELLED` 그리고 다음 후 영구적으로 삭제됩니다 `ticket_removal_period` .

{% hint style="info" %}
[Matchmaker가 매치 채움률을 극대화하고 대기 시간을 10초 미만으로 줄이는 방법을 알아보세요.](/docs.edgegap.com-ko/learn/matchmaking/matchmaker-in-depth.md#find-match)
{% endhint %}

우리 매치메이킹 로직의 핵심은 다음에서 구성됩니다 [심층 살펴보기](/docs.edgegap.com-ko/learn/matchmaking/matchmaker-in-depth.md#matchmaking-profiles). 각 프로필은 완전히 분리된 매치메이킹 대기열이며, 다음을 가리킵니다 [앱 및 버전](/docs.edgegap.com-ko/learn/orchestration/application-and-versions.md#app-versions) 사전 정의된 CPU 및 메모리(RAM) 리소스 양을 사용하여

[심층 살펴보기](/docs.edgegap.com-ko/learn/matchmaking/matchmaker-in-depth.md#matchmaking-rules) 초기 규칙 세트에서 플레이어가 함께 그룹화되기 위해 충족해야 하는 조건은 각각 세 가지 속성으로 정의됩니다:

* 원하는 이름, 예 - `매치 크기`,
* 규칙 유형, 연산자라고도 하며, 예 - `player_count`,
* 그리고 마지막으로 연산자 속성, 예: `team_count` 또는 `max_team_size`.

**플레이어 수 규칙**

이는 할당을 시작하기 위해 몇 명의 플레이어가 일치해야 하는지를 정의하는 특수 규칙입니다:

* `team_count` 팀 수를 의미하며, 1팀은 협동 또는 자유 경쟁 모드에 사용할 수 있습니다,
* `min_team_size` 팀당 최소 플레이어 수를 나타냅니다.
* `max_team_size` 팀당 최대 플레이어 수를 나타냅니다.

우리의 간단한 예시는 2명의 플레이어가 있는 협동 게임을 보여줍니다.

{% hint style="warning" %}
플레이어 수 규칙 **은 필수이며 한 번만 정의할 수 있습니다** 초기 구성 규칙에서.
{% endhint %}

**지연 시간 규칙**

**`지연 시간`** 플레이어 매치의 핑을 최적화하는 특별한 규칙입니다:

* 지연 시간이 높은 지역(임계값 초과)을 제거하여 클라이언트-서버 지연 시간을 줄이고,
* 지연 시간이 비슷한 플레이어를 그룹화하여 매치 공정성을 향상시킵니다(차이 이하).

<details>

<summary>규칙 예시: <code>비콘</code></summary>

`비콘` 다음으로 구성된 규칙 `"difference": 100, "max_latency": 200`  은 다음과 매칭됩니다:

:white\_check\_mark: Alice와 Bob은 매칭될 수 있습니다:

* Tokyo는 제외됩니다(>200 ms),
* Chicago의 지연 시간은 절대 차이 100 ms 이내입니다.

<table><thead><tr><th width="180">비콘 도시</th><th width="80">매치</th><th width="132">abs(A - B) [ms]</th><th width="164">Alice [ms]</th><th width="164">Bob [ms]</th></tr></thead><tbody><tr><td>Chicago</td><td><span data-gb-custom-inline data-tag="emoji" data-code="2705">✅</span></td><td>75.0</td><td>12.3</td><td>87.3</td></tr><tr><td>Los Angeles</td><td><span data-gb-custom-inline data-tag="emoji" data-code="274c">❌</span></td><td><a data-footnote-ref href="#user-content-fn-3">113.2</a> <span data-gb-custom-inline data-tag="emoji" data-code="274c">❌</span></td><td>145.6</td><td>32.4</td></tr><tr><td><del>Tokyo</del></td><td>해당 없음</td><td>해당 없음</td><td><a data-footnote-ref href="#user-content-fn-4"><del>233.2</del></a> <span data-gb-custom-inline data-tag="emoji" data-code="274c">❌</span></td><td><a data-footnote-ref href="#user-content-fn-4"><del>253.2</del></a> <span data-gb-custom-inline data-tag="emoji" data-code="274c">❌</span></td></tr></tbody></table>

:x: Alice와 Charlie는 절대 매칭되지 않습니다:

* 두 플레이어 모두에 대해 < 200 ms 지연 시간을 가진 비콘이 없습니다,
* Alice는 북아메리카 - 일리노이주에 살고,
* Charlie는 아시아 - 일본에 삽니다.

<table><thead><tr><th width="180">비콘 도시</th><th width="80">매치</th><th width="132">abs(A - B) [ms]</th><th width="164">Alice [ms]</th><th width="164">Charlie [ms]</th></tr></thead><tbody><tr><td><del>Chicago</del></td><td>해당 없음</td><td>해당 없음</td><td>12.3</td><td><a data-footnote-ref href="#user-content-fn-4"><del>215.6</del></a> <span data-gb-custom-inline data-tag="emoji" data-code="274c">❌</span></td></tr><tr><td><del>Los Angeles</del></td><td>해당 없음</td><td>해당 없음</td><td>145.6</td><td><a data-footnote-ref href="#user-content-fn-4"><del>238.3</del></a> <span data-gb-custom-inline data-tag="emoji" data-code="274c">❌</span></td></tr><tr><td><del>Tokyo</del></td><td>해당 없음</td><td>해당 없음</td><td><a data-footnote-ref href="#user-content-fn-4"><del>233.2</del></a> <span data-gb-custom-inline data-tag="emoji" data-code="274c">❌</span></td><td>24.2</td></tr></tbody></table>

</details>

{% hint style="warning" %}
규칙 `지연 시간`  입니다 **선택 사항이며 초기 구성에서 한 번만 정의할 수 있습니다** 규칙.
{% endhint %}

✅ 이제 다음 단계로 진행할 수 있습니다.

### 3. 인스턴스 세부 정보 검토

☑️ 초기화된 후 대시보드에서 새 매치메이커의 세부 정보를 검토하세요:

<figure><img src="/files/8cd2161c4be0825844de9d9d08d5d349328c908b" alt=""><figcaption></figcaption></figure>

* **상태** 서비스 상태를 나타내며, ONLINE, OFFLINE 또는 ERROR일 수 있습니다.
* **식별자** 문제 해결이 필요할 때 Edgegap 직원이 귀하의 매치메이커를 빠르게 찾는 데 도움이 됩니다.
* **시작 시각** 최신 업데이트 시간을 추적하는 데 유용할 수 있습니다.
* **크기** 다음 중 하나에 해당합니다 [요금제](https://edgegap.com/resources/pricing#matchmaker).
* **API URL** 게임 클라이언트와 게임 서버가 귀하의 매치메이커와 통신하는 데 사용됩니다.
* **Swagger URL** API 스키마를 살펴볼 수 있도록 제공하는 유용한 OpenAPI 사양 GUI입니다.
* **인증 토큰** 게임 클라이언트와 게임 서버가 인증에 사용하는 고유한 비밀 토큰입니다.

{% hint style="danger" %}
**Edgegap 직원은 절대 귀하의 토큰을 요구하지 않습니다. 보안 침해가 의심되면 토큰을 재생성하세요.**
{% endhint %}

새 매치메이커를 테스트하려면, **Swagger URL, API URL 및 인증 토큰이 필요합니다**.

✅ 이제 다음 단계로 진행할 수 있습니다.

{% hint style="info" %}
개발 중 매치메이커 규칙을 업데이트하려면, 구성을 수정하고 다시 시작하세요.
{% endhint %}

{% hint style="success" %}
를 참고하세요 [심층 살펴보기](/docs.edgegap.com-ko/learn/matchmaking/matchmaker-in-depth.md#rolling-updates-and-ab-tests) 라이브 게임 및 무중단 업데이트에 사용됩니다.
{% endhint %}

### 4. 티켓 API 테스트

{% hint style="info" %}
**최대 5분 동안 기다려 주세요** 매치메이커를 시작한 후 DNS 전파가 완료되도록 허용하세요.
{% endhint %}

☑️ 먼저, **Swagger URL을 여세요** Swagger GUI에서 OpenAPI 스키마를 검사하려면:

<figure><img src="/files/d987350db3682812751926494614b8f2f24ee382" alt=""><figcaption></figcaption></figure>

☑️ 다음을 클릭하세요 **승인** 🔒, 다음을 붙여넣고 **인증 토큰**, 그리고 다음을 클릭하여 확인하세요 **승인**.

<figure><img src="/files/c866ef79d11a370793fd6d9e58f0bb67cba5bad7" alt=""><figcaption></figcaption></figure>

☑️ 아래로 스크롤하여 **티켓 API** **- POST /tickets**, 펼친 다음 클릭하세요 **사용해 보기**.

<figure><img src="/files/3e8a63020cc8f4ea6b63d444ace07ff54997c92a" alt=""><figcaption></figcaption></figure>

☑️ 요청을 미리 보세요:

* 알림 `player_ip` 다음으로 설정됨 `null` - 이렇게 하면 Matchmaker가 요청에 자동으로 추가된 IP 주소를 사용합니다(다음 참조 [심층 살펴보기](/docs.edgegap.com-ko/learn/matchmaking/matchmaker-in-depth.md#server-to-server-api) 대안은 다음과 같습니다),
* `프로필` 귀하의 [심층 살펴보기](/docs.edgegap.com-ko/learn/matchmaking/matchmaker-in-depth.md#matchmaking-profiles),
* `attributes` 매치메이커 규칙의 값을 포함하세요. 이 경우 다음 규칙에 대해: `지연 시간` 규칙,
  * 규칙 `player_count` 플레이어 티켓에서 어떤 속성도 필요로 하지 않는 유일한 규칙입니다.

☑️ 다음을 클릭하세요 **실행** 그리고 플레이어 티켓 요청에 대한 응답을 검토하세요:

* `id` 고유한 매치메이킹 티켓 ID입니다. 나중에 티켓을 확인할 수 있도록 저장하세요,
* `프로필` 선택을 확인하는 [심층 살펴보기](/docs.edgegap.com-ko/learn/matchmaking/matchmaker-in-depth.md#matchmaking-profiles),
* `group_id` 고유한 [모든 티켓에 발급되는 그룹 ID이며, 솔로 플레이어는 1개의 그룹으로 표시됩니다](/docs.edgegap.com-ko/learn/matchmaking/matchmaker-in-depth.md#group-up),
* `team_id` 각 플레이어에게 발급되는 고유한 팀 ID입니다 `TEAM_FOUND` 상태에 도달한 후,
  * [각 팀은 여러 그룹을 포함할 수 있으며, 구성된 팀 크기를 초과하지 않습니다](/docs.edgegap.com-ko/learn/matchmaking/matchmaker-in-depth.md#matchmaking-rules),
* `player_ip` 식별 방법과 관계없이 플레이어의 확인된 공용 IP 주소입니다,
* `할당` 다음으로 설정됩니다 `null` 티켓이 서버와 매칭되거나 할당되지 않았음을 나타내기 위해,
* `created_at` 게임 UI 사용을 위해 플레이어 티켓이 생성된 시점에 대한 정보를 제공합니다,
* `상태` 티켓의 현재 상태를 나타내며, 모든 티켓은 다음 상태에서 시작합니다 `SEARCHING` .

<figure><img src="/files/a56747e58e23c576fac3cf9d88176a5088b83685" alt=""><figcaption></figcaption></figure>

☑️ 다음을 눌러 두 번째 티켓을 만드세요 **실행** 다시, 그러면 두 플레이어가 매칭되고 서버가 시작됩니다.

☑️ POST /tickets를 접고 다음을 여세요 **GET /tickets/{ticketId}**, 그런 다음 클릭하세요 **사용해 보기**.

☑️ 이전 단계의 응답에서 티켓 ID를 입력하고 다음을 클릭하세요 **실행**.

<figure><img src="/files/fbfe470ef61db30d8a7a1257722f4480ab4c92b7" alt=""><figcaption></figcaption></figure>

☑️ 플레이어 티켓에 대한 업데이트된 할당을 검토하세요:

* 상태가 다음으로 변경됨 `MATCH_FOUND` 먼저, 다음을 유지하면서 `할당` 다음으로 설정됨 `null` 플레이어가 매칭되었고 서버가 할당 중임을 나타내기 위해,

<figure><img src="/files/4095d1c0a9ba1161897a32fc97dfb482106bec0c" alt=""><figcaption></figcaption></figure>

☑️ 다음을 클릭하세요 **실행** 다시 눌러 티켓을 확인하고, 티켓의 업데이트된 할당을 검토하세요:

* 상태가 다음으로 변경됨 `HOST_ASSIGNED` 와 함께 `할당` 할당된 서버의 세부 정보를 포함합니다.

<figure><img src="/files/ae9ba66c87ea1a8a7e7ff6fbb097c848724336d7" alt=""><figcaption></figcaption></figure>

<details>

<summary>문제 해결 및 FAQ</summary>

내 티켓이 다음 상태에 멈춰 있습니다 `SEARCHING` .

* 구성에 맞게 겹치는 기준으로 충분한 티켓을 생성했는지 확인하세요.

***

내 티켓이 다음 사이를 반복적으로 전환하며 멈춰 있습니다 `MATCH_FOUND` 및 `TEAM_FOUND` 반복적으로.

* 무료 티어 계정은 한 번에 1개의 배포로 제한됩니다. 새 배포를 시작하려면 업그레이드하거나 현재 배포를 중지하는 것을 고려하세요.

***

내 티켓이 바로 다음으로 갑니다 `CANCELLED`.

* 티켓의 만료 시간이 지났습니다. 새 티켓을 다시 만들거나 테스트 목적으로 구성의 만료 기간을 늘리세요.

***

티켓을 확인할 때 HTTP 404 Not Found가 발생합니다.

* 티켓은 DELETE 요청으로 제거되었거나, 제거 기간에 도달해 삭제되었습니다(티켓 만료 후 시작되며, 구성에서 정의됨). 테스트 목적으로 새 티켓을 다시 만들거나 구성의 만료/제거 기간을 늘리세요.

</details>

☑️ [대시보드에서 새 배포를 검사하세요](https://app.edgegap.com/deployment-management/deployments/list):

* 추적성을 높이기 위해 각 배포에 모든 티켓 ID와 프로필이 태그로 지정됩니다.

<figure><img src="/files/d7ba1b2d7152d41c2a4627c952bc7721f51a0fd2" alt=""><figcaption></figcaption></figure>

매치를 찾은 후 몇 초가 지나면 멤버십은 다음으로 진행됩니다 `status:HOST_ASSIGNED`  이는 귀하의 [배포가 이제 준비되었고 게임 서버가 초기화 중임을 나타냅니다](https://docs.edgegap.com/docs.edgegap.com-ko/learn/pages/1e75126474c80b6c476cbd5e97b171fce5779d47#id-3.-deployment-ready).

각 플레이어는 자신의 `ticket_id`  및  `할당`  그리고 다음을 사용하여 연결을 시도합니다 [**FQDN**](#user-content-fn-5)[^5] **(배포 URL)** 그리고 **외부 포트**. 이 시점에는 게임 서버가 아직 초기화 중일 수 있으므로 **플레이어는 연결을 여러 번 다시 시도해야 합니다**, 일반적인 서버 초기화 시간을 넘길 때까지:

{% tabs %}
{% tab title="언리얼 엔진" %}
하려면 **PIE(에디터)에서 연결** 개발 및 테스트 중에는 틸드 키를 누르고 `~`  그리고 다음을 입력하세요 `open {URL}:{port}`  그리고 에디터가 맵을 로드할 때까지 기다립니다.

하려면 **게임 클라이언트 빌드에서 연결** (실제 운영 환경에서는) 다음을 시도하세요

* 언리얼 엔진 [⚡ 통합 키트](https://docs.edgegap.com/learn/unreal-engine-games/developer-tools#integration-kit):
  * [Fab 마켓플레이스에서 설치](https://www.fab.com/listings/ff17ad88-12a1-49cf-9a41-31695ed11e16) (개인용은 무료),
  * [간단한 예제 블루프린트를 가져와](https://blueprintue.com/blueprint/m33u1okj/) 필요에 맞게 사용자 지정하세요.

{% hint style="success" %}
연결 실패 또는 검은 화면이 발생한 경우 다음을 참고하세요 [문제 해결 가이드](/docs.edgegap.com-ko/unreal-engine.md#troubleshooting-and-faq).
{% endhint %}
{% endtab %}

{% tab title="유니티" %}
하려면 **Unity 에디터를 연결하세요** 또는 **게임 클라이언트** 클라우드 배포에 다음을 입력하세요:

* **배포** **URL** 서버 IP를 가리키며, 보통 다음에 있습니다 `NetworkManager` 컴포넌트.
* **외부 포트** 다음에 매핑되며 [서버의 내부 리슨 포트](/docs.edgegap.com-ko/learn/orchestration/application-and-versions.md#port-mapping), 보통 Transport 컴포넌트에 있습니다.

{% hint style="success" %}
연결 시간 초과 또는 기타 문제가 발생하면 다음을 참고하세요 [문제 해결 가이드](/docs.edgegap.com-ko/unity.md#troubleshooting-and-faq-4).
{% endhint %}
{% endtab %}
{% endtabs %}

{% hint style="info" %}
저희는 플레이어에게 매치 확인을 요구하지 않습니다. 가능한 한 짧은 시간 안에 게임플레이에 진입하고, 높은 매치 충원율을 제공하며, 큐 회피와 매치 취소를 최소화하는 것을 목표로 하기 때문입니다.
{% endhint %}

게임 클라이언트는 **게임 재시작 사이에 할당 ID를 영구적으로 저장해야 하며**, 게임 클라이언트가 충돌한 경우 연결 정보를 가져와 재연결을 시도할 수 있도록 해야 합니다.

☑️ 게임 클라이언트에서 할당된 서버에 연결해 보세요.

{% hint style="warning" %}
지연 시간이 높다면, netcode 통합이 네트워크 지연을 시뮬레이션하도록 구성되어 있을 수 있습니다. **테스트할 때 VPN을 비활성화하세요** 더 현실적인 조건을 위해 다음을 받고 [저지연 배포](/docs.edgegap.com-ko/learn/orchestration/deployments.md#server-placement).
{% endhint %}

☑️ 배포에 문제 없이 연결할 수 있고 테스트를 마쳤음을 확인한 후, **배포를 중지하세요** 다음 빌드를 위해 계정의 용량을 확보하세요.

✅ 이제 다음 단계로 진행할 수 있습니다.

{% hint style="info" %}
테스트용 OpenAPI 사양은 다음에서 찾을 수 있습니다 `{matchmaker-url}/swagger/v1/swagger.json`.
{% endhint %}

### 5. 게임 통합

Matchmaker는 다음과 통합됩니다:

* **게임 클라이언트**, 다음을 위해 [그룹, 멤버십, 할당 및 티켓을 관리](/docs.edgegap.com-ko/learn/matchmaking/matchmaker-in-depth.md#group-up),
* **전용 서버**, 다음을 위해 [심층 살펴보기](/docs.edgegap.com-ko/learn/matchmaking/matchmaker-in-depth.md#backfill-match) 플레이어가 떠난 후.

☑️ 다음에서 **게임 클라이언트**최상의 플레이어 경험을 위해 게임 내 UI를 사용하여 플레이어에게 티켓 상태 업데이트를 제공하는 것을 권장합니다. 다음을 참조하세요:

* Unity [개발자 도구](/docs.edgegap.com-ko/unity/developer-tools.md#software-development-kit):
  * [Unity 패키지 관리자를 사용하여 무료로 패키지 설치](https://github.com/edgegap/edgegap-unity-sdk),
  * [시작 가이드와 완전한 예제를 살펴보세요](/docs.edgegap.com-ko/unity/matchmaking.md).
* 언리얼 엔진 [개발자 도구](/docs.edgegap.com-ko/unreal-engine/developer-tools.md#integration-kit):
  * [문서를 읽어보세요](https://egik.betide.studio/) Betide Studios 제공,
  * [Fab 마켓플레이스에서 설치](https://www.fab.com/listings/ff17ad88-12a1-49cf-9a41-31695ed11e16) (개인 용도는 무료),
  * [간단한 예제 블루프린트 가져오기](https://blueprintue.com/blueprint/m33u1okj/) (매치메이킹)을 자신의 필요에 맞게 커스터마이즈하세요.

☑️ 다음에서 **게임 클라이언트**, 재시도 가능한 `429 Too Many Requests`  오류는 지수적 백오프와 재시도로 처리하여 갑작스러운 트래픽 급증 동안 매치메이커가 복구할 시간을 주세요.

☑️ 다음에서 **게임 클라이언트**, 재시도 불가능한 오류를 처리하고 있는지 확인하세요:

* `404 Not Found` - 티켓이 삭제되었습니다,
* `500 Internal Server Error` - 일시적인 서비스 중단.

☑️ 다음에서 **게임 서버**, 플레이어 환경설정과 초기 서버 컨텍스트를 읽으세요:

1. [주입된 변수(매치메이커)](/docs.edgegap.com-ko/learn/matchmaking/matchmaker-in-depth.md#injected-environment-variables) **초기 플레이어의 매치메이킹 데이터를 검색하기 위해.**
2. [주입된 변수(앱 버전)](/docs.edgegap.com-ko/learn/orchestration/application-and-versions.md#other-parameters-optional) 버전 매개변수, 설정 및 비밀값용.
3. [주입된 변수(배포)](/docs.edgegap.com-ko/learn/orchestration/deployments.md#injected-environment-variables) 배포 정보, IP, 위치 등을 위해...

{% hint style="info" %}
)과 각 내부 포트에 대한 외부 포트가 할당됩니다. [C#의 GetEnvironmentVariable](https://learn.microsoft.com/en-us/dotnet/api/system.environment.getenvironmentvariable?view=net-8.0) 또는 [C++의 GetEnvironmentVariable](https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/Core/GenericPlatform/FGenericPlatformMisc/GetEnvironmentVariable) 변수 값을 얻기 위해.
{% endhint %}

☑️ 플레이어가 연결되면, **게임 서버 및 게임 클라이언트** 로딩 장면을 시작하세요 - 3D 장면, 로비와 같은 소셜 UI 또는 진행률 표시줄이 있는 로딩 화면을 통해 초기화가 진행 중임을 나타냅니다.

☑️ 귀하의 [배포는 중지됩니다](https://docs.edgegap.com/docs/deployment#stop-a-deployment) 매치가 종료되면 올바르게.

🙌 축하합니다, 매치메이킹 통합을 완료했습니다! 더 알아보려면 계속 읽어보세요.

## 🏁 고급 예시

다음을 포함한 모든 매치메이킹 기능을 활용하는 완전한 구성은 [심층 살펴보기](/docs.edgegap.com-ko/learn/matchmaking/matchmaker-in-depth.md#matchmaking-profiles), [심층 살펴보기](/docs.edgegap.com-ko/learn/matchmaking/matchmaker-in-depth.md#matchmaking-rules) 및 [심층 살펴보기](/docs.edgegap.com-ko/learn/matchmaking/matchmaker-in-depth.md#rule-expansion) 다음과 같을 수 있습니다:

<details>

<summary>🏁 고급 예제 (완전한 예제 구성)</summary>

```json
{
  "version": "3.2.5",
  "inspect": true,
  "max_deployment_retry_count": 3,
  "allowed_cors_origins": [
    "https://*.my-game-server.com"
  ],
  "profiles": {
    "advanced-example": {
      "ticket_expiration_period": "5m",
      "ticket_removal_period": "1m",
      "group_inactivity_removal_period": "5m"
      "application": {
        "name": "my-game-server",
        "version": "2024.01.30-16.23.00-UTC"
      },
      "rules": {
        "initial": {
          "match_size": {
            "type": "player_count",
            "attributes": {
              "team_count": 1,
              "min_team_size": 4,
              "max_team_size": 4
            }
          },
          "beacons": {
            "type": "latencies",
            "attributes": {
              "difference": 125,
              "max_latency": 125
            }
          },
          "elo_rating": {
            "type": "number_difference",
            "attributes": {
              "max_difference": 50
            }
          },
          "selected_game_mode": {
            "type": "string_equality"
          },
          "selected_map": {
            "type": "intersection",
            "attributes": {
              "overlap": 1
            }
          },
          "backfill_group_size": {
            "type": "intersection",
            "attributes": {
              "overlap": 1
            }
          }
        },
        "expansions": {
          "30": {
            "elo_rating": {
              "max_difference": 150
            },
            "beacons": {
              "difference": 125,
              "max_latency": 250
            }
          },
          "60": {
            "elo_rating": {
              "max_difference": 200
            }
          },
          "180": {
            "match_size": {
              "team_count": 1,
              "min_team_size": 1,
              "max_team_size": 4
            },
            "beacons": {
              "difference": 99999,
              "max_latency": 99999
            }
          }
        }
      }
    }
  }
}
```

</details>

## 🥛 백필 쇼케이스

다음을 기반으로 [#simple-example](#simple-example "mention"), 이 구성은 다음을 보여줍니다 [백필](/docs.edgegap.com-ko/learn/matchmaking/matchmaker-in-depth.md#backfill-match) 와 함께 [그룹](/docs.edgegap.com-ko/learn/matchmaking/matchmaker-in-depth.md#group-up).

<details>

<summary><span data-gb-custom-inline data-tag="emoji" data-code="1f95b">🥛</span> 백필 구성 예시</summary>

```json
{
  "version": "3.2.5",
  "inspect": true,
  "max_deployment_retry_count": 3,
  "profiles": {
    "backfill-example": {
      "ticket_expiration_period": "30s",
      "ticket_removal_period": "1m",
      "group_inactivity_removal_period": "5m",
      "application": {
        "name": "my-game-server",
        "version": "2024.01.30-16.23.00-UTC"
      },
      "rules": {
        "initial": {
          "match_size": {
            "type": "player_count",
            "attributes": {
              "team_count": 1,
              "min_team_size": 4,
              "max_team_size": 4
            }
          },
          "beacons": {
            "type": "latencies",
            "attributes": {
              "difference": 100,
              "max_latency": 200
            }
          },
          "backfill_group_size": {
            "type": "intersection",
            "attributes": {
              "overlap": 1
            }
          }
        },
        "expansions": {}
      }
    }
  }
}
```

</details>

선택적으로, 일부 게임에는 다음과 같은 특수 매치메이킹 요구 사항이 있을 수 있습니다:

* 새로운 플레이어가 진행 중인 게임에 참여할 수 있도록 허용(친구 또는 "랜덤"),
* 서버 시작 후 이탈한 플레이어(이탈자)를 교체하여 매치를 다시 시작하지 않도록 함,
* 관전자가 토너먼트나 친구의 경기(e스포츠)에 참가하여 관전할 수 있도록 허용,
* 더 큰 서버에 플레이어를 집중시켜 더 많은 사회적 상호작용을 제공(MMO).

백필은 **현재 서버에 연결된 플레이어를 나타내는 서버 소유 티켓입니다.** 이를 통해 새로 추가된 플레이어가 현재 플레이어와 매칭될 때 매치메이킹 규칙을 준수하게 됩니다.

{% hint style="warning" %}
[심층 살펴보기](/docs.edgegap.com-ko/learn/matchmaking/matchmaker-in-depth.md#backfill-match) Seat/Match 세션을 대체하기 위해. Matchmaker는 Default 세션만 지원합니다.
{% endhint %}

<figure><img src="/files/47837c533d96b73ac8e1e55fc7d20b934d50dfe4" alt=""><figcaption><p>백필 시나리오 시각화</p></figcaption></figure>

{% hint style="success" %}
**백필은 무시합니다** `player_count`  **규칙을 적용하지 않으며, 항상 정확히 하나의 그룹과 매칭합니다**. `backfill_group_size`  라운드 로빈 전략으로 팀 수용 인원을 제어하여, 팀을 균등하고 통제된 방식으로 채웁니다.
{% endhint %}

**성공적인 백필을 완료하는 단계는 다음과 같습니다:**

1. 서버는 플레이어가 부족한 각 팀마다 하나의 백필을 생성하며, 다음 값들을 사용합니다:
   * 실제 `할당`  에서 가져온 데이터 [배포](/docs.edgegap.com-ko/learn/orchestration/deployments.md#injected-environment-variables) (배포).
   * 현재 연결된 플레이어의 `티켓`:
     * 에서 [심층 살펴보기](/docs.edgegap.com-ko/learn/matchmaking/matchmaker-in-depth.md#injected-variables) (매치메이커), 이전 백필의 `assigned_ticket` 응답, 또는 특정 플레이어에 맞게 조작된 모의 데이터,
     * 교체 `backfill_group_size`  값을 가능한 그룹 크기로 [사용 가능한 수용 인원까지](#user-content-fn-6)[^6],
2. 게임 클라이언트는 새 티켓(멤버십)을 생성하고 다음을 포함합니다 `backfill_group_size`  값:
   * `"1"`  플레이어가 혼자 매치메이킹하는 경우.
   * [`"2"`  플레이어가 총 2x명으로 구성된 매치메이킹 그룹의 일부인 경우](#user-content-fn-7)[^7].
   * `"new"`  플레이어가 진행 중인 게임에 참여하는 것 외에도 새 게임 시작을 활성화한 경우.
3. 게임 클라이언트는 계속해서 [심층 살펴보기](/docs.edgegap.com-ko/learn/matchmaking/matchmaker-in-depth.md#find-match) 그리고 플레이어를 일치하는 백필과 매칭합니다.
4. 백필된 그룹이 팀을 완전히 채우지 못하면, 서버는 새로 백필된 플레이어의 티켓으로 이 과정을 반복하여 더 많은 플레이어를 추가하고 원하는 팀 규모에 도달할 수 있습니다.

{% hint style="success" %}
백필은 팀 크기 규칙을 무시하며 항상 1x 백필과 1x 그룹을 매칭합니다. **백필하고만 매칭하고 대기열의 다른 플레이어와의 매칭을 비활성화하려면 다음을 설정하세요 `min_team_size: 999999` .**
{% endhint %}

<details>

<summary>🥛 백필 예시 (백필 쇼케이스)</summary>

```json
{
  "profile": "backfill-example",
  "attributes": {
    "할당": {
      "request_id": "cd28e6c66554",
      "fqdn": "cd28e6c66554.pr.edgegap.net",
      "public_ip": "192.168.2.14",
      "ports": {
        "game": {
          "internal": 7777,
          "external": 56890,
          "link": "cd28e6c66554.pr.edgegap.net:56890",
          "protocol": "UDP"
        },
        "web": {
          "internal": 22,
          "external": 57440,
          "link": "cd28e6c66554.pr.edgegap.net:57440",
          "protocol": "TCP"
        },
        "server": {
          "internal": 80,
          "external": 50110,
          "link": "cd28e6c66554.pr.edgegap.net:50110",
          "protocol": "TCP"
        }
      },
      "location": {
        "city": "몬트리올",
        "country": "캐나다",
        "continent": "북아메리카",
        "administrative_division": "퀘벡",
        "timezone": "America/Toronto"
      }
    }
  },
  "tickets": {
    "c3d057h5h6f7j889fk43": {
      "player_ip": "174.25.48.238",
      "attributes": {
        "beacons": {
          "뉴욕": 12.2,
          "로스앤젤레스": 45.3,
          "파리": 78.3
        },
        "backfill_group_size": [
          "2",
          "1"
        ]
      },
      "group_id": "192bb97e-7fd6-4d86-8ce4-61c53c9fef16",
      "id": "c3d057h5h6f7j889fk43",
      "created_at": "2024-08-20T13:38:05.251393+00:00"
    },
    "cqg0bg9583s738h9dkf6": {
      "player_ip": "217.34.85.142",
      "attributes": {
        "beacons": {
          "뉴욕": 21.0,
          "로스앤젤레스": 30.2,
          "파리": 101.1
        },
        "backfill_group_size": [
          "2",
          "1"
        ]
      },
      "group_id": "aea7df3c-d391-4ea3-a3ec-dded422fe7c8",
      "id": "cqg0bg9583s738h9dkf6",
      "created_at": "2024-08-20T13:38:05.251393+00:00"
    }
  },
  "assigned_ticket": null
}
```

</details>

<details>

<summary>🥛 백필 할당 예시 (백필 쇼케이스)</summary>

```json
{
  "profile": "backfill-example",
  "attributes": {
    "할당": {
      "request_id": "cd28e6c66554",
      "fqdn": "cd28e6c66554.pr.edgegap.net",
      "public_ip": "192.168.2.14",
      "ports": {
        "game": {
          "internal": 7777,
          "external": 56890,
          "link": "cd28e6c66554.pr.edgegap.net:56890",
          "protocol": "UDP"
        },
        "web": {
          "internal": 22,
          "external": 57440,
          "link": "cd28e6c66554.pr.edgegap.net:57440",
          "protocol": "TCP"
        },
        "server": {
          "internal": 80,
          "external": 50110,
          "link": "cd28e6c66554.pr.edgegap.net:50110",
          "protocol": "TCP"
        }
      },
      "location": {
        "city": "몬트리올",
        "country": "캐나다",
        "continent": "북아메리카",
        "administrative_division": "퀘벡",
        "timezone": "America/Toronto"
      }
    }
  },
  "tickets": {
    "c3d057h5h6f7j889fk43": {
      "player_ip": "174.25.48.238",
      "attributes": {
        "beacons": {
          "뉴욕": 12.2,
          "로스앤젤레스": 45.3,
          "파리": 78.3
        },
        "backfill_group_size": [
          "2",
          "1"
        ]
      },
      "group_id": "192bb97e-7fd6-4d86-8ce4-61c53c9fef16",
      "id": "c3d057h5h6f7j889fk43",
      "created_at": "2024-08-20T13:38:05.251393+00:00"
    },
    "cqg0bg9583s738h9dkf6": {
      "player_ip": "217.34.85.142",
      "attributes": {
        "beacons": {
          "뉴욕": 21.0,
          "로스앤젤레스": 30.2,
          "파리": 101.1
        },
        "backfill_group_size": [
          "2",
          "1"
        ]
      },
      "group_id": "aea7df3c-d391-4ea3-a3ec-dded422fe7c8",
      "id": "cqg0bg9583s738h9dkf6",
      "created_at": "2024-08-20T13:38:05.251393+00:00"
    }
  },
  "assigned_ticket": {
    "profile": "backfill-example",
    "player_ip": "244.13.201.244",
    "attributes": {
      "beacons": {
        "뉴욕": 30.2,
        "로스앤젤레스": 10.5,
        "파리": 123.9
      },
      "backfill_group_size": [
        "new",
        "1"
      ]
    },
    "id": "cqg0bg550h7uujd77khg",
    "group_id": "e0cf41c0-f88f-456e-a032-03b1d6821a9a",
    "created_at": "2024-08-20T13:38:08.251393+00:00",
    "status": "HOST_ASSIGNED"
  }
}
```

</details>

{% hint style="info" %}
를 참고하세요 [미러 좌석 관리](https://docs.edgegap.com/docs/sample-projects/mirror-on-edgegap#bonus-seat-sessions-management) 및 [FishNet 좌석 관리](https://docs.edgegap.com/docs/sample-projects/fishnet-on-edgegap#bonus-seat-sessions-management) 용 **플레이어 연결 모니터링**.
{% endhint %}

## ⚔️ 경쟁 게임

경쟁 게임은 개인(모두 대 모두) 또는 팀으로서 서로 경쟁하여 승리를 달성하는 데 초점을 맞춥니다. 비슷한 실력 수준의 플레이어나 팀을 짝지어 공정하고 균형 잡힌 매치를 보장하고, 공정한 경쟁을 빠르게 찾아 게임 진행 속도를 유지하세요.

<details>

<summary>⚔️ 경쟁 게임 예시</summary>

```json
{
  "version": "3.2.5",
  "inspect": true,
  "max_deployment_retry_count": 3,
  "profiles": {
    "casual-example": {
      "ticket_expiration_period": "5m",
      "ticket_removal_period": "1m",
      "group_inactivity_removal_period": "5m",
      "application": {
        "name": "my-game-server",
        "version": "2024.01.30-16.23.00-UTC"
      },
      "rules": {
        "initial": {
          "match_size": {
            "type": "player_count",
            "attributes": {
              "team_count": 2,
              "min_team_size": 5,
              "max_team_size": 5
            }
          },
          "beacons": {
            "type": "latencies",
            "attributes": {
              "difference": 125,
              "max_latency": 150
            }
          },
          "selected_maps": {
            "type": "intersection",
            "attributes": {
              "overlap": 1
            }
          },
          "backfill_group_size": {
            "type": "intersection",
            "attributes": {
              "overlap": 1
            }
          }
        },
        "expansions": {
          "30": {
            "beacons": {
              "difference": 125,
              "max_latency": 250
            }
          },
          "180": {
            "beacons": {
              "difference": 99999,
              "max_latency": 99999
            }
          }
        }
      }
    },
    "competitive-example": {
      "ticket_expiration_period": "5m",
      "ticket_removal_period": "1m",
      "group_inactivity_removal_period": "5m"
      "application": {
        "name": "my-game-server",
        "version": "2024.01.30-16.23.00-UTC"
      },
      "rules": {
        "initial": {
          "match_size": {
            "type": "player_count",
            "attributes": {
              "team_count": 2,
              "min_team_size": 5,
              "max_team_size": 5
            }
          },
          "beacons": {
            "type": "latencies",
            "attributes": {
              "difference": 125,
              "max_latency": 150
            }
          },
          "versus_ranks": {
            "type": "intersection",
            "attributes": {
              "overlap": 1
            }
          }
        },
        "expansions": {
          "120": {
            "beacons": {
              "difference": 125,
              "max_latency": 250
            }
          }
        }
      }
    },
    "challenger-example": {
      "ticket_expiration_period": "5m",
      "ticket_removal_period": "1m",
      "group_inactivity_removal_period": "5m"
      "application": {
        "name": "my-game-server",
        "version": "2024.01.30-16.23.00-UTC"
      },
      "rules": {
        "initial": {
          "match_size": {
            "type": "player_count",
            "attributes": {
              "team_count": 2,
              "min_team_size": 5,
              "max_team_size": 5
            }
          },
          "beacons": {
            "type": "latencies",
            "attributes": {
              "difference": 125,
              "max_latency": 150
            }
          },
          "elo_rating": {
            "type": "number_difference",
            "attributes": {
              "max_difference": 50
            }
          }
        },
        "expansions": {
          "120": {
            "beacons": {
              "difference": 125,
              "max_latency": 250
            }
          }
        }
      }
    }
  }
}
```

</details>

다음을 **1명 이상의 플레이어로 여러 팀을 정의할 수 있습니다**, 예를 들면:

<table><thead><tr><th width="300">게임 모드</th><th>팀 수</th><th>팀 크기</th><th>총 플레이어 수</th></tr></thead><tbody><tr><td>5대5 FPS</td><td>2</td><td>5</td><td><strong>10</strong></td></tr><tr><td>5대5 MOBA</td><td>2</td><td>5</td><td><strong>10</strong></td></tr><tr><td>20x3 배틀 로얄</td><td>20</td><td>3</td><td><strong>60</strong></td></tr><tr><td>10명 자유 대전</td><td>1</td><td>10</td><td><strong>10</strong></td></tr></tbody></table>

다음을 정의하세요 [심층 살펴보기](/docs.edgegap.com-ko/learn/matchmaking/matchmaker-in-depth.md#matchmaking-profiles) 게임 모드별 규칙과 설정을 위해, 그리고 [필요에 따라 확장하세요](/docs.edgegap.com-ko/learn/matchmaking/matchmaker-in-depth.md#rule-expansion).

* **모든 매치에 대해:**
  * 제한하세요 [매치메이킹 지연 시간](/docs.edgegap.com-ko/learn/matchmaking/matchmaker-in-depth.md#ping-optimization) 멀리 떨어진 플레이어와의 매칭을 방지하기 위해,
  * [심층 살펴보기](/docs.edgegap.com-ko/learn/matchmaking/matchmaker-in-depth.md#group-up) 사전 제작된 파티를 위해 그리고 팀 크기를 초과하지 않도록,
  * 더 많은 플레이어를 찾기 위해 시간이 지남에 따라 지연 시간 제한을 점진적으로 완화하세요,
  * 다른 [앱 및 버전](/docs.edgegap.com-ko/learn/orchestration/application-and-versions.md#app-versions) 특정 프로필에 대해 더 많은 CPU 또는 메모리를 할당하세요,
* **캐주얼 매치의 경우:**
  * 매치 속도와 매치 채움률을 극대화하기 위해 등급 제한을 생략하고,
  * 모두에게 적합한 맵을 찾기 위해 플레이어가 지도 선호도를 제공하도록 하고,
  * 팀 크기를 초과하지 않으면서 떠난 사람을 대체할 백필 그룹 크기를 지정하고,
  * 3분(180초) 대기 후 매치를 보장하기 위해 지연 시간 제한을 제거합니다.
* **경쟁 매치의 경우:**
  * 비슷한 실력의 상대만 허용하도록 등급을 제한하고,
  * 리그 등급 극단에 있는 플레이어를 매칭하기 위해 승급 또는 강등 등급을 사용하고.
* **상위 1% 고실력 매치(도전자)의 경우:**
  * 매치에서 실력 분포를 세밀하게 제어하기 위해 수치형 실력 점수(ELO)를 사용하고,
  * 플레이어 수가 적기 때문에 지연 시간 요구사항을 완화하기 전에 더 오래 기다리세요.

{% hint style="success" %}
여러 프로필을 사용하여 **캐주얼 게임 모드, 경쟁 게임 모드, 최상위 도전자** 플레이어를 분리하면 각 유형의 플레이어에 대해 규칙과 확장을 별도로 사용자 지정할 수 있습니다.
{% endhint %}

## 🤝 협동 게임

협동 게임은 플레이어가 협업, 커뮤니케이션 및 공유 경험을 통해 공동 목표나 AI 상대를 향해 팀으로 함께 작업해야 합니다. 비슷한 선호도와 게임 습관을 가진 플레이어를 맞추세요. 떠난 플레이어를 교체하고, [핑 비콘](/docs.edgegap.com-ko/learn/orchestration/ping-beacons.md#connection-quality) 반응성 있는 플레이어 경험을 제공하기 위해.

<details>

<summary>🤝 협동 게임 예시</summary>

```json
{
  "version": "3.2.5",
  "inspect": true,
  "max_deployment_retry_count": 3,
  "profiles": {
    "cooperative-example": {
      "ticket_expiration_period": "3m",
      "ticket_removal_period": "1m",
      "group_inactivity_removal_period": "5m",
      "application": {
        "name": "my-game-server",
        "version": "2024.01.30-16.23.00-UTC"
      },
      "rules": {
        "initial": {
          "match_size": {
            "type": "player_count",
            "attributes": {
              "team_count": 1,
              "min_team_size": 4,
              "max_team_size": 4
            }
          },
          "beacons": {
            "type": "latencies",
            "attributes": {
              "difference": 125,
              "max_latency": 150
            }
          },
          "selected_difficulty": {
            "type": "string_equality"
          },
          "selected_map": {
            "type": "intersection",
            "attributes": {
              "overlap": 1
            }
          },
          "player_level": {
            "type": "number_difference",
            "attributes": {
              "max_difference": 10
            }
          },
          "backfill_group_size": {
            "type": "intersection",
            "attributes": {
              "overlap": 1
            }
          },
          "moderation_flags": {
            "type": "intersection",
            "attributes": {
              "overlap": 1
            }
          }
        },
        "expansions": {
          "30": {
            "beacons": {
              "difference": 125,
              "max_latency": 250
            },
            "player_level": {
              "max_difference": 20
            }
          },
          "60": {
            "match_size": {
              "team_count": 1,
              "min_team_size": 2,
              "max_team_size": 4
            }
          },
          "150": {
            "match_size": {
              "team_count": 1,
              "min_team_size": 1,
              "max_team_size": 4
            }
          }
        }
      }
    }
  }
}
```

</details>

팀 수 1, 최대 팀 크기 4로, **매치당 최대 4명의 플레이어를 요구합니다**.

다음을 정의하세요 [심층 살펴보기](/docs.edgegap.com-ko/learn/matchmaking/matchmaker-in-depth.md#matchmaking-profiles) 게임 모드별 규칙 및 설정에 대해:

* 대기열에 플레이어를 유지하고 매치 채움률을 극대화하기 위해 최소 4명으로 시작하고,
* 제한하세요 [매치메이킹 지연 시간](/docs.edgegap.com-ko/learn/matchmaking/matchmaker-in-depth.md#ping-optimization) 멀리 떨어진 플레이어와의 매칭을 방지하기 위해,
* 모두의 실력 수준에 맞게 플레이어가 특정 게임 난이도를 선택하도록 하고,
* 모두에게 적합한 맵을 찾기 위해 플레이어가 지도 선호도를 제공하도록 하고,
* 비슷한 정도의 게임 진행도를 요구하도록 플레이어 레벨 차이를 제한하고,
* 서버 용량을 초과하지 않으면서 떠난 사람을 대체할 백필 그룹 크기를 지정하고,
* 일반 플레이어와 저평판 플레이어 및 치터를 분리하기 위해 관리 플래그를 사용하고,
* [심층 살펴보기](/docs.edgegap.com-ko/learn/matchmaking/matchmaker-in-depth.md#group-up) 사전 제작된 파티를 위해 그리고 서버 용량을 초과하지 않으면서 팀을 채우기 위해,
* 다른 [앱 및 버전](/docs.edgegap.com-ko/learn/orchestration/application-and-versions.md#app-versions) 프로필에 더 많은 CPU 또는 메모리를 할당하세요.

이상적인 조건으로 시작한 다음, [제한을 확장하세요](/docs.edgegap.com-ko/learn/matchmaking/matchmaker-in-depth.md#rule-expansion) 빠른 매치를 보장하기 위해:

* 더 많은 플레이어를 찾기 위해 시간이 지나면서 지연 시간 제한을 완화하고,
* 더 많은 플레이어를 찾기 위해 허용되는 플레이어 레벨 차이를 늘리고,
* 더 적은 플레이어가 필요하고 게임을 더 빨리 시작하도록 최소 팀 크기를 줄이고,
  * 서버가 AI 팀원을 사용하여 빈 슬롯을 채울 수 있고,
  * 또는 [심층 살펴보기](/docs.edgegap.com-ko/learn/matchmaking/matchmaker-in-depth.md#backfill-match) 나중에 플레이어를 추가하기 위해,
* 150초의 대기 시간 후 솔로로 게임을 시작하려면 최소 팀 크기를 1로 설정합니다.

## 🎈 소셜 게임

소셜 게임은 협업, 커뮤니케이션 및 공유 경험을 통해 플레이어 간의 연결과 관계를 구축하는 데 초점을 맞춥니다. 많은 수의 플레이어를 지원하고, 매치 채움률을 극대화하며, 플레이어 선호도와 게임 습관을 맞추세요. 떠난 플레이어를 교체하고 높은 [핑 비콘](/docs.edgegap.com-ko/learn/orchestration/ping-beacons.md#connection-quality) 반응성 있는 플레이어 경험을 제공하기 위해.

<details>

<summary>🎈 소셜 게임 예제</summary>

```json
{
  "version": "3.2.5",
  "inspect": true,
  "max_deployment_retry_count": 3,
  "profiles": {
    "social-example": {
      "ticket_expiration_period": "3m",
      "ticket_removal_period": "1m",
      "group_inactivity_removal_period": "5m",
      "application": {
        "name": "my-game-server",
        "version": "2024.01.30-16.23.00-UTC"
      },
      "rules": {
        "initial": {
          "match_size": {
            "attributes": {
              "team_count": 1,
              "min_team_size": 50,
              "max_team_size": 50
            },
            "type": "player_count"
          },
          "beacons": {
            "attributes": {
              "difference": 125,
              "max_latency": 150
            },
            "type": "latencies"
          },
          "selected_mode": {
            "type": "intersection",
            "attributes": {
              "overlap": 1
            }
          },
          "backfill_group_size": {
            "type": "intersection",
            "attributes": {
              "overlap": 1
            }
          },
          "moderation_flags": {
            "type": "intersection",
            "attributes": {
              "overlap": 1
            }
          }
        },
        "expansions": {
          "15": {
            "beacons": {
              "difference": 125,
              "max_latency": 250
            },
            "match_size": {
              "team_count": 1,
              "min_team_size": 20,
              "max_team_size": 50
            }
          },
          "30": {
            "match_size": {
              "team_count": 1,
              "min_team_size": 10,
              "max_team_size": 50
            }
          },
          "150": {
            "match_size": {
              "team_count": 1,
              "min_team_size": 1,
              "max_team_size": 50
            }
          }
        }
      }
    }
  }
}
```

</details>

팀 수 1(모두 대 모두), 최대 팀 크기 50으로, **매치당 최대 50명의 플레이어를 요구합니다**.

다음을 정의하세요 [심층 살펴보기](/docs.edgegap.com-ko/learn/matchmaking/matchmaker-in-depth.md#matchmaking-profiles) 게임 모드별 규칙 및 설정에 대해:

* 제한하세요 [매치메이킹 지연 시간](/docs.edgegap.com-ko/learn/matchmaking/matchmaker-in-depth.md#ping-optimization) 멀리 떨어진 플레이어와의 매칭을 방지하기 위해,
* 모두에게 적합한 모드를 찾기 위해 플레이어가 게임 모드 선호도를 제공하도록 하고,
* 서버 용량을 초과하지 않으면서 떠난 사람을 대체할 백필 그룹 크기를 지정하고,
* 일반 플레이어와 저평판 플레이어 및 치터를 분리하기 위해 관리 플래그를 사용하고,
* [심층 살펴보기](/docs.edgegap.com-ko/learn/matchmaking/matchmaker-in-depth.md#group-up) 사전 제작된 로비를 위해 또는 서버 용량을 초과하지 않으면서 팀을 채우기 위해,
* 다른 [앱 및 버전](/docs.edgegap.com-ko/learn/orchestration/application-and-versions.md#app-versions) 프로필에 더 많은 CPU 또는 메모리를 할당하세요.

이상적인 조건으로 시작한 다음, [제한을 확장하세요](/docs.edgegap.com-ko/learn/matchmaking/matchmaker-in-depth.md#rule-expansion) 빠른 매치를 보장하기 위해:

* 더 많은 플레이어를 찾기 위해 시간이 지나면서 지연 시간 제한을 완화하고,
* 더 적은 플레이어가 필요하고 게임을 더 빨리 시작하도록 최소 팀 크기를 천천히 줄이고,
  * 서버가 AI 플레이어로 빈 슬롯을 채울 수 있고,
  * 또는 [심층 살펴보기](/docs.edgegap.com-ko/learn/matchmaking/matchmaker-in-depth.md#backfill-match) 나중에 플레이어를 추가하기 위해,
* 150초의 대기 시간 후 솔로로 게임을 시작하려면 최소 팀 크기를 1로 설정합니다.

[^1]: 자신의 애플리케이션 이름으로 바꾸세요

[^2]: 자신의 애플리케이션 버전으로 바꾸세요

[^3]: 최대 차이 초과

[^4]: 최대 지연 시간 초과

[^5]: 완전 정규화 도메인 이름

[^6]: 예: 3개의 빈 슬롯의 경우 = \["3", "2", "1"]

[^7]: "2"를 실제 그룹 구성원 수로 바꾸세요
