> For the complete documentation index, see [llms.txt](https://help.diarkis.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.diarkis.io/getting-started/sample.md).

# サンプル

Diarkis を使ったモジュールやユースケース別のサンプルを紹介します。

Diarkis クライアント SDK では様々なサンプルを用意しています。

## C++ サンプル

C++ 版クライアント・ランタイムの使用方法を紹介するためのサンプル・プログラムです。 C++ 版 Diarkis クライアント SDK パッケージの `samples` 以下に配置されています。\
詳細については C++ 版 Diarkis クライアント SDK パッケージに含まれる `SAMPLE_README.md` を参照してください。

* [directmessage\_simple](/diarkis-client/samples/unity.md)
  * DM モジュールの基本的な使用方法を紹介するサンプル・プログラムです。
* [group\_sample](/diarkis-client/samples/cpp/matching-and-turn.md)
  * Group モジュールの使用方法を紹介するサンプル・プログラムです。
* [matching\_and\_turn](/diarkis-client/samples/cpp/matchmaker-ticket.md)
  * Diarkis サーバに接続し MatchMaker モジュールでマッチメイキングを行った後、別の Diarkis サーバーに接続しなおしてマッチしたユーザーと同じ Room に入って通信を行うサンプルです。 ゲーム等で良く行われるフローを Diarkis で実装した場合のサンプルとなります。
* [matchmaker\_ticket](/diarkis-client/samples/cpp/p2p-rudp-sample.md)
  * MatchMaker のチケット機能の使用方法を紹介するサンプル・プログラムです。
* [p2p\_rudp\_sample](/diarkis-client/samples/cpp/session-simple.md)
  * P2P モジュールの RUDP 機能の使用方法を紹介するサンプル・プログラムです。
* [room\_broadcast](broken://pages/UQBFCMlPKjhZLYEDxmC3)
  * Room モジュールと P2P モジュールを使用したサンプル・プログラムです。Room 経由のリレー通信と P2P 通信の使用方法を紹介します。
* [session\_simple](https://github.com/Diarkis/diarkis-help-center/blob/main/gitbook/renewal/ja/getting-started/broken-reference/README.md)
  * Session モジュールの基本的な使用方法を紹介するサンプルです。

## C++ Unreal Engine Plugin サンプル

* [FieldWalker](/diarkis-client/samples/unreal-engine/diarkis-plugin-sample.md)
  * C++ 版クライアント SDK を Unreal Engine のプラグインとして組み込んだサンプルです。\
    このサンプルでは **Diarkis** の複数のモジュールを使用して位置の同期、メッセージの送受信、マッチメイキング等を行う統合的なサンプルとなっています。

## C# Unity Plugin サンプル

* [FieldWalker](/diarkis-client/samples/unity/field-walker.md)
  * C# 版クライアント SDK を Unity のプラグインとして組み込んだサンプルです。\
    このサンプルでは **Diarkis** の複数のモジュールを使用して位置の同期、メッセージの送受信、マッチメイキング等を行う統合的なサンプルとなっています。

## サーバーサンプル

[Diarkis Server Template ](https://github.com/Diarkis/diarkis-server-template/tree/develop/examples)のリポジトリに様々なサンプルを用意しております。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.diarkis.io/getting-started/sample.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
