# サンプル

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: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

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

The question should be specific, self-contained, and written in natural language.
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.
