[游戏引擎对比](https://bloomengine.dev/zh-Hans/compare)

# 将一个 Phaser 游戏移植到移动端

如果你希望保留 Phaser，可以从官方文档推荐的 Capacitor 路径开始。如果需要原生渲染，估算一下场景、物理和输入部分在 Bloom 中的迁移工作量。[\[6\]](https://github.com/phaserjs/phaser/tree/v4.2.1 "来源 6 · 最后检查时间 2026-12-02")[\[1\]](https://github.com/Bloom-Engine/engine/tree/3cde2788 "来源 1 · 最后检查时间 2026-12-02")

最后检查时间 2026年12月2日

| 项目 | Bloom Engine | Phaser |
| --- | --- | --- |
| 游戏开发语言 | TypeScript[\[1\]](https://github.com/Bloom-Engine/engine/tree/3cde2788 "来源 1 · 最后检查时间 2026-12-02") | JavaScript / TypeScript[\[6\]](https://github.com/phaserjs/phaser/tree/v4.2.1 "来源 6 · 最后检查时间 2026-12-02") |
| 引擎许可证 | MIT[\[1\]](https://github.com/Bloom-Engine/engine/tree/3cde2788 "来源 1 · 最后检查时间 2026-12-02") | MIT[\[6\]](https://github.com/phaserjs/phaser/tree/v4.2.1 "来源 6 · 最后检查时间 2026-12-02") |
| 当前版本 | 0.4.19[\[2\]](https://registry.npmjs.org/@bloomengine/engine/latest "来源 2 · 最后检查时间 2026-12-02") | 4.2.1[\[10\]](https://www.phaser.io/download/phaser4 "来源 10 · 最后检查时间 2026-12-02") |
| 编辑器 | 独立的World Editor[\[3\]](https://github.com/Bloom-Engine/editor#status "来源 3 · 最后检查时间 2026-12-02") | 可选用 Phaser Editor v5，编辑器网站上有 AI 聊天演示。[\[11\]](https://phaser.io/editor "来源 11 · 最后检查时间 2026-12-02")[\[8\]](https://phaser.io/editor/pricing "来源 8 · 最后检查时间 2026-12-02") |
| 游戏目标平台 | macOS · Windows · Linux · iOS · tvOS · watchOS · visionOS · Android · Web[\[1\]](https://github.com/Bloom-Engine/engine/tree/3cde2788 "来源 1 · 最后检查时间 2026-12-02")[\[4\]](https://github.com/Bloom-Engine/engine/blob/3cde2788/docs/watchos-target.md "来源 4 · 最后检查时间 2026-12-02") | 桌面端和移动端浏览器[\[6\]](https://github.com/phaserjs/phaser/tree/v4.2.1 "来源 6 · 最后检查时间 2026-12-02") |
| 渲染 | wgpu · Metal · DX12 · Vulkan · OpenGL · WebGPU / WebGL · SwiftUI / SceneKit[\[1\]](https://github.com/Bloom-Engine/engine/tree/3cde2788 "来源 1 · 最后检查时间 2026-12-02")[\[4\]](https://github.com/Bloom-Engine/engine/blob/3cde2788/docs/watchos-target.md "来源 4 · 最后检查时间 2026-12-02") | WebGL / Canvas[\[6\]](https://github.com/phaserjs/phaser/tree/v4.2.1 "来源 6 · 最后检查时间 2026-12-02") |
| 物理 | 在支持的原生平台上使用Jolt。watchOS使用不同的后端。[\[1\]](https://github.com/Bloom-Engine/engine/tree/3cde2788 "来源 1 · 最后检查时间 2026-12-02")[\[4\]](https://github.com/Bloom-Engine/engine/blob/3cde2788/docs/watchos-target.md "来源 4 · 最后检查时间 2026-12-02") | Arcade / Matter.js[\[6\]](https://github.com/phaserjs/phaser/tree/v4.2.1 "来源 6 · 最后检查时间 2026-12-02") |
| 智能体工作方式 | 由Perry编译的TypeScript文件[\[1\]](https://github.com/Bloom-Engine/engine/tree/3cde2788 "来源 1 · 最后检查时间 2026-12-02") | npm create @phaserjs/game@latest · MCP[\[6\]](https://github.com/phaserjs/phaser/tree/v4.2.1 "来源 6 · 最后检查时间 2026-12-02")[\[8\]](https://phaser.io/editor/pricing "来源 8 · 最后检查时间 2026-12-02") |
| 价格 | 该引擎在其发布的许可下是免费的。[\[1\]](https://github.com/Bloom-Engine/engine/tree/3cde2788 "来源 1 · 最后检查时间 2026-12-02") | 引擎免费。可选编辑器每月 US$12，支持通过 MCP 连接外部代理。托管 AI 的额度另计。[\[8\]](https://phaser.io/editor/pricing "来源 8 · 最后检查时间 2026-12-02")[\[6\]](https://github.com/phaserjs/phaser/tree/v4.2.1 "来源 6 · 最后检查时间 2026-12-02") |

该已发布赛车实验在此引擎中没有运行记录。 [阅读实验详情](https://bloomengine.dev/zh-Hans/blog/one-racing-game-six-ways) · [代码与日志](https://github.com/Bloom-Engine/racer-experiment)

## 移动精灵

精灵以每秒 120 个单位的速度右移，到达 640 时回到起点。 [下载 sprite.png](https://bloomengine.dev/compare/sprite.png)

### Bloom Engine

将 sprite.png 放在可执行文件旁边，并从该目录启动它。使用发布的引擎配合 Perry 和 Rust。[\[1\]](https://github.com/Bloom-Engine/engine/tree/3cde2788 "来源 1 · 最后检查时间 2026-12-02")[\[2\]](https://registry.npmjs.org/@bloomengine/engine/latest "来源 2 · 最后检查时间 2026-12-02")[\[3\]](https://github.com/Bloom-Engine/editor#status "来源 3 · 最后检查时间 2026-12-02")[\[4\]](https://github.com/Bloom-Engine/engine/blob/3cde2788/docs/watchos-target.md "来源 4 · 最后检查时间 2026-12-02")

main.ts

```
import { initWindow, runGame, clearBackground, Colors } from "@bloomengine/engine";
import { loadTexture, drawTexture } from "@bloomengine/engine/textures";

initWindow(640, 360, "Bloom");
const sprite = loadTexture("sprite.png");
let x = 0;
runGame((dt) => {
  x = (x + 120 * dt) % 640;
  clearBackground(Colors.BLACK);
  drawTexture(sprite, Math.floor(x), 180, Colors.WHITE);
});
```

### Phaser

在 Phaser 项目中运行此模块，把 sprite.png 放在公共目录。[\[6\]](https://github.com/phaserjs/phaser/tree/v4.2.1 "来源 6 · 最后检查时间 2026-12-02")[\[7\]](https://phaser.io/phaser4 "来源 7 · 最后检查时间 2026-12-02")[\[8\]](https://phaser.io/editor/pricing "来源 8 · 最后检查时间 2026-12-02")[\[9\]](https://phaser.io/tutorials/bring-your-phaser-game-to-ios-and-android-with-capacitor "来源 9 · 最后检查时间 2026-12-02")

main.js

```
import Phaser from "phaser";

class GameScene extends Phaser.Scene {
  preload() {
    this.load.image("sprite", "sprite.png");
  }
  create() {
    this.sprite = this.add.image(0, 180, "sprite");
  }
  update(time, delta) {
    this.sprite.x = (this.sprite.x + 120 * delta / 1000) % 640;
  }
}
new Phaser.Game({ width: 640, height: 360, scene: GameScene });
```

## 适合选择 Bloom 的情况

你希望同一个 TypeScript 游戏在移动端能够使用原生渲染，并且可以混合精灵与 3D 模型。[\[1\]](https://github.com/Bloom-Engine/engine/tree/3cde2788 "来源 1 · 最后检查时间 2026-12-02")[\[2\]](https://registry.npmjs.org/@bloomengine/engine/latest "来源 2 · 最后检查时间 2026-12-02")[\[3\]](https://github.com/Bloom-Engine/editor#status "来源 3 · 最后检查时间 2026-12-02")[\[4\]](https://github.com/Bloom-Engine/engine/blob/3cde2788/docs/watchos-target.md "来源 4 · 最后检查时间 2026-12-02")

## 适合选择 Phaser 的情况

你需要瓦片地图、Arcade 或 Matter 物理系统、场景模板以及可视化的 2D 工作流程。[\[6\]](https://github.com/phaserjs/phaser/tree/v4.2.1 "来源 6 · 最后检查时间 2026-12-02")[\[7\]](https://phaser.io/phaser4 "来源 7 · 最后检查时间 2026-12-02")[\[8\]](https://phaser.io/editor/pricing "来源 8 · 最后检查时间 2026-12-02")[\[9\]](https://phaser.io/tutorials/bring-your-phaser-game-to-ios-and-android-with-capacitor "来源 9 · 最后检查时间 2026-12-02")

## 迁移说明

用 Capacitor 封装现有游戏，在手机上检查触控、音频和切回应用后的恢复情况。要估算移植到 Bloom 的工作量，可用相同纹理和碰撞规则重建一个可玩的场景。[\[6\]](https://github.com/phaserjs/phaser/tree/v4.2.1 "来源 6 · 最后检查时间 2026-12-02")[\[7\]](https://phaser.io/phaser4 "来源 7 · 最后检查时间 2026-12-02")[\[8\]](https://phaser.io/editor/pricing "来源 8 · 最后检查时间 2026-12-02")[\[9\]](https://phaser.io/tutorials/bring-your-phaser-game-to-ios-and-android-with-capacitor "来源 9 · 最后检查时间 2026-12-02")[\[1\]](https://github.com/Bloom-Engine/engine/tree/3cde2788 "来源 1 · 最后检查时间 2026-12-02")

## 常见问题解答

### 我可以从 Phaser 游戏中保留什么？

美术资源、数据和独立的 TypeScript 规则是良好的起点。场景生命周期、绘制调用和物理系统需要重新实现。[\[6\]](https://github.com/phaserjs/phaser/tree/v4.2.1 "来源 6 · 最后检查时间 2026-12-02")[\[7\]](https://phaser.io/phaser4 "来源 7 · 最后检查时间 2026-12-02")[\[8\]](https://phaser.io/editor/pricing "来源 8 · 最后检查时间 2026-12-02")[\[9\]](https://phaser.io/tutorials/bring-your-phaser-game-to-ios-and-android-with-capacitor "来源 9 · 最后检查时间 2026-12-02")

### 使用 Phaser 要花多少钱？

引擎免费。可选编辑器每月 US$12，支持通过 MCP 连接外部代理。托管 AI 的额度另计。[\[8\]](https://phaser.io/editor/pricing "来源 8 · 最后检查时间 2026-12-02")[\[6\]](https://github.com/phaserjs/phaser/tree/v4.2.1 "来源 6 · 最后检查时间 2026-12-02")

### 在迁移到Bloom时，我可以复用什么内容？

保留精灵图集、关卡数据和基础 TypeScript 规则。重新构建 Phaser 场景、输入回调和物理交互逻辑，以适配 Bloom 的 API。[\[6\]](https://github.com/phaserjs/phaser/tree/v4.2.1 "来源 6 · 最后检查时间 2026-12-02")[\[7\]](https://phaser.io/phaser4 "来源 7 · 最后检查时间 2026-12-02")[\[8\]](https://phaser.io/editor/pricing "来源 8 · 最后检查时间 2026-12-02")[\[9\]](https://phaser.io/tutorials/bring-your-phaser-game-to-ios-and-android-with-capacitor "来源 9 · 最后检查时间 2026-12-02")[\[1\]](https://github.com/Bloom-Engine/engine/tree/3cde2788 "来源 1 · 最后检查时间 2026-12-02")

### 哪些Bloom的限制对这个决策有影响？

Bloom 处于预览阶段，发布的包版本为 0.4.19。构建需要 Perry 和 Rust。生态较小，游戏逻辑以代码编写。独立的 World Editor 支持地形编辑和实体放置，预制件创作功能尚未完成。 Bloom 未内置通用可视化玩法编辑器。[\[1\]](https://github.com/Bloom-Engine/engine/tree/3cde2788 "来源 1 · 最后检查时间 2026-12-02")[\[2\]](https://registry.npmjs.org/@bloomengine/engine/latest "来源 2 · 最后检查时间 2026-12-02")[\[3\]](https://github.com/Bloom-Engine/editor#status "来源 3 · 最后检查时间 2026-12-02")[\[4\]](https://github.com/Bloom-Engine/engine/blob/3cde2788/docs/watchos-target.md "来源 4 · 最后检查时间 2026-12-02")

[Bloom 和 Phaser 如何选择？](https://bloomengine.dev/zh-Hans/compare/phaser)

## 源代码

最后检查时间 2026年12月2日

1.  [github.com /Bloom-Engine/engine/tree/3cde2788](https://github.com/Bloom-Engine/engine/tree/3cde2788)
2.  [registry.npmjs.org /@bloomengine/engine/latest](https://registry.npmjs.org/@bloomengine/engine/latest)
3.  [github.com /Bloom-Engine/editor](https://github.com/Bloom-Engine/editor#status)
4.  [github.com /Bloom-Engine/engine/blob/3cde2788/docs/watchos-target.md](https://github.com/Bloom-Engine/engine/blob/3cde2788/docs/watchos-target.md)
5.  [apps.apple.com /us/app/bloom-jump/id6761447092](https://apps.apple.com/us/app/bloom-jump/id6761447092)
6.  [github.com /phaserjs/phaser/tree/v4.2.1](https://github.com/phaserjs/phaser/tree/v4.2.1)
7.  [phaser.io /phaser4](https://phaser.io/phaser4)
8.  [phaser.io /editor/pricing](https://phaser.io/editor/pricing)
9.  [phaser.io /tutorials/bring-your-phaser-game-to-ios-and-android-with-capacitor](https://phaser.io/tutorials/bring-your-phaser-game-to-ios-and-android-with-capacitor)
10.  [phaser.io /download/phaser4](https://www.phaser.io/download/phaser4)
11.  [phaser.io /editor](https://phaser.io/editor)

[Markdown](https://bloomengine.dev/zh-Hans/alternatives/phaser-native-mobile.md)
