> For the complete documentation index, see [llms.txt](https://docs.decentraland.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.decentraland.org/creator/content-creator-zh/jiao-cheng-yu-shi-li/published-games/bloom-garden.md).

# 花开花园

一个协作花园，具有持久化植物状态、服务器时钟偏移估算和复用的花瓣动画。

![Bloom Garden 预览](https://2460066822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-ba17235c7479987401d4869905655cd2c06eac9b%2FbloomGarden-preview.webp?alt=media)

一种协作式花园体验，玩家携手打理生机盎然的花园，并唤醒大绽放。

其多人游戏服务器使用内置存储来保存植物状态、每周排行榜以及每位玩家的浇水次数限制。

* [在 Decentraland 上游玩](https://decentraland.org/jump?realm=bloomgarden.dcl.eth)

## 项目信息

**维护者：** 社区 · TheLivingGarden

[查看上游源代码](https://github.com/TheLivingGarden/TheLivingGarden/tree/main-main)

**许可证：** [MIT](https://github.com/TheLivingGarden/TheLivingGarden/blob/main/LICENSE). 重用前请查看上游条款；代码和素材可能适用不同条款。

{% hint style="warning" %}
**社区维护的代码——使用前请先审查**

此社区项目由 Decentraland Foundation 和 DAO 的 GitHub 组织之外的人员维护。其源代码和线上部署可能独立发生变化。

此项目被收录于本目录，并不代表它已通过安全审计或保证其安全性。运行或复用前，请审查代码、依赖项和安装脚本。

[报告目录相关问题](https://github.com/decentraland/docs/issues/new)。如怀疑存在漏洞，请遵循上游项目的安全政策。请勿在公开议题中包含漏洞利用细节或凭据。
{% endhint %}

## 探索代码

这些链接指向特定的源代码快照，因此随着上游持续开发，这些说明仍然有用。它们是学习参考资料，并非安全评估。

### 估算服务器与客户端时钟之间的偏差

时钟辅助模块会保留五个偏差样本、剔除较大的偏差，并将服务器时间戳转换为本地时间。浇水客户端会将通过场景消息定义收到的时间戳提供给它。

**项目背景：** 这展示了一种轻量级的时间估算方法；样本中包含网络传输时间。

**源代码参考：**

* [时钟辅助模块](https://github.com/TheLivingGarden/TheLivingGarden/blob/b2c9a90791b1eed5c92a4ffadf6ac480d91510ea/src/shared/clockSync.ts#L3-L55)
* [浇水客户端](https://github.com/TheLivingGarden/TheLivingGarden/blob/b2c9a90791b1eed5c92a4ffadf6ac480d91510ea/src/wateringSystem.ts#L1144-L1146)

### 让临时效果自然结束

花瓣的设置与控制逻辑会根据场景中命名为 Petal 的模型创建可复用对象池，然后启动或结束该效果。更新阶段会先放大花瓣，让它们飘落并停下，最后缩小并回收。若希望效果停止生成新对象，同时让现有对象完成动画，可参考此示例。

**项目背景：** 放置位置取决于 BLOOM\_CENTER 和模块中的时间常量。

**源代码参考：**

* [花瓣的设置与控制逻辑](https://github.com/TheLivingGarden/TheLivingGarden/blob/b2c9a90791b1eed5c92a4ffadf6ac480d91510ea/src/petalSystem.ts#L119-L173)
* [更新阶段](https://github.com/TheLivingGarden/TheLivingGarden/blob/b2c9a90791b1eed5c92a4ffadf6ac480d91510ea/src/petalSystem.ts#L207-L310)


---

# 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.decentraland.org/creator/content-creator-zh/jiao-cheng-yu-shi-li/published-games/bloom-garden.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.
