Corona SDK 或 Xcode 哪个更适合构建游戏?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6053057/
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 03:56:51  来源:igfitidea点击:

Which is better for building a game, Corona SDK or Xcode?

iphonexcodedevicecoronasdk

提问by Duncan

I recently looked at Bubble Ball's website, and it says Built With Corona SDK. I've never heard of Corona, and, from what I read, it lets you create games for devices with very little code. I'm not convinced. Which should I go with? Xcode or Corona SDK?

我最近查看了 Bubble Ball 的网站,上面写着用 Corona SDK 构建。我从未听说过 Corona,而且,从我读到的内容来看,它可以让您用很少的代码为设备创建游戏。我不相信。我应该和哪个一起去?Xcode 还是 Corona SDK?

EDIT: To clarify, I would like to know which is better for building a good, solid iPhone game.

编辑:澄清一下,我想知道哪个更适合构建一个好的、可靠的 iPhone 游戏。

采纳答案by Rexeisen

It's really a matter of how much risk are you willing to take.

这实际上是您愿意承担多少风险的问题。

XCode may take longer, but you know it'll get accepted and new iOS versions won't completely hose it up.

XCode 可能需要更长的时间,但您知道它会被接受并且新的 iOS 版本不会完全解决它。

Corona will write less code getting to 90%. That last 10% may be a real pain though. If Apple comes out with iOS XXX and everything breaks. You're waiting on Corona to update their SDK until you can update your app. Or if Apple releases a new feature, you'll wait for the Corona update before you can take advantage of it.

Corona 将编写更少的代码,达到 90%。不过,最后的 10% 可能是一个真正的痛苦。如果 Apple 推出 iOS XXX 并且一切都失败了。您正在等待 Corona 更新他们的 SDK,直到您可以更新您的应用程序。或者,如果 Apple 发布新功能,您将等待 Corona 更新,然后才能利用它。

Personally, I'm a native XCode guy. These frameworks do have their place though.

就个人而言,我是一个原生的 XCode 人。不过,这些框架确实有其一席之地。

回答by J. A. Whye

Which is better for creating a good, solid iPhone game?

哪个更适合创建优秀、可靠的 iPhone 游戏?

That's not a question anybody can answer for you. What may be better for you isn't necessarily better for the next guy.

这不是任何人都可以为你回答的问题。对你更好的不一定对下一个人更好。

Last fall after more than two decades as a programmer I decided to learn Objective-C and Xcode and start making iPhone apps. After a few weeks going through tutorials in a couple books and slowly getting up to speed I stumbled across Corona SDK.

作为一名程序员二十多年后,去年秋天我决定学习 Objective-C 和 Xcode 并开始制作 iPhone 应用程序。几个星期后,通过几本书的教程并慢慢加快速度,我偶然发现了 Corona SDK。

I was pissed.

我很生气。

Because I don't want to CODE, I want to write games. And here was an SDK, that, while still required coding, cut such a huge chunk off the learning curve that for me and what I wanted to do it made perfect sense. (I was pissed that I'd "wasted" time because Ansca Mobile didn't do enough advertising for me to know about Corona SDK ahead of that time.)

因为我不想编码,我想写游戏。这里有一个 SDK,虽然仍然需要编码,但从学习曲线中削减了如此巨大的一部分,这对我和我想做的事情来说非常有意义。(我很生气我“浪费”了时间,因为 Ansca Mobile 没有做足够的广告让我提前了解 Corona SDK。)

The games I want to write are 2D puzzle games, adventure/RPG, and arcade games. If you want to do something that requires all the power you can pull from the device you'll probably NOT want to use Corona -- you give up some power in exchange for faster/easier development.

我想写的游戏是2D益智游戏、冒险/RPG、街机游戏。如果你想做一些需要你可以从设备中提取的所有能量的事情,你可能不想使用 Corona——你放弃一些能量以换取更快/更容易的开发。

