对于象棋这样的游戏来说,什么是好的 iPhone UI 框架?
我正在尝试为 iphone/ipad 开发一款类似国际象棋的游戏,我已经使用 Objective-C 和 C++ 开发了内部游戏逻辑,这很好,但我想知道在 iphone/ipad 上开发良好 GUI 的可能方法是什么?
据我所知,我可以使用 Core Graphic、cocos2d。
还有吗? 哪一款最适合象棋类游戏? (例如,显示固定的棋盘,将棋子添加到棋盘上,从棋盘上移除棋子,在棋盘上移动棋子)
如果我的问题引起混乱,我已经重新表述了它,希望这使它更清晰一些。 非常感谢
I am trying to develop a chess like game for iphone/ipad, I have developed the internal game logic using objective-c and c++ , that's fine but I am wondering what's the possible ways to develope a good GUI on iphone/ipad ?
As far as I know I could use Core Graphic, cocos2d.
Are there any more ?
And which one might be best suitable for chess like game?
(e.g display a fixed board, add chess piece to the board, remove piece from board, move piece around on board)
If my question was causing come confusing, I have rephrased it, hope this makes it a bit clearer.
Many thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
几个 GUI API。
CoconutKit - 在设计组件时,我强烈强调干净且有文档记录的界面以及代码质量。我的目标是创建易于使用、可靠的组件,并且能够实现其声称的功能,而不会出现令人讨厌的意外情况。您永远不必查看组件实现来了解它是如何工作的,只需查看其接口就应该显而易见。我还努力避免组件泄漏或崩溃。如果您喜欢在图书馆中找到这些品质,那么您现在应该开始使用 CoconutKit!此外,CoconutKit 永远不会使用任何私有 API,因此始终对 AppStore 友好。
Three20 - Three20 是一个开源 Objective-C 库,被 App Store 中的数十个知名品牌使用,其中包括 Facebook 、Posterous、Pulse、Meetup.com 和 SCVNGR。 Three20 提供强大的视图控制器,例如启动器、流行的照片浏览器和互联网感知表格。
tapku - Tapku Library 是一个为 iPhone 和 Android 构建的开源 iOS 框架。 iPad。该框架包括流行的 API,包括 coverflow、日历网格和图表视图。该框架还包含一些代码,这些代码将使 iPhone 和 iPad 的开发变得更加愉快和更快。集成框架很容易,现在就可以直接合并到您的应用程序中。尝试演示以了解您可以在框架中利用的一些功能。
来自他们网站的直接评论。
A couple of GUI apis.
CoconutKit - When designing components, I strongly emphasize on clean and documented interfaces, as well as on code quality. My goal is to create components that are easy to use, reliable, and which do what they claim they do, without nasty surprises. You should never have to look at a component implementation to know how it works, this should be obvious just by looking at its interface. I also strive to avoid components that leak or crash. If those are qualities you love to find in libraries, then you should start using CoconutKit now! Moreover, CoconutKit will never use any private API and will therefore always be AppStore friendly.
Three20 - Three20 is a open source Objective-C library used by dozens of well-known brands in the App Store, including Facebook, Posterous, Pulse, Meetup.com, and SCVNGR. Three20 provides powerful view controllers such as the Launcher, the popular Photo Browser, and internet-aware tables.
tapku - Tapku Library is an open source iOS framework built for iPhone & iPad. The framework includes popular API's including coverflow, calendar grid and chart view. The framework also has tidbits of code that will make iPhone and iPad development all the more enjoyable and faster. Integrating the framework is easy and can be incorportated right into your applications now. Try out the demo to see some of the things you can take advantage of in the framework.
Direct comments from their sites.
对于游戏框架,最明显的一个是 cocos2d。
差不多完成了一个相对简单的 2d 游戏后,我强烈建议使用像 cocos2d 这样的框架。使用 Core Animation,您可以做很多令人惊奇的事情。然而,对于游戏类型的场景,您会遇到核心动画无法解决的问题。
例如,如果用户在游戏过程中动画播放期间接到电话怎么办?您必须手动处理所有这些。我的意思是,您必须检查
presentationLayer
的状态,更新模型层,保存所有状态,然后在应用程序再次移动到前台时重建所有状态。对于这类问题,我会认真考虑游戏框架。
cocos2d 有替代品,例如 Kobold2D。所以一定要四处看看。
For game frameworks, the obvious one is cocos2d.
Having almost finished a - relatively - simple 2d game, I would highly recommend using a framework like cocos2d. With Core Animation you can do a lot of amazing stuff. However, for game type scenarios, you hit problems that Core Animation doesn't solve.
For example, what if the user gets a call during the game right in the middle of an animation? You'll have to handle all that manually. I mean, you'll have to check the state of the
presentationLayer
, update the model layer, save all the state, then reconstruct it all when the app moves to the foreground again.For this sort of issues, I'd seriously consider a game framework.
There are alternatives to cocos2d, e.g. Kobold2D. So definitely have a look around.