> 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/tower-of-madness.md).

# 疯狂之塔

在变化的塔层中进行限时平台跳跃，并带有资源预加载和可跳过的关卡镜头导览。

![疯狂之塔预览](https://2460066822-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoPnXBby9S6MrsW83Y9qZ%2Fuploads%2Fgit-blob-216f5a3735ed2477e2b58bace71288cf6e0840a5%2F4c85255e-c1db-48f0-8e0f-35dec36f3ab0-1792498908.webp?alt=media)

一款限时平台跳跃游戏，玩家竞相登顶。

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

## 项目信息

**维护者：** Decentraland DAO

[查看源代码](https://github.com/dcl-regenesislabs/towerofmadness)

**许可证：** 此目录中未标明许可证。重用前，请查阅上游代码库并咨询维护者，确认适用条款。

## 探索代码

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

### 预加载不断变化的关卡组件

`setupChunkPreload` 会对组件资源路径去重，并创建临时 GLTF 实体。一个系统会监视这些实体的加载状态，在加载完成或失败后移除实体，并在没有剩余实体时注销自身。

**项目背景：** 此示例展示了如何管理预加载生命周期；资源列表来自 `shared/chunks` ，且专用于这座塔。

**源代码参考：**

* [`setupChunkPreload`](https://github.com/dcl-regenesislabs/towerofmadness/blob/be318c6f0a287c15f3771f12f629b84de6cc18af/src/chunkPreload.ts#L22-L61)

### 围绕变化的几何结构构建可跳过的镜头之旅

`playCinematic` 会根据当前起点和终点组件调整摄像机关键帧，然后选择虚拟摄像机。更新系统会对位置和注视目标进行插值，并支持按住按钮跳过。

**项目背景：** 查看组件查找辅助函数和 `skipCinematic` ，了解镜头之旅如何找到锚点，并将控制权交还给玩家摄像机。

**源代码参考：**

* [`playCinematic`](https://github.com/dcl-regenesislabs/towerofmadness/blob/be318c6f0a287c15f3771f12f629b84de6cc18af/src/cinematicCamera.ts#L110-L209)
* [更新系统](https://github.com/dcl-regenesislabs/towerofmadness/blob/be318c6f0a287c15f3771f12f629b84de6cc18af/src/cinematicCamera.ts#L286-L334)


---

# 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/tower-of-madness.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.
