A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.
TypeScript 2d-game-engine3d3d-game-engineandroidcppecsgame-editorgame-enginegamedeviostypescriptwebassemblywebglwebgpuwechat-minigame
docs: the publishing guides describe the dialog that exists now
esengine2e4c1633f00d
diff --git a/desktop/src/i18n/messages/settings.ts b/desktop/src/i18n/messages/settings.tsindex 6e9f895b3..014d67a28 100644--- a/desktop/src/i18n/messages/settings.ts+++ b/desktop/src/i18n/messages/settings.ts@@ -401,7 +401,7 @@ export const settingsMessages = defineMessages({'set.desktop.channel.standalone': { en: 'Standalone', zh: '独立发行' },'set.desktop.channel.steam': { en: 'Steam', zh: 'Steam' },'set.group.steam': { en: 'Steam', zh: 'Steam' },- 'set.project.packaging.desktop.channel': { en: 'Distribution', zh: '发行渠道' },+ 'set.project.packaging.desktop.channel': { en: 'Channel', zh: '发行渠道' },'set.project.packaging.desktop.channel.desc': {en: 'Where this desktop build goes. Steam also writes the depot scripts and a STEAM.md '+ 'listing the values only the partner backend can be told.',diff --git a/docs/astro/src/assets/guides/en/build-dialog.png b/docs/astro/src/assets/guides/en/build-dialog.pngindex b7f24a87d..ecd89b0ca 100644Binary files a/docs/astro/src/assets/guides/en/build-dialog.png and b/docs/astro/src/assets/guides/en/build-dialog.png differdiff --git a/docs/astro/src/assets/guides/en/steam-channel.png b/docs/astro/src/assets/guides/en/steam-channel.pngnew file mode 100644index 000000000..c4b381898Binary files /dev/null and b/docs/astro/src/assets/guides/en/steam-channel.png differdiff --git a/docs/astro/src/assets/guides/zh/build-dialog.png b/docs/astro/src/assets/guides/zh/build-dialog.pngindex 097ed17a3..d6f8a2181 100644Binary files a/docs/astro/src/assets/guides/zh/build-dialog.png and b/docs/astro/src/assets/guides/zh/build-dialog.png differdiff --git a/docs/astro/src/assets/guides/zh/steam-channel.png b/docs/astro/src/assets/guides/zh/steam-channel.pngnew file mode 100644index 000000000..355258dabBinary files /dev/null and b/docs/astro/src/assets/guides/zh/steam-channel.png differdiff --git a/docs/astro/src/content/docs/publishing/overview.mdx b/docs/astro/src/content/docs/publishing/overview.mdxindex 10215d269..678d26df0 100644--- a/docs/astro/src/content/docs/publishing/overview.mdx+++ b/docs/astro/src/content/docs/publishing/overview.mdx@@ -21,12 +21,15 @@ so what you shipped is what you tested (*play == ship*).1. Open **File → Build…** to bring up the **Package Project** dialog.2. Pick a **target** from the list — grouped as *General* (Web / Desktop /Playable), *Mini-games* (WeChat and any the project added), and *Mobile*- (Android / iOS).-3. Choose a **build config** — *Development* or *Shipping* (Shipping minifies) — an+ (Android / iOS). A target that ships to more than one place lists them beneath+ it: Desktop branches into *Standalone* and *[Steam](/docs/publishing/steam/)*.+3. Fill in that target's own settings, shown on its page — what the app is called+ and identified by, and anything the store it goes to needs.+4. Choose a **build config** — *Development* or *Shipping* (Shipping minifies) — an**output folder**, source maps, and the [asset cook options](#asset-cook-options).-4. Check the **Scenes in build** list — untick scenes you don't want to ship, and+5. Check the **Scenes in build** list — untick scenes you don't want to ship, andpin a different startup scene if needed (see below).-5. Click **Package** and watch the live build log. When it finishes, the output+6. Click **Package** and watch the live build log. When it finishes, the outputfolder opens (there's a checkbox to turn that off), and Web / Playable buildsoffer **Preview over http**.@@ -68,7 +71,7 @@ and opens it in your browser.| Target | What it produces | Output | Next step ||---|---|---|---|| **Web** | A static, self-contained web build. | `dist-web/` | **Preview over http**, or upload the folder to any static host. |-| **Desktop** | A runnable **native** app per installed desktop template — a `.app` on macOS, a `<Name>/` directory with `<Name>.exe` on Windows. No Chromium and no npm project. | `dist-desktop/` | Double-click it. Selecting the **Steam** channel also writes the depot scripts and a `STEAM.md` with this build's own values — see [Steam](/docs/publishing/steam/). |+| **Desktop** | A runnable **native** app per installed desktop template — a `.app` on macOS, a `<Name>/` directory holding `<Name>.exe` on Windows or `<Name>` on Linux. No Chromium and no npm project. | `dist-desktop/` | Double-click it. Selecting the **Steam** channel also writes the depot scripts and a `STEAM.md` with this build's own values — see [Steam](/docs/publishing/steam/). || **WeChat** | A WeChat MiniGame package. | `dist-wechat/` | Open the folder in WeChat DevTools and set your AppID. See [WeChat MiniGame](/docs/publishing/wechat/). || **Playable** | One self-contained `index.html` with everything inlined — no external requests, as ad networks require. | `dist-playable/` | **Preview over http** (its real surface is an ad-network iframe). Pick the [ad network](#playable-ad-networks) so the CTA and the size check match where it ships. || **Android** | Content for a **native** arm64 app (Vulkan) — a real APK, not a WebView. | `dist-android/` | `node build-tools/cli.js native --package --content dist-android` wraps it in a signed APK. See [Android & iOS](/docs/publishing/android-ios/). |@@ -264,16 +267,26 @@ output folder when the build finishes.## Packaging settings-Per-target metadata lives in **Project Settings → Packaging** and is saved with the-project:+What one *target* is called, where it goes and what a store knows it by is edited+on that target's page in **File → Build…**, beside the build it changes:++- **WeChat** — AppID.+- **Desktop** — application id override, the product name (which names the app),+ and the distribution channel (Standalone or [Steam](/docs/publishing/steam/)).+- **Android** — version code (the integer Google Play orders builds by), whether+ the build ends at an installable package or at the Gradle project, and whether+ an App Bundle is written beside the APK.++What holds for the project *whatever* it ships to stays in **Project Settings →+Packaging**, and is saved with the project:- **Application ID** — the reverse-DNS id the installed app is known by: theAndroid manifest package, the iOS bundle id, the desktop installer id. Emptyderives one from the project name; a published app should set its own, because astore keeps it forever.-- **WeChat** — AppID.-- **Desktop** — application id override and product name (used to name the installer).-- **Android** — version code, the integer Google Play orders builds by.+- **Icon** — one square PNG for every installable target.+- **Achievements** — the ids your game unlocks. Platform-neutral: every store+ keeps this same list under a different name.### Screen orientationdiff --git a/docs/astro/src/content/docs/publishing/steam.mdx b/docs/astro/src/content/docs/publishing/steam.mdxindex c5c550379..c61486ee8 100644--- a/docs/astro/src/content/docs/publishing/steam.mdx+++ b/docs/astro/src/content/docs/publishing/steam.mdx@@ -11,7 +11,8 @@ goes. So there is no "Steam build": there is a desktop build, and a switch thatalso writes what SteamPipe needs.The desktop build is a **native app** — the engine's C++ core with an embedded-[Dawn](https://dawn.googlesource.com/dawn) (Metal on macOS, D3D12 on Windows) and+[Dawn](https://dawn.googlesource.com/dawn) (Metal on macOS, D3D12 on Windows,+Vulkan on Linux) and[QuickJS-ng](https://github.com/quickjs-ng/quickjs), on SDL3. There is no browserin the process, which is also why the Steam overlay, Steam Input and exclusivefullscreen behave the way players expect them to.@@ -41,22 +42,31 @@ fullscreen behave the way players expect them to.## Setting it up-**Project Settings → Packaging**:+Open **File → Build…** and pick **Steam**, listed under Desktop in the target+list — Steam is a destination for the desktop build, so it branches that target+rather than standing beside it. Everything the channel needs is on that page.++| Setting | What it is ||---|---|-| **Desktop → Channel** | `Steam` — writes the depot scripts beside the build. |+| **Channel** | `Steam` — writes the depot scripts beside the build. Picking Steam in the target list sets this; they are the same value. || **Steam App ID** | From the partner backend. Without it no scripts are written: a script built around a guessed id names someone else's game. || **Steamworks SDK** | The SDK you downloaded. Its `redistributable_bin/<os>/` library ships inside the app. || **Depot IDs** | Leave at 0 to use `App ID + 1`, … Valve *assigns* these; the generated checklist tells you to check them. |-| **Achievements** | The ids your game unlocks (`packaging.achievements`), platform-neutral — every store has this same list under a different name. |-Then **Package Project → Desktop**. Beside the app you get:+The **achievement ids** are not here: they live in **Project Settings →+Packaging**, because every store keeps that same list under a different name.+Declaring them is what lets an unlock of an id no backend has be refused where it+happens, instead of being accepted and silently dropped.++Then press **Package**. Beside the app you get:```dist-desktop/MyGame.app/ ← macOS, and/orMyGame/ ← Windows: MyGame.exe + Content/+ ← Linux: MyGame + Content/steam/app_build_<appid>.vdfdepot_<id>_<os>.vdf@@ -123,12 +133,12 @@ in a document:|---|---|---|| Windows | `WinAppDataRoaming` | `Estella/<Name>` || macOS | `MacHome` | `Library/Application Support/Estella/<Name>` |+| Linux | `LinuxHome` | `.local/share/Estella/<Name>` |## Honest boundaries- **macOS builds are signed ad-hoc**, and only on a Mac. Notarize with your ownDeveloper ID before a public release.-- **Linux is not supported yet** — the desktop host has no Linux surface.- **`steamcmd` is not driven from the editor.** The checklist gives you the exactcommand instead; a feature that cannot be verified here is worse than a line youcan copy.diff --git a/docs/astro/src/content/docs/zh-cn/publishing/overview.mdx b/docs/astro/src/content/docs/zh-cn/publishing/overview.mdxindex 3687f454c..70aeb8793 100644--- a/docs/astro/src/content/docs/zh-cn/publishing/overview.mdx+++ b/docs/astro/src/content/docs/zh-cn/publishing/overview.mdx@@ -19,12 +19,15 @@ import { Aside, Steps } from '@astrojs/starlight/components';1. 打开 **文件 → Build…** 调出 **打包项目(Package Project)** 对话框。2. 从列表里选一个**目标**——分为*通用*(Web / 桌面 / Playable)、*小游戏*- (微信,以及项目自己添加的)、*移动*(Android / iOS)。-3. 选一个**构建配置**——*Development* 或 *Shipping*(Shipping 会压缩)——一个**输出目录**、+ (微信,以及项目自己添加的)、*移动*(Android / iOS)。发往不止一个地方的目标会把这些+ 去处列在它下面:桌面分叉为*独立发行*与 *[Steam](/docs/zh-cn/publishing/steam/)*。+3. 填这个目标自己的设置,就在它的页面上——应用叫什么、用什么 id 认它,+ 以及它要发往的那个商店需要的东西。+4. 选一个**构建配置**——*Development* 或 *Shipping*(Shipping 会压缩)——一个**输出目录**、source map,以及[资产烘焙选项](#资产烘焙选项)。-4. 检查**构建场景(Scenes in build)**列表——取消勾选不想发布的场景,需要的话换一个+5. 检查**构建场景(Scenes in build)**列表——取消勾选不想发布的场景,需要的话换一个启动场景(见下文)。-5. 点 **Package**,看实时构建日志。完成后输出目录会自动打开(有复选框可关掉),+6. 点 **Package**,看实时构建日志。完成后输出目录会自动打开(有复选框可关掉),Web / Playable 构建还会提供 **Preview over http**。</Steps>@@ -58,7 +61,7 @@ import { Aside, Steps } from '@astrojs/starlight/components';| 目标 | 产出什么 | 输出 | 下一步 ||---|---|---|---|| **Web** | 一个静态、自包含的 Web 构建。 | `dist-web/` | **Preview over http**,或把文件夹上传到任意静态托管。 |-| **桌面** | 每装了一个桌面运行时模板,就出一个可直接运行的**原生**应用——macOS 上是 `.app`,Windows 上是含 `<Name>.exe` 的 `<Name>/` 目录。没有 Chromium,也没有 npm 工程。 | `dist-desktop/` | 双击即可。选了 **Steam** 渠道还会写出 depot 脚本和一份带本次构建确切取值的 `STEAM.md`——见 [Steam](/docs/zh-cn/publishing/steam/)。 |+| **桌面** | 每装了一个桌面运行时模板,就出一个可直接运行的**原生**应用——macOS 上是 `.app`,Windows 与 Linux 上是 `<Name>/` 目录(其中分别是 `<Name>.exe` 和 `<Name>`)。没有 Chromium,也没有 npm 工程。 | `dist-desktop/` | 双击即可。选了 **Steam** 渠道还会写出 depot 脚本和一份带本次构建确切取值的 `STEAM.md`——见 [Steam](/docs/zh-cn/publishing/steam/)。 || **微信** | 一个微信小游戏包。 | `dist-wechat/` | 在微信开发者工具里打开该文件夹并设置你的 AppID。见 [微信小游戏](/docs/zh-cn/publishing/wechat/)。 || **Playable** | 一个自包含的 `index.html`,一切内联——无外部请求(广告平台的要求)。 | `dist-playable/` | **Preview over http**(它的真实宿主是广告平台的 iframe)。先选好[广告平台](#试玩广告平台),CTA 与体积检查才对得上投放目标。 || **Android** | **原生** arm64 应用(Vulkan)的内容——真 APK,不是 WebView。 | `dist-android/` | `node build-tools/cli.js native --package --content dist-android` 把它包成已签名的 APK。见 [Android 与 iOS](/docs/zh-cn/publishing/android-ios/)。 |@@ -218,13 +221,21 @@ mip 链——下载更小、显存更省。## 打包设置-每个目标的元数据在 **项目设置 → 打包(Packaging)** 里,并随项目保存:+某**一个目标**叫什么、发往哪里、商店用什么认它,在 **文件 → Build…** 里那个目标自己的+页面上编辑——就在它所改变的那次构建旁边:++- **微信** —— AppID。+- **桌面** —— 应用 id 覆盖、产品名(用于命名应用),以及发行渠道+ (独立发行或 [Steam](/docs/zh-cn/publishing/steam/))。+- **Android** —— 版本号(Google Play 用来排序构建的整数)、构建产出安装包还是 Gradle 工程,+ 以及是否在 APK 之外再写一份 App Bundle。++**无论发往哪里都成立**的那些,留在 **项目设置 → 打包(Packaging)**,并随项目保存:- **应用 ID** —— 已安装应用的反向域名 id:Android 的 manifest package、iOS 的 bundle id、桌面安装包的 id。留空则按项目名推导;正式发布的应用应当自己指定,因为应用商店会永久沿用它。-- **微信** —— AppID。-- **桌面** —— 应用 id 覆盖和产品名(用于命名安装包)。-- **Android** —— 版本号,Google Play 用来排序构建的整数。+- **应用图标** —— 一张方形 PNG,供所有可安装目标使用。+- **成就** —— 你的游戏会解锁的 id。**平台中立**:每个商店都有这份同样的清单,只是名字不同。### 屏幕方向diff --git a/docs/astro/src/content/docs/zh-cn/publishing/steam.mdx b/docs/astro/src/content/docs/zh-cn/publishing/steam.mdxindex f085e848d..f0a2bb134 100644--- a/docs/astro/src/content/docs/zh-cn/publishing/steam.mdx+++ b/docs/astro/src/content/docs/zh-cn/publishing/steam.mdx@@ -10,7 +10,7 @@ Steam 是**桌面目标下的一个发行渠道**,不是一个单独的平台。外加一个开关,让导出顺带写出 SteamPipe 需要的东西。桌面构建是**原生应用**——引擎的 C++ 核心,内嵌-[Dawn](https://dawn.googlesource.com/dawn)(macOS 走 Metal,Windows 走 D3D12)与+[Dawn](https://dawn.googlesource.com/dawn)(macOS 走 Metal,Windows 走 D3D12,Linux 走 Vulkan)与[QuickJS-ng](https://github.com/quickjs-ng/quickjs),窗口与输入来自 SDL3。进程里没有浏览器,这也是 Steam 覆盖层、Steam Input 和独占全屏能如玩家预期那样工作的原因。@@ -37,22 +37,29 @@ Steam 是**桌面目标下的一个发行渠道**,不是一个单独的平台。## 怎么配-**Project Settings → Packaging**:+打开 **文件 → Build…**,在目标列表里选 **Steam**——它列在「桌面」下面。Steam 是桌面构建的+一个去处,所以它从那个目标分叉出来,而不是与它并列。这个渠道要填的东西都在这一页上。++| 设置 | 含义 ||---|---|-| **Desktop → Channel** | 选 `Steam`——构建旁边会写出 depot 脚本。 |+| **发行渠道** | 选 `Steam`——构建旁边会写出 depot 脚本。在目标列表里点 Steam 就是在设它,两者是同一个值。 || **Steam App ID** | 来自合作伙伴后台。不填就什么也不写:用猜出来的 id 生成的脚本指向的是别人的游戏。 || **Steamworks SDK** | 你下载的那份 SDK。它 `redistributable_bin/<os>/` 下的库会被打进应用。 || **Depot ID** | 留 0 则用 `App ID + 1`、+2…。这些由 Valve **分配**,生成的清单会提示你去核对。 |-| **成就** | 你的游戏会解锁的 id(`packaging.achievements`),**平台中立**——每个商店都有这份同样的清单,只是名字不同。 |-然后 **Package Project → Desktop**。应用旁边会得到:+**成就 id 不在这一页**,它在 **项目设置 → 打包** 里——因为每个商店都有这份同样的清单,+只是名字不同。声明它们,才能让「解锁一个后台根本没有的 id」在发生处就被拒绝,+而不是被接受、然后悄无声息地丢掉。++然后点 **打包**。应用旁边会得到:```dist-desktop/MyGame.app/ ← macOS,以及/或者MyGame/ ← Windows:MyGame.exe + Content/+ ← Linux: MyGame + Content/steam/app_build_<appid>.vdfdepot_<id>_<os>.vdf@@ -108,11 +115,11 @@ await achievements.store(); // 推到 Steam;商店在这一步后面做批|---|---|---|| Windows | `WinAppDataRoaming` | `Estella/<名字>` || macOS | `MacHome` | `Library/Application Support/Estella/<名字>` |+| Linux | `LinuxHome` | `.local/share/Estella/<名字>` |## 诚实边界- **macOS 构建是 ad-hoc 签名的**,而且只能在 Mac 上签。公开发布前请用你自己的 Developer ID 公证。-- **Linux 尚未支持**——桌面宿主还没有 Linux 的 surface。- **`steamcmd` 没有做进编辑器。** 清单里给出的是可以照抄的确切命令;一个在这里验证不了的功能,不如一行你能复制的命令诚实。- 创意工坊、DLC、内购、Steam Input 动作集不在覆盖范围内。它们都能挂在同一套 flat API 和同一个