Corona SDK 和 Xcode 哪个更适合构建游戏?
我最近浏览了 Bubble Ball 的网站,上面写着“Built With Corona SDK”。我从未听说过 Corona,而且据我所知,它可以让您用很少的代码为设备创建游戏。我不相信。我应该选择哪个? Xcode 还是 Corona SDK?
编辑: 澄清一下,我想知道哪一个更适合构建一款优秀、稳定的 iPhone 游戏。
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?
EDIT:
To clarify, I would like to know which is better for building a good, solid iPhone game.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
哪一个更适合创建优秀、可靠的 iPhone 游戏?
这不是任何人都能替你回答的问题。对你来说更好的东西不一定对下一个人更好。
去年秋天,在担任了二十多年的程序员之后,我决定学习 Objective-C 和 Xcode,并开始制作 iPhone 应用程序。经过几周时间浏览了几本书中的教程并慢慢跟上速度后,我偶然发现了 Corona SDK。
我很生气。
因为我不想写代码,我想写游戏。这里有一个 SDK,虽然仍然需要编码,但大大缩短了学习曲线,这对我和我想做的事情来说是非常有意义的。 (我很生气我“浪费”了时间,因为 Ansca Mobile 没有做足够的广告让我提前了解 Corona SDK。)
我想编写的游戏是 2D 益智游戏、冒险/角色扮演游戏和街机游戏。如果您想做的事情需要从设备中获取所有电量,您可能不想使用 Corona - 您会放弃一些电量以换取更快/更轻松的开发。
Corona SDK 使用 Lua 作为将所有内容联系在一起的语言,即使您没有使用它的经验,Lua 也很容易上手。
使用 Xcode/Obj-C,您可以做任何您想做的事 - 使用 Corona SDK,您只能使用它所提供的功能。例如,过去,虽然 AdMob 可以在基于 Corona 的应用程序中使用,但 iAds 却不能。启用 OpenFeint 是一件简单的事情,但除了通过 OpenFeint 之外,GameCenter 不可用。
我希望 Corona 尽快支持这两个例子。 Ansca Mobile 非常擅长定期发布新功能和更好性能的更新。
因此,虽然像 Corona SDK 这样的工具存在一些限制,但当您“自己开发”时,却无法获得一些优势。
硬核赛车游戏?第一人称射击游戏?有什么基于 3D 的吗? Corona SDK 可能不适合您。
但大多数其他游戏类型呢?除了 Corona SDK,我不会使用其他任何东西。
是的,我是一个粉丝。
杰伊
Which is better for creating a good, solid iPhone game?
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.
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.)
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.
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.
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.
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.
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."
Hard-core racing games? First-person shooters? Anything 3-D based? Corona SDK is probably not for you.
But most other game genres? I wouldn't use anything else but Corona SDK.
Yes, I am a fanboi.
Jay
我在 Java EE 世界工作了很多很多年,这里有 1001 个 API、构建器、框架和 GUI 驱动工具,所有这些都声称可以加速开发过程。有些这样做,有些不这样做,有些则带来的麻烦超过了其价值。在选择走这条路之前,有几件事需要了解。
首先,是的,这些工具可以让您快速启动和运行。但有一个隐性成本。您受到该工具提供的设施的严重限制。您想要做该工具无法完成或支持的事情并不罕见。那么你就会遇到一个问题——你会放弃这个工具并从头开始吗?你会尝试破解它吗?或者你会暂停一切直到工具更新吗?
其次是错误方面。每次添加额外的内容时,您也会添加其背后的任何错误或糟糕的设计决策。例如,我曾经使用过一个 API,它可以简化在 Java 应用程序中使用 Lucene 搜索引擎的过程。确实如此,但设计实施非常糟糕,意味着我们花了两天时间才发现它存在无法解决的问题。然后我们又浪费了两天时间等待作者告诉我们他不打算修复它。所以在我们把它撕掉之前,我们总共损失了大约一周的时间。比我们手动编写包含 Lucene 所需的代码要好得多。
然后是 @Rexeisen 关于获得新功能的延迟的观点 - 这是一个值得记住的好观点。
这并不意味着要避免使用外部 API 和工具,我自己就使用了相当多的 API 和工具。但我对它们很挑剔。他们的支持程度如何?他们有多灵活?可以延长吗?把它们撕下来有多难?他们的极限是什么?他们真的会帮助我吗?还是我只是将一组问题换成另一组问题?在你开始愤怒地使用这些问题之前,所有这些问题都很重要。
所以我想说的是,不要做我见过很多人做的事情——找到一些闪亮的、新的、带有大销售宣传的东西,然后就跳进去,认为它会拯救世界。他们通常不会。先仔细看看,然后再决定是否要尝试一下。
最后,我必须强调这一点——没有什么可以替代了解从头开始开发某些东西的具体细节。
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.
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.
Then there's @Rexeisen's point about the delays in getting new features - a good point to keep in mind.
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.
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.
这实际上是一个你愿意承担多大风险的问题。
XCode 可能需要更长的时间,但你知道它会被接受,而且新的 iOS 版本不会完全解决它。
Corona 将编写更少的代码,达到 90%。不过,最后 10% 可能是一个真正的痛苦。如果苹果推出 iOS XXX 并且一切都崩溃了。您正在等待 Corona 更新其 SDK,直到您可以更新您的应用程序。或者,如果 Apple 发布了新功能,您将等待 Corona 更新才能使用它。
就我个人而言,我是一个原生 XCode 爱好者。不过,这些框架确实有其用武之地。
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.
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.
Personally, I'm a native XCode guy. These frameworks do have their place though.
首先,这取决于你想制作什么类型的游戏。此选择仅与 2D 游戏相关,因为这是 Corona 支持的唯一游戏类型。如果你想做 3D 游戏,那就看看其他地方(例如 Unity。)
其次,通过“XCode”,我将把你的问题解释为“cocos2D”,因为我很难想出你为什么这么做的原因。如果您打算使用 Objective-C 进行编程,则不会使用 cocos2D。
也就是说...
cocos2D 是一个很棒的框架,如果您需要本机库的灵活性和/或绝对需要 Corona 不支持的功能,那么它是最好的选择。这不是 Objective-C 或 cocos2D 的情况; cocos2D 是一个通过 XCode 和 Objective-C 使用的库。
Corona 具有惊人的生产力,如果您的项目可以在功能集中执行,那么它是最好的工具。请注意,修剪一些不太重要的功能根本不是一个糟糕的权衡,因为大规模加速的开发过程(例如 10 倍,严重的是)非常有价值。即使不考虑任何其他快捷方式(并且有很多),使用 Lua 而不是 Objective-C 进行编程的事实也会使开发速度加快一个数量级。
结果是,我计划将 Corona 用于我当前和即将进行的项目,但很高兴如果我需要的话,我可以求助于 cocos2D。
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.)
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.
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.
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.
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.