Corona SDK uses Lua as the language that ties it all together and even if you have no experience with it, Lua is pretty easy to pick up.

Corona SDK 使用 Lua 作为将它们联系在一起的语言,即使您没有使用它的经验,Lua 也很容易上手。

With Xcode/Obj-C you can do anything your heart desires -- with Corona SDK you are limited to what it has available. For example, in the past, while AdMob could be used in Corona-based apps, iAds could not. Enabling OpenFeint is a 1-liner, but GameCenter wasn't available except via OpenFeint.

使用 Xcode/Obj-C,您可以做任何您想做的事情——使用 Corona SDK,您可以做任何可用的事情。例如,在过去,虽然 AdMob 可以用于基于 Corona 的应用程序,但 iAds 不能。启用 OpenFeint 是一种 1-liner,但除了通过 OpenFeint 之外,GameCenter 不可用。

Those two examples are things I expect Corona to support sooner rather than later. Ansca Mobile has been very good about releasing regular updates with new functionality and better performance.

这两个例子是我希望 Corona 尽早支持的事情。Ansca Mobile 一直非常擅长发布具有新功能和更好性能的定期更新。

So while there are some limitations with a tool like Corona SDK, there are advantages you just don't get when you "roll your own."

因此,虽然 Corona SDK 之类的工具存在一些限制,但当您“自己动手”时,您将无法获得一些优势。

Hard-core racing games? First-person shooters? Anything 3-D based? Corona SDK is probably not for you.

硬核赛车游戏?第一人称射击游戏?任何基于 3-D 的东西?Corona SDK 可能不适合您。

But most other game genres? I wouldn't use anything else but Corona SDK.

但大多数其他游戏类型呢?除了 Corona SDK,我不会使用其他任何东西。

Yes, I am a fanboi.

是的,我是粉丝。

Jay

回答by drekka

I've spent many, many years working in the Java EE world where we have 1001 APIs, builders, frameworks and GUI driven tools that all claim to accelerate the development process. Some do, some don't and some are more trouble than they are worth. There are several things to understand before choosing to go down this route.

我在 Java EE 领域工作了很多年,我们拥有 1001 个 API、构建器、框架和 GUI 驱动工具,它们都声称可以加速开发过程。有些做,有些不做,有些麻烦超过了它们的价值。在选择走这条路之前,有几件事需要了解。

Firstly, yes these tools get you up and running fast. But there is a hidden cost. You are severely limited by the facilities that the tool provides. Its not unusual that you will want to do something the tool cannot do or support. Then you have a problem - do you abandon the tool and start from scratch? do you try to hack it? or do you put everything on hold until the tool updates?

首先,是的,这些工具可以让您快速启动和运行。但是有一个隐藏的成本。您受到该工具提供的工具的严重限制。您想要做一些工具无法完成或支持的事情并不罕见。那么你有一个问题——你是否放弃了这个工具,从头开始?你尝试破解它吗?还是在工具更新之前将所有内容都搁置?

Secondly there's the bug aspect. Every time you include something extra, you also include any bugs or poor design decisions behind it. For example I once used an API that pro-ported to simplify using the Lucene search engine in a Java application. It did, but a very poorly design implementation meant that we then waste two days figuring out it has issues that were unresolvable. We then lost another 2 days whilst we waiting for the author to tell us he wasn't going to fix it. So we lost around a week in time total before we ripped it out. Much more than if we had just manually written the code necessary to include Lucene.

其次是错误方面。每次你包含一些额外的东西时,你也会包含它背后的任何错误或糟糕的设计决策。例如,我曾经使用过一个 API,该 API 专门用于简化在 Java 应用程序中使用 Lucene 搜索引擎的过程。确实如此,但是一个非常糟糕的设计实现意味着我们浪费了两天的时间来弄清楚它存在无法解决的问题。然后我们又浪费了 2 天时间,等待作者告诉我们他不会修复它。所以在我们撕掉它之前,我们总共损失了大约一周的时间。比我们手动编写包含 Lucene 所需的代码要多得多。

