> For the complete documentation index, see [llms.txt](https://docs.edgegap.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.edgegap.com/zh/docs/sample-projects/godot/netfox-forest-brawl.md).

# Netfox Forest Brawl

使用 Netfox Forest Brawl 示例中的技术，在 Edgegap 上托管一个 Godot 多人游戏。

探索如何使用来自以下内容中的技术在 Edgegap 上托管 Godot 项目： [Netfox Forest Brawl](https://foxssake.github.io/netfox/latest/).

{% embed url="<https://youtu.be/fcwnUrlkjhA>" %}

## ✔️ 准备工作

在开始之前，你需要：

* [Godot 4.3.x 或更新版本](https://godotengine.org/).
* [Netfox Godot 包](https://foxssake.github.io/netfox/latest/).
* [Edgegap 的 Godot 专用服务器快速入门插件](https://docs.edgegap.com/zh/godot.md).

## ⚡ 部署并连接

### 1. 在 Edgegap 上部署服务器

☑️ 要开始，你需要 [在 Edgegap 创建一个免费账户](https://app.edgegap.com/auth/register)。无需信用卡。

☑️ 按照 [Godot 入门指南](https://docs.edgegap.com/zh/godot.md) 来构建并上传你的专用服务器。

☑️ [部署服务器](https://app.edgegap.com/deployment-management/deployments/create) 使用你新创建的 Forest Brawl 应用版本。

☑️ [打开你新部署的详情](https://app.edgegap.com/deployment-management/deployments/list) 并找到你唯一的一次性连接信息：

* **主机 URL** 格式为 `780aa4260e83.pr.edgegap.net` ,
* **外部端口** 格式为 `30854`  （5 位数字）。

✅ 你现在可以继续下一步了。

### 2. 从编辑器连接

☑️ 在 Godot 中打开你的新项目。

☑️ 确认你已打开场景： `examples/forest-brawl/forest-brawl.tscn`.

☑️ 按下 ▶️ 播放按钮以启动你的游戏客户端。

☑️ 输入上一步中的连接信息，例如 `780aa4260e83.pr.edgegap.net:30854` .

☑️ 按下 **JOIN** 按钮以连接到你的服务器。

☑️ 通过 Debug / Run Multiple Instances 连接第二个虚拟玩家。

🙌 祝贺你在 Edgegap 上完成了你的首次部署！

## ⚠️ 已知问题

* [专用服务器导出模式会剥离未受保护的 `brawler-controller.gd`](https://github.com/foxssake/netfox/issues/636)
