> For the complete documentation index, see [llms.txt](https://docs.convai.com/api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/other-integrations/roblox/sample-game-1.md). Agents can also search and read this documentation through its [MCP server](https://docs.convai.com/api-docs/~gitbook/mcp).

# 示例游戏 1

在 Convai 的简单实现中与角色互动

### [点击此处在 Roblox 中游玩游戏](https://www.roblox.com/games/11398111980/Convai-Roblox-Integration-Game)

### 获取游戏代码

下载游戏文件： [下载](https://storage.googleapis.com/convai-assets-storage/Convai%20Roblox%20Integration%20Game%20Code.rbxl)

{% hint style="info" %}
当前版本：Ver 1.1 - 简易角色 API 集成
{% endhint %}

<figure><img src="https://2402152281-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEtUJA212Zc1S9ACc8T4l%2Fuploads%2FaUakZJ7HRjRMuiy0c5QV%2Fss1.png?alt=media&amp;token=fe8195ac-2ab4-454d-a86d-958ada65b9b9" alt=""><figcaption></figcaption></figure>

这是一个非常简单的游戏，你可以进入游戏，与角色进行一些示例对话。

{% hint style="warning" %}
请记住：

1. 游戏默认加载一个示例角色。你可以与这个默认角色互动，也可以选择替换为你通过我们的网站或 API 创建的角色。只需在屏幕左下角相应的输入框中输入对应的角色 ID，按 ENTER 键即可开始。
2. 对于初学者，我们提供 50 次示例对话，你可以在不设置 API Key 的情况下与想要的角色进行对话。若要继续对话，请从我们的网站获取 API Key，并在屏幕左下角相应的输入框中输入，然后按 ENTER 键。
   {% endhint %}

### 开始游戏：

按照以下步骤开始游戏：

1. 从我们的网站获取 API Key。免费额度用完后，若要在游戏中继续进行对话，就必须使用 API Key。
2. 获取你在角色创建工具中创建的新角色的角色 ID。\
   如果你还没有创建角色，也不用担心。游戏已预加载一个示例角色，供你体验。
3. 访问上方提供的游戏链接。<br>

   <figure><img src="https://2402152281-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEtUJA212Zc1S9ACc8T4l%2Fuploads%2F2uZX2BciAN6mLYwJvhoC%2Froblox-ss.png?alt=media&amp;token=aca89b22-1982-4de6-80a7-0d2f9a3de9a7" alt=""><figcaption></figcaption></figure>
4. 点击绿色的“Play”按钮。Roblox 将在本地打开，供你游玩。
5. 现在你可以与角色对话了

   <figure><img src="https://2402152281-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEtUJA212Zc1S9ACc8T4l%2Fuploads%2FeUsyF3nQuEkGM9CYEtWp%2Flanding-page.png?alt=media&amp;token=82e37235-7ae9-46f8-a79b-6b8e188530a7" alt=""><figcaption></figcaption></figure>

   点击 **明白了** 按钮关闭通知。不过请先阅读一遍。\
   在屏幕左下角输入 API Key 和角色 ID。分别在文本框中输入相应的值，然后按 Enter 键。\
   记得在输入数值后按 **ENTER** ，以便在后端注册该值。
6. 现在点击聊天框图标，或按键盘上的“/”键开始对话。先说一句“Hi!”，然后按 **ENTER**.<br>

   <figure><img src="https://2402152281-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEtUJA212Zc1S9ACc8T4l%2Fuploads%2FvyZWuHwCHfRnPPcPEiSj%2Fconv1.png?alt=media&amp;token=be574396-3691-42b4-8c93-b43c9b526e69" alt=""><figcaption></figcaption></figure>
7. 就是这样。你可以继续对话，不断测试你的角色。


---

# 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://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/other-integrations/roblox/sample-game-1.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.