Then there's @Rexeisen's point about the delays in getting new features - a good point to keep in mind.

然后是@Rexeisen 关于延迟获取新功能的观点 - 记住这一点。

This all doesn't mean that external APIs and tools are to be avoided, I use quite a few myself. But I'm pretty choosy about them. How well supported are they? how flexible are they? can they be extended? how hard would it be to rip them out? what are their limits? are they really going to help me or am I just swapping one set of issues for another? All these questions are important before you start using them in anger.

这并不意味着要避免使用外部 API 和工具,我自己使用了很多。但我对他们很挑剔。他们的支持程度如何?他们有多灵活?它们可以延长吗?撕掉它们有多难?他们的限制是什么?他们真的会帮助我还是我只是将一组问题换成另一组问题?在你开始愤怒地使用这些问题之前,所有这些问题都很重要。

So what I'm trying to say is don't do what I've seen so many do - find something shiny and new with a big sales blurb and just leap in with it thinking it will save the world. They usually don't. Take a hard look first and then decide if you want to give it a try.

所以我想说的是不要做我见过的很多人做的事情——找到一些闪亮的新东西,大肆宣传,然后跳进去,认为它会拯救世界。他们通常不会。先仔细看看,然后再决定是否要试一试。

Finally, and I cannot emphasis this enough - there is no substitute for knowing the nuts and bolts of developing something from scratch.

最后,我再怎么强调也不为过——了解从头开始开发的具体细节是无可替代的。

回答by jhocking

First off, it depends what kind of game you want to make. This choice is only relevant for 2D games since that's the only sort of game Corona supports. If you want to do a 3D game then look elsewhere (eg. Unity.)

首先,这取决于你想制作什么样的游戏。此选择仅与 2D 游戏相关,因为这是 Corona 支持的唯一类型的游戏。如果你想做一个 3D 游戏,那就去别处看看(例如 Unity。)

Second, by "XCode" I'm going to interpret your question to mean "cocos2D" because I'm hard-pressed to think of a reason why you wouldn't use cocos2D if you are going the route of programming in Objective-C.

其次,通过“XCode”,我将您的问题解释为“cocos2D”,因为如果您要采用 Objective-C 编程,我很难想出为什么不使用 cocos2D 的原因.

That said...

那说...

cocos2D is an awesome framework and the best one to use if you need the flexibility of a native library and/or absolutely need features not supported in Corona. It is not a case of Objective-C or cocos2D; cocos2D is a library you use through XCode and Objective-C.

cocos2D 是一个很棒的框架,如果您需要本机库的灵活性和/或绝对需要 Corona 不支持的功能,那么它是最好的框架。这不是 Objective-C 或 cocos2D 的情况;cocos2D 是您通过 XCode 和 Objective-C 使用的库。

Corona is amazingly productive and the best tool to use if your project can be executed within the feature set. And note that trimming some less critical features is not a bad tradeoff at all because the massively accelerated development process (like 10x, seriously) is very valuable. Even without considering any other shortcuts (and there are a number,) the fact that you're programming in Lua instead of Objective-C makes development an order of magnitude faster.

如果您的项目可以在功能集内执行,Corona 是非常高效的,并且是最好的工具。请注意,修剪一些不太重要的功能根本不是一个糟糕的权衡,因为大规模加速的开发过程(如 10 倍,严重)非常有价值。即使不考虑任何其他快捷方式(并且有很多),您使用 Lua 而不是 Objective-C 编程的事实也使开发速度提高了一个数量级。



The upshot is that I am planning to use Corona for my current and upcoming projects, but am glad I have cocos2D to turn to if I need it.

结果是我计划将 Corona 用于我当前和即将进行的项目,但很高兴我可以在需要时使用 cocos2D。