这篇文章上次修改于 699 天前,可能其部分内容已经发生变化,如有疑问可询问作者。

1 cocos creator

Cocos2d-x is an open-source and cross platform open source free 2D game engine for mobile game development known for its speed, stability, and easy of use.

  1. 开发环境只支持 Windows 和 Mac,不支持 Linux
  2. 拥有 UI 编辑器,可方便地在界面对组件进行拖动、旋转等操作
  3. 支持 JavaScript 和 TypeScript
  4. 不方便与 react、vue 等 web 框架结合

    1. https://discuss.cocos2d-x.org/t/integrating-a-mini-game-into-the-application-as-module/48066
    2. https://juejin.cn/post/6949044814008549389
    3. https://forum.cocos.org/t/topic/125805
  5. 示例相对较少
  6. 跨平台,游戏可以快速发布到 Web、iOS、Android、HarmonyOS、Web、Windows、Mac,以及各个小游戏平台

2 phaser

Desktop and Mobile HTML5 game framework. A fast, free and fun open source framework for Canvas and WebGL powered browser games.

  1. 开发环境支持 Linux、Windows 和 Mac
  2. 开局一个canvas, 剩下全靠自己画
  3. 支持 JavaScript 和 TypeScript
  4. 方便与 react、vue 等 web 框架结合:

    1. https://github.com/yandeu/phaser3-react-typescript-example
    2. https://github.com/Sun0fABeach/vue-phaser3
    3. https://phaser.io/examples/v3/view/events/create-event-emitter
    4. https://vuedose.tips/build-a-game-in-vuejs-with-phaser
  5. 拥有丰富的示例:https://helpcenter.phasereditor2d.com/
  6. Games can be compiled to iOS, Android and native desktop apps via 3rd party tools.