---
metadata:
  - name: generator
    content: Diplodoc Platform v5.52.0
alternate:
  - https://yandex.com/dev/games/doc/en/sdk/construct-3/leaderboards.md
  - https://yandex.com/dev/games/doc/hi/sdk/construct-3/leaderboards.md
  - https://yandex.com/dev/games/doc/ko/sdk/construct-3/leaderboards.md
  - https://yandex.com/dev/games/doc/ru/sdk/construct-3/leaderboards.md
  - https://yandex.com/dev/games/doc/tr/sdk/construct-3/leaderboards.md
  - https://yandex.com/dev/games/doc/vi/sdk/construct-3/leaderboards.md
  - https://yandex.com/dev/games/doc/zh/sdk/construct-3/leaderboards.md
  - href: ko/sdk/construct-3/leaderboards.md
    type: text/markdown
    title: Markdown version
  - href: ../../llms.txt
    type: text/markdown
    title: llms.txt
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com/dev/games/doc/ko/llms.txt

# 리더보드

게임 페이지에서 개인화된 리더보드(순위표)를 표시하여 상위 플레이어의 결과와 인증된 사용자의 순위를 보여줄 수 있습니다.

아래 설명된 요청이 작동하려면, 개발자 콘솔에서 [리더보드](https://yandex.com/dev/games/doc/ko/sdk/sdk-leaderboard.md)가 만들어졌는지 확인하세요.

## 점수 전송

{% note info "참고" %}

요청은 인증된 사용자에게만 가능합니다. 미리 인증을 완료하고, 리더보드는 사용자가 개인 데이터를 제공한 경우에만 사용하는 것이 좋습니다.

![](../../_images/construct-3/leaderboards/player-pre-auth.png)

{% endnote %}

**Set leaderboard score** 작업을 사용하여 다음 매개변수를 가진 새로운 점수를 리더보드에 전송합니다:

#|
|| Name | `string` | 리더보드의 기술적 이름. ||
|| Score | `number` | 리더보드의 플레이어 점수. ||
|| Additional data | `string` | 점수와 함께 전송되는 선택적 메타데이터. ||
|#

예를 들어, 리더보드에 점수를 전송하는 방법은 다음과 같습니다:

![](../../_images/construct-3/leaderboards/leaderboard-set-score-example.png)

{% note info "참고" %}

요청은 1초에 한 번 이상 전송할 수 없으며, 그렇지 않으면 오류와 함께 거부됩니다.

특정 조건 **On a deferred event**을 사용하여 점수를 전송하는 것이 좋습니다.

![](../../_images/construct-3/leaderboards/leaderboard-debounce-example.png)

{% endnote %}

## 리더보드 기록

사용자 순위를 표시하려면 다음 매개변수를 가진 루프 **For each player in leaderboard**를 사용하세요:

#|
|| Name | `string` | 리더보드의 기술적 이름. ||
|| Top positions | `number` | 리더보드의 상위 기록을 요청하는 수. ||
|| Request player position | `boolean` | 사용자의 위치가 요청될지 여부를 결정합니다. ||
|| Positions around player | `number` | 표에 사용자 위아래로 요청될 수 기록 수. ||
|#

플러그인은 얀덱스 게임의 SDK를 통해 리더보드 데이터를 요청한 후 루프가 시작됩니다. 이 과정은 다소 시간이 걸립니다.

로드 중인 동안 화면에 로딩 표시를 남겨두는 것이 좋습니다.

{% note warning "경고" %}

이 루프가 계속 호출되지 않도록 하세요. 함수나 트리거 내부에서 사용하도록 권장됩니다.

{% endnote %}

루프 내에서 리스트 **Player**와 **Leaderboards**의 표현식에 접근할 수 있습니다. .

![](../../_images/construct-3/leaderboards/player-expressions.png)

![](../../_images/construct-3/leaderboards/leaderboards-expressions.png)

## 리더보드 예제

리더보드를 표시하는 구현 예:

- 리더보드 표시 전 로딩 휠.
- 점수 및 이름 표시.
- 플레이어 아바타 표시.
- 리더보드에서의 플레이어 위치 표시.

이 예제에서는 [텍스트 현지화](https://yandex.com/dev/games/doc/ko/sdk/construct-3/text-localization.md), [스프라이트 현지화](https://yandex.com/dev/games/doc/ko/sdk/construct-3/sprite.md), 그리고 플러그인 [적응형 텍스트](https://yandex.com/dev/games/doc/ko/sdk/construct-3/adaptive-text.md)를 사용합니다.

![](../../_images/construct-3/leaderboards/leaderboard-example.png)

[예제 다운로드](https://drive.google.com/file/d/1dVlhKonwFrBjzMQn3u8D2hhW7w_hlzN_/edit)

---


<!-- source: ko/_includes/button-git-construct.md -->
<a href="https://github.com/yandex-games-plugins/construct3">
  <span class="button">저장소</span>
</a>
<!-- endsource: ko/_includes/button-git-construct.md -->
