windows 2D 跨平台游戏开发引擎

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/17584717/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 10:40:46  来源:igfitidea点击:

2D Cross-Platform Game Development Engines

windowsmobilecross-platform2dgame-engine

提问by Hate Names

I've worked for some time with Corona SDK and love how fast and easy I can create powerful apps using Lua. But it can only compile for iOS and Android, which feels like too little now.

我已经使用 Corona SDK 工作了一段时间,并且喜欢使用 Lua 创建强大的应用程序是多么快速和轻松。但是只能编译iOS和Android,现在感觉太少了。

My main interest is for it to be able to compile to Desktop AND Mobile. At least for the following:

我的主要兴趣是它能够编译到桌面和移动设备。至少在以下方面:

  • Windows + Mac for desktop, as standalone applications.
  • iOS + Android for mobile.
  • 用于桌面的 Windows + Mac,作为独立应用程序。
  • 适用于移动设备的 iOS + Android。

I'd prefer it to lean more towards Lua type scripting instead of ActionScript, but please feel free to post anything that you have worked with and love.

我更喜欢它更倾向于 Lua 类型脚本而不是 ActionScript,但是请随时发布您使用过和喜欢的任何内容。

I've found the following engines so far:

到目前为止,我发现了以下引擎:

  • Marmalade Quick- After further looking into it, Marmalade Quick can only build for Mobile!
  • IwGame- Works on top of marmalade and says it can deploy to desktop and mobile with Lua. Any info is greatly appreciated on this
  • sio2- Says "SIO2 is an OpenGLES based cross-platform 2D and 3D game engine for iOS, Android, MacOS and Windows" and "The engine also allows you to port your game on the Mac Store and on Windows.", but their forum and web title is "Game Engine for Mobile Devices". Can't find any info on if it can deploy to desktop platforms, any info is greatly appreciated again.
  • Loom Engine- Loom is similar to Haxe + OpenFL (attempts to attract Flash developers) in that it uses AS3-like of ECMAScript, but it doesn't build native code from it. However it uses Cocos2D for rendering so it should in theory be as fast as Cocos2D. -- Thanks to Bojan.
  • SDL- I've read in multiple places that SDL can deploy to nearly any platform or device and has a Lua binding. But i can't find how this works as it's not an engine. Any one who can explain how it works and if it's possible is once again, very much appreciated.
  • SFML- "Windows, Linux, Mac OS X and soon Android & iOS. " doesn't use Lua but can use other languages like Java and Python etc. Anyone have any information on this?
  • Torgue2D- "Torque 2D was developed with OS X, Windows, and iOS devices in mind and works equally well on all the platforms." uses TorgueScript and no Android =(
  • Sencha- Seems to compile to all platforms, uses Javascript too which I know. But even with V8 JS would this work well performance wise compared to other options?
  • GameMaker- own scripting language GML and I actually remember this one as a tool for non-programmers. Has it actually grown into a real engine, I mean for serious development?
  • Construct2- Same question as gamemaker
  • Corona- Lua but mobile only (Android and iOS only as well)
  • Cocos2D- Seems like it has lots of options but not sure with the same language? Seems like you'd have to re-write your entire code. Any info if cocos2D can deploy to desktop + mobile with almost the same code would be greatly appreciated.
  • Angel2D- Says it can deploy to everything except Android and uses Lua, anyone ever used this one before?
  • libgdx--- I've only seen good things about this. Here is a benchmark test for libgdx and is where I saw it reaching 40k sprites at 60fps. http://www.sparkrift.com/2012/1/love2d-vs-allegro-vs-clanlib-vs-libgdx-vs-cocos2d-x-vs-monogame-vs-xna-vs-sfml. It seems libgdx barely goes over 30k actually. But still seems amazing. This is on the same level as Qt for me, almost perfect, except I'm not really worried about performance on it. libgdx can build for everything pretty much.
  • XNA+ MonoGame--- MonoGame's performance seems only slightly lower than libgdx, can build to most platforms. However I don't know much about XNA and I heard it won't be receiving future updates, but is quite stable? More information is welcome.
  • Citrus--- Don't have much information on Citrus either. AS3 game engine that can build for iOS, Android, Windows, Mac and more.
  • Haxe+ OpenFL--- OpenFL (Haxe) builds to native on many platforms, not just to Flash. Windows, Mac, Linux and Android all get optional native deployment or OpenFL runtime called Neko which is in theory faster than Flash, and SDL 2.0 will enable iOS deployment soon(ish). -- Thanks to Bojan.
  • Qt-Project--- Just linking Qt project here, can build for everything and has a pretty big community with lots of third party libraries to help you even further.
  • Moai---The only Lua engine that I know that can build for Desktop and Mobile. Only downside is the community isn't that big and documentation isn't the best. But if you can get passed those this is a great solution and the one I'm currently using.
  • Adobe--- Can't forget to add adobe here since it can build to everything that supports flash.
  • Unity3D--- Recently announced 2D integration looks very promising, should be released Q3-Q4 of 2013.
  • Cocos2d-x--- An open source engine. Supports JS, Lua, C++ and multiple platforms.
  • Html5--- There seem to be a lot of emphasise on html5 mobile apps, here are just a few tools I found that can help port your html5 project to a platform:

    1. Chromium embedded

    2. Sencha

    3. Phonegap

    4. Appcelerator/Titanium

    5. Icenium
  • Marmalade Quick- 进一步研究后,Marmalade Quick 只能为移动设备构建!
  • IwGame- 在果酱之上工作,并表示它可以使用 Lua 部署到桌面和移动设备。非常感谢任何信息
  • sio2- 说“SIO2 是一个基于 OpenGLES 的跨平台 2D 和 3D 游戏引擎,适用于 iOS、Android、MacOS 和 Windows”和“该引擎还允许您在 Mac 商店和 Windows 上移植您的游戏。”,但他们的论坛网页标题是“移动设备游戏引擎”。找不到关于它是否可以部署到桌面平台的任何信息,再次感谢任何信息。
  • Loom 引擎- Loom 类似于 Haxe + OpenFL(试图吸引 Flash 开发人员),因为它使用类似于 AS3 的 ECMAScript,但它不从中构建本机代码。但是它使用 Cocos2D 进行渲染,因此理论上它应该与 Cocos2D 一样快。——感谢博扬。
  • SDL- 我在多个地方读到 SDL 几乎可以部署到任何平台或设备,并且具有 Lua 绑定。但我找不到它是如何工作的,因为它不是引擎。任何能够解释它是如何工作的以及是否可能的人,都非常感谢。
  • SFML- “Windows、Linux、Mac OS X 以及很快的 Android 和 iOS。”不使用 Lua,但可以使用其他语言,如 Java 和 Python 等。有人有这方面的任何信息吗?
  • Torgue2D- “Torque 2D 是针对 OS X、Windows 和 iOS 设备开发的,并且在所有平台上都运行良好。” 使用 TorgueScript 而没有 Android =(
  • Sencha- 似乎可以编译到所有平台,也使用我知道的 Javascript。但是,即使使用 V8 JS,与其他选项相比,这在性能方面也能很好地工作吗?
  • GameMaker- 自己的脚本语言 GML,我实际上记得这是一个供非程序员使用的工具。它真的成长为一个真正的引擎,我的意思是认真的发展吗?
  • Construct2- 与游戏制作者相同的问题
  • Corona- Lua 但仅限移动设备(也仅限 Android 和 iOS)
  • Cocos2D- 似乎有很多选项,但不确定是否使用相同的语言?似乎您必须重新编写整个代码。如果 cocos2D 可以使用几乎相同的代码部署到桌面 + 移动设备,任何信息都将不胜感激。
  • Angel2D- 说它可以部署到除 Android 之外的所有内容并使用 Lua,以前有人用过这个吗?
  • libgdx---我只看到了关于这个的好东西。这是 libgdx 的基准测试,我看到它以 60fps 的速度达到 40k 精灵。http://www.sparkrift.com/2012/1/love2d-vs-allegro-vs-clanlib-vs-libgdx-vs-cocos2d-x-vs-monogame-vs-xna-vs-sfml。看起来 libgdx 实际上几乎没有超过 30k。但看起来还是很神奇。这对我来说与 Qt 处于同一水平,几乎完美,除了我并不真正担心它的性能。libgdx 几乎可以为所有东西构建。
  • XNA+ MonoGame--- MonoGame 的性能似乎只比 libgdx 略低,可以构建到大多数平台。但是我对 XNA 不太了解,听说它不会收到未来的更新,但它很稳定吗?欢迎提供更多信息。
  • Citrus--- 也没有太多关于 Citrus 的信息。可以为 iOS、Android、Windows、Mac 等构建的 AS3 游戏引擎。
  • Haxe+ OpenFL--- OpenFL (Haxe) 在许多平台上构建到本机,而不仅仅是 Flash。Windows、Mac、Linux 和 Android 都有可选的本地部署或称为 Neko 的 OpenFL 运行时,理论上比 Flash 更快,SDL 2.0 将很快启用 iOS 部署(ish)。——感谢博扬。
  • Qt-Project--- 只需在此处链接 Qt 项目,就可以构建所有内容,并且拥有一个相当大的社区,其中包含许多第三方库,可以进一步帮助您。
  • Moai---我所知道的唯一可以为桌面和移动构建的 Lua 引擎。唯一的缺点是社区不是很大,文档也不是最好的。但是如果你能通过这些,这是一个很好的解决方案,也是我目前正在使用的解决方案。
  • Adobe--- 别忘了在这里添加 adobe,因为它可以构建所有支持 Flash 的东西。
  • Unity3D--- 最近宣布的 2D 集成看起来非常有前途,应该会在 2013 年第三季度到第四季度发布。
  • Cocos2d-x--- 一个开源引擎。支持JS、Lua、C++等多种平台。
  • Html5--- 似乎有很多关于 html5 移动应用程序的强调,这里只是我发现的一些可以帮助将您的 html5 项目移植到平台的工具:

    1. 铬嵌入

    2. 煎茶

    3. 电话沟

    4. Appcelerator/钛金

    5. 冰山

So, I'd be happy if you could comment from your experiences with any engines and suggest which one you would recommend. Thank you for your help!

因此,如果您能根据您使用任何引擎的经验发表评论并建议您推荐哪一个,我会很高兴。感谢您的帮助!

EDIT: Since this topic is getting popular I'll be adding other options I've found over time. I suggest you choose what is most familiar to you and best for your project needs.

编辑:由于这个话题越来越流行,我将添加随着时间的推移我发现的其他选项。我建议您选择您最熟悉且最适合您的项目需求的内容。

回答by Christian Feldbacher

I would recommend V-Play(v-play.net) - it's a cross-platform game engine based on Qt for iOS, Android, Symbian, MeeGo, Blackberry10 and also can export for native desktop applications for Windows, Mac and Linux.

我会推荐V-Play(v-play.net) - 它是一个基于 Qt 的跨平台游戏引擎,适用于 iOS、Android、Symbian、MeeGo、Blackberry10,也可以导出 Windows、Mac 和 Linux 的本机桌面应用程序。

It's based on C++ but has a neat scripting support for QML & JavaScript. QML is a no-brainer to learn and can boost your productivity as less code is needed - just see the comparison with cocos2d-x(60% less Loc) or Corona(15% less LoC) for a comparison of the same games.

它基于 C++,但对QML 和 JavaScript具有简洁的脚本支持。QML 很容易学习,并且可以提高您的工作效率,因为需要的代码更少——只需查看与cocos2d-x(Loc 减少 60%)或Corona(LoC 减少 15%)的比较,即可对相同游戏进行比较。

(Disclaimer: I'm one of the guys behind V-Play)

(免责声明:我是 V-Play 的幕后推手之一)

回答by dirkjot

If you are into using Python, Kivyis a great solution these days. It compiles to all the platforms you ask for:

如果您正在使用 Python,那么现在Kivy是一个很好的解决方案。它编译到您要求的所有平台:

Kivy is running on Linux, Windows, MacOSX, Android and IOS. You can run the same code on all supported platforms. It can use natively most inputs protocols and devices like WM_Touch, WM_Pen, Mac OS X Trackpad and Magic Mouse, Mtdev, Linux Kernel HID, TUIO. A multi-touch mouse simulator is included.

Kivy 可以在 Linux、Windows、MacOSX、Android 和 IOS 上运行。您可以在所有支持的平台上运行相同的代码。它可以使用本机大多数输入协议和设备,如 WM_Touch、WM_Pen、Mac OS X 触控板和魔术鼠标、Mtdev、Linux Kernel HID、TUIO。包括一个多点触控鼠标模拟器。

Kivy uses lots of optimized code for graphics rendering (via Cython) so it is fast too.

Kivy 使用大量优化的代码进行图形渲染(通过 Cython),因此它也很快。

Here is a speakerdeckthat gives you some background and an overview (android specific).

这是一个speakerdeck,为您提供一些背景和概述(特定于Android)。

回答by GameDevSam

How about HaxeFlixel? We have a great selection of demos, and of course support cross platform development via Haxe + OpenFL. This is an open source project hosted on GitHub. We support all major platforms(including iOS).

HaxeFlixel怎么?我们有大量的演示选择,当然还支持通过 Haxe + OpenFL 进行跨平台开发。这是一个托管在GitHub 上的开源项目。我们支持所有主要平台(包括 iOS)。

回答by Denis Muratshin

Here is my game framework Oxygine. It is open source modern hardware accelerated 2D C++ framework for mobile and PC platforms. Features: OpenGL(ES) 2, compressed textures, atlases, complex animations/tweens/sprites, scene graph, fonts, event handling, build tools, and others. Can be built on top of SDL2 or Marmalade SDK.

这是我的游戏框架Oxygine。它是适用于移动和 PC 平台的开源现代硬件加速 2D C++ 框架。特性:OpenGL(ES) 2、压缩纹理、图集、复杂动画/补间/精灵、场景图、字体、事件处理、构建工具等。可以建立在 SDL2 或 Marmalade SDK 之上。

In the basis of the engine there is a scene graph, that is similar to Flash one. To be short, You can call this as Flash for C++, but more comfortable and way faster. Initially it was developed for mobile platforms (iOS, Android), but can be also used for PC games.

在引擎的基础上有一个场景图,类似于 Flash 的场景图。简而言之,您可以将其称为 C++ 的 Flash,但更舒适且速度更快。最初它是为移动平台(iOS、Android)开发的,但也可用于 PC 游戏。

enter image description here

在此处输入图片说明

回答by Steve H

No mention of App Game Kit (AGK)here so let me fill in the gap. It's a mainly 2D cross platform SDK allowing you to code once in either C++ or it's own "Basic" language. Version 2 just got over 400% funding on Kickstarter and will have full 3D support, Spine support (for 2D animated characters), bullet physics and whole bunch of other new features.

此处未提及App Game Kit (AGK),因此让我填补空白。它是一个主要的 2D 跨平台 SDK,允许您使用 C++ 或它自己的“基本”语言进行一次编码。版本 2 刚刚在 Kickstarter 上获得了超过 400% 的资金,并将提供完整的 3D 支持、Spine 支持(用于 2D 动画角色)、子弹物理和一大堆其他新功能。

It already has Facebook, Twitter, a bunch of Ultrabook sensor commands, Box2D and more. I've been using it from the start and love it (can you tell?). No, I don't work for The Game Creators(the company that created it) although I admit I did do for a while making some apps.

它已经有 Facebook、Twitter、一堆超极本传感器命令、Box2D 等等。我从一开始就一直在使用它并喜欢它(你能告诉我吗?)。不,我不为The Game Creators(创建它的公司)工作,尽管我承认我确实做过一段时间制作了一些应用程序。

One of the best features from my point of view is you can develop on Windows and broadcast from the IDE over Wi-Fi to any supported device, so while I'm coding I can (within seconds) test my code on iPad, Android, Windows, Mac or Blackberry Playbook.

从我的角度来看,最好的功能之一是您可以在 Windows 上开发并从 IDE 通过 Wi-Fi 广播到任何受支持的设备,因此当我编码时,我可以(在几秒钟内)在 iPad、Android 上测试我的代码, Windows、Mac 或 Blackberry Playbook。

回答by Andy

If you have C# background. Have a look at Duality.

如果您有 C# 背景。看看二元论。

Dualityis a flexible 2D game framework written entirely in C# – and it's here to make things a little easier for you. It provides both an extensible game engine and a visual editor to match. There will be no need for a level editor, testing environment or content manager because Duality is all that by itself. And best of all: It's free.

Duality是一个完全用 C# 编写的灵活的 2D 游戏框架——它可以让你的工作更轻松一些。它提供了一个可扩展的游戏引擎和一个可视化编辑器来匹配。不需要关卡编辑器、测试环境或内容管理器,因为 Duality 本身就是全部。最重要的是:它是免费的。

回答by Julien

I'm just answering to give you some insights on how the SDL is used. As you said before it's not a game engine (it's just a library actually). Furthermore, it is not object oriented at all and you don't have some easy animation facilities (you have to code them by yourself).

我的回答只是为了让您了解如何使用 SDL。正如您之前所说,它不是游戏引擎(实际上只是一个库)。此外,它根本不是面向对象的,并且您没有一些简单的动画设施(您必须自己编写代码)。

How it works (I used the C version but I guess the Lua binding should be similar):

它是如何工作的(我使用了 C 版本,但我想 Lua 绑定应该是相似的):

Include the headers needed to build the project on the platform you want.

包括在所需平台上构建项目所需的头文件。

Design your own game loop in which you will set up (at least) a whole event processing system, frame rate manager and a "screen cleaner (or updater)" (I'm insisting on the fact that you have to manually refresh your screen using the SDL_flip_screen routine which is something that is not one of your concerns at all with Corona).

设计您自己的游戏循环,您将在其中设置(至少)整个事件处理系统、帧速率管理器和“屏幕清洁器(或更新器)”(我坚持认为您必须手动刷新屏幕使用 SDL_flip_screen 例程,这对于 Corona 来说根本不是您关心的问题之一)。

Then, code your game using all the "mechanics" you made before.

然后,使用您之前制作的所有“机制”对您的游戏进行编码。

The SDL is a low level library (don't expect to have an easy to use GUI framework or the storyboard framework of Corona for instance).

SDL 是一个低级库(不要指望有一个易于使用的 GUI 框架或 Corona 的故事板框架)。

Finally, this library was used to port Civilization III to Linux, so yes it works but it will ask you a lot of energy to have something like you had with Corona ;)

最后,这个库被用来将文明 III 移植到 Linux,所以是的,它可以工作,但它会要求你花费很多精力来拥有像 Corona 那样的东西;)

PS: I am not a native English speaker, so please let me know if I wasn't clear :)

PS:我的母语不是英语,所以如果我不清楚,请告诉我:)

回答by Artūrs Sosins

Gideros is a great Lua based 2d cross platforms engine, currently supporting both Android and IOS platforms, but more to come. And it also has some great features as instant on device testing, auto scaling and auto image resolution to easily target various of screen sizes, as well as the option to extend each platform through native plugins.

Gideros 是一个很棒的基于 Lua 的 2d 跨平台引擎,目前支持 Android 和 IOS 平台,但更多。它还具有一些很棒的功能,如设备即时测试、自动缩放和自动图像分辨率,可轻松定位各种屏幕尺寸,以及通过本机插件扩展每个平台的选项。

回答by Exsigth

You also have ShiVa3D, a serious competitor of Unity3D. It uses Lua and supports many platforms from mobile to game consoles and web browsers.

您还有ShiVa3D,它是 Unity3D 的重要竞争对手。它使用 Lua 并支持从移动设备到游戏机和网络浏览器的许多平台。

Very intuitive to use and very nice UI to work with.

使用起来非常直观,使用起来也非常漂亮。