我用Unity3d工作过一段时间,发现它的2D部分OnGUI()或GUITextures太笨拙了。此外,即使是在Unity3d上完成的一款最小的游戏也至少需要10MB的下载,这对于2D游戏来说实在是太多了。

所以,我目前正在寻找一个2D引擎。我尝试过Cocos2D,但它只适用于iOS,我不想将所有内容重写为Android的另一种语言(游戏邦注:例如,将Cocos2D移植到Android并不是一种选择)。相反,我希望只编写一次代码,并尽可能地将其部署到iOS、Android和Windows Phone 7上。我有Mac电脑和Windows电脑。

更详细地说,以下是我对引擎的要求:

必须是跨平台的 必须高效 应该是c++, Java, c#或Objective C,因为我对它们很熟悉,而不是Flash, Javascript, HTML5,因为我不是一个web开发人员 你必须拥有一个庞大的社区,教程和额外的库,这些都能够覆盖你在iOS或Android平台上所拥有的大部分内容(游戏邦注:如应用内置付费功能,facebook等)。 最后送出的包裹不能太大 引擎可以是免费的,但我也不介意付个合理的价钱

我发现了以下引擎:

Marmalade (and IwGame engine on top of it) - C++, found overall very positive reviews of Marmalade but not sure about IwGame. EDIT (March 2013): Looks like Marmalade SDK now includes Cocos2Dx and some in-built IDE which makes it much better (and costs $150 per year for indie dev which is ok with me). Corona SDK - Lua (efficiency doubtful), also needs internet connection to compile code Cocos2d-x - C++, received lots of reviews from developers, mostly positive and many think it's best for 2D Particle code - Java+Eclipse, found no reviews or comments Moai - Lua, coudn't find any reviews/opinions on it Monkey engine - seems to have too few features Haxenme - it's Flash, I've never used it and don't want to use Unity3d but with 2D packages like 2D Toolkit ports of SDL to Android (also here) and iOS - doesn't look to have much support or current development (?) GLBasic - Basic language, I don't like it playN - seems to be early in development (?) Gamvas - HTML5, doesn't look like a mature engine to me Ignifuga - Python, also doesn't look mature ORX - not sure if it's still developed (?) Construct 2 - reminds GameMaker, might be ok for rapid prototypes but definitely not for industry-level games XNA and then port the game using ExEn (would need Mono Touch to port to iOS and Mono for Android to port to Android) - C#, and is probably more thought for folks coming from Microsoft products like xBox (I come from Android). Also, those Mono tools cost $800 in total for small developers Impact - JavaScript, uses HTML5. I'm not much into JavaScript (e.g. preferred C# on Unity3d), also not sure about efficiency since it runs in the browser (?) 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? AppGameKit - C++, yet seems to be still pretty new. Haven't found any reviews on it use Cocos2D and Objective C to develop for iOS only and then make an APK for Android out of it using Stella SDK. Has anyone done this? I'm pretty sure there will be limitations, and how about Google's in-app billing, AdMob and Facebook integration on Android? Moscrif - JavaScript, looks like it's more for former web-developers Starling - Flash 11, i'm not much into Flash ND2D - not yet 1.0, does it have many features?

因此,如果您能根据您使用引擎的经验给出评论,并建议列表中的哪个引擎(或我错过的任何其他引擎)最适合描述的需求,我将非常高兴。我对某些引擎的第一印象也可能是错误的。

我目前认为Marmalade+IwGame是最好的选择,但由于我没有太多关于Cocos2d-x和粒子代码的信息,我真的不确定。

谢谢你!

EDIT (June 2013): So far I made 2 cross-platform 2D games and used Unity3D with 2D Toolkit plugin for both. For the game with simple GUI I used a simple self-made GUI system based on Unity's own. For more complex one (e.g. where GUI elements can overlap) I used the NGUI plugin. Recently 2D Toolkit added some more classes for GUI which is very handy since one had to use 2 different systems for texture atlases when combining NGUI with 2D Toolkit. I'll definitely try that one in the next 2D game. The main reason for choosing Unity3D for 2D games was that I already was deep into Unity3D both in terms of experience and accumulated code snippets for re-use. Also, I purchased Unity3D pro (with Android Pro and iOS Pro) for 3D games and it made full sense to just pay additional $60 for the 2D Toolkit to get 2D games also covered. I so far don't regret my decision, it seems to have been optimal for my case. The only thing which gave me headache was adding social features with the Prime31's plugins (Android & iOS social plugins) but I assume that their bugs are not the fault of Prime31 but of Twitter/Facebook instead, so I probably would see the same bugs on any other engine or plugin.

EDIT(2014年1月):我想在Unity 4.3中,我的问题的答案现在很明显了:Unity的新精灵系统和2DToolkit完全击败了其他任何东西,特别是对于那些(像我一样)已经使用Unity一段时间并购买了带有附加组件的Pro版本的人来说。


当前回答

你提到了Haxe/NME,但你似乎本能地不喜欢它。然而,我的经验是非常积极的。当然,该API是Flash API的重新实现,但你并不局限于Flash,你也可以编译成HTML5或原生Windows、Mac、iOS和Android应用。Haxe是一种令人愉快的现代语言,类似于Java或c#。

如果你感兴趣,我已经写了一些我使用Haxe/NME: link的经验

其他回答

看看Loom (http://theengine.co)是一个新的跨平台2D游戏引擎,具有设备上的热交换代码和资产。这意味着你可以在Photoshop中处理你的资产,你可以更新代码,修改应用/游戏的UI,然后在应用运行时在设备上看到变化。

Thinking to the other cross platform game engines I’ve heard of or even played with, the Loom Game Engine is by far the best in my oppinion with lots of great features. Most of the other similar game engines (Corona SDK, MOAI SDK, Gideros Mobile) are Lua based (with an odd syntax, at least for me). The Loom Game Engine uses LoomScripts, a scripting language inspired from ActionScript 3, with a couple of features borrowed from C#. If you ever developed in ActionScript 3, C# or Java, LoomScript will look familiar to you (and I’m more comfortable with this syntax than with Lua’s syntax).

Loom Game Engine的1年授权费用为500美元,我认为这对于任何独立游戏开发者来说都是一个可以承受的价格。几周前,他们还提供了1年的免费许可证。在许可证到期后,你仍然可以使用Loom来创建和部署你自己的游戏,但你不会得到任何进一步的更新。《Loom》的创造者非常有信心,他们承诺会不断完善自己的宝贝,让它值得购买另一个授权。

话不多说,以下是织机的伟大功能:

Cross platform (iOS, Android, OS X, Windows, Linux/Ubuntu) Rails-inspired workflow lets you spend your time working with your game (one command to create a new project, and another command to run it) Fast compiler Live code and assets editing Possibility to integrate third party libraries Uses Cocos2DX for rendering XML, JSON support LML (markup language) and CSS for styling UI elements UI library Dependency injection Unit test framework Chipmunk physics Seeing your changes live makes multidevice development easy Small download size Built for teams

你可以在这里找到更多关于Loom的视频:http://www.youtube.com/user/LoomEngine?feature=watch

看看这4部分的深入教程:http://www.gamefromscratch.com/post/2013/02/28/A-closer-look-at-the-Loom-game-engine-Part-one-getting-started.aspx

I've worked with Marmalade and I found it satisfying. Although it's not free and the developer community is also not large enough, but still you can handle most of the task using it's tutorials. (I'll write my tutorials once I got some times too). IwGame is a good engine, developed by one of the Marmalade user. It's good for a basic game, but if you are looking for some serious advanced gaming stuff, you can also use Cocos2D-x with Marmalade. I've never used Cocos2D-x, but there's an Extension on Marmalade's Github. Another good thing about Marmalade is it's EDK (Extension Development Kit), which lets you make an extension for whatever functionality you need which is available in native code, but not in Marmalade. I've used it to develop my own Customized Admob extension and a Facebook extension too.

Edit: Marmalade now has it's own RAD(Rapid Application Development) tool just for 2D development, named as Marmalade Quick. Although the coding will be in Lua not in C++, but since it's built on top of C++ Marmalade, you can easily include a C++ library, and all other EDK extensions. Also the Cocos-2Dx and Box2D extensions are preincluded in the Quick. They recently launched it's Release version (It was in beta for 3-4 months). I think we you're really looking for only 2D development, you should give it a try.

更新: Unity3D最近推出了对2D游戏的支持,这似乎比任何其他2D游戏引擎都要好,因为它的GUI和编辑器。物理,精灵等支持是内置的。你可以看看。

更新2 Marmalade将停止他们的SDK,转而支持他们的内部游戏制作。所以依赖于它不是一个明智的决定。

你提到了Haxe/NME,但你似乎本能地不喜欢它。然而,我的经验是非常积极的。当然,该API是Flash API的重新实现,但你并不局限于Flash,你也可以编译成HTML5或原生Windows、Mac、iOS和Android应用。Haxe是一种令人愉快的现代语言,类似于Java或c#。

如果你感兴趣,我已经写了一些我使用Haxe/NME: link的经验

我已经尝试了AppGameKit,它是c++和Basic。 用Basic编写2d游戏非常简单,包含物理、碰撞和堆等内容。 它也在积极开发中,而且非常便宜(65美元)。 主要的问题是它很难在Android上编译(你需要下载大量的文件并遵循困难的指南之类的东西) 我的观点是,对于商业用途来说它还不够好,但是对于独立程序员来说是很好的 它是一个中等规模的社区

BadLogicGames的LibGDX怎么样?