为什么在 2D iPhone 游戏中使用 Cocos over UI Kit? [英] Why use Cocos over UI Kit for a 2D iPhone game?

查看:17
本文介绍了为什么在 2D iPhone 游戏中使用 Cocos over UI Kit?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 cocos 中构建游戏已经有一段时间了,我突然想到使用 UIKit 可能会容易得多.

I have been building a game in cocos for a while now I it has just occurred to me that it might just be a whole lot easier to use UIKit.

能否请您帮我权衡利弊,并分享您的一些经验.

Could you please help me weight up the pros and cons, and share some experiences you have.

以下是我列出的每种优势的基本列表.我觉得我对 cocos 的了解还不够,无法做出最好的明智决定.

Here is my basic list of advantages for each. I feel I dont know enought about cocos to make a informed decision which is best.

可可

  • 游戏引擎免费提供.每帧暂停/恢复回调
  • 精灵动画
  • 使用 open GL(这是真的吗?这是优势吗?)
  • ...帮我想想更多!

用户界面工具包

  • 更多帮助/文档/示例代码
  • 熟悉 iPhone 程序员
  • 易于触摸
  • 轻松查看动画
  • 易于定制
  • 加载时间更快?(这是真的吗?)

任何反馈都会很棒!

编辑:我刚刚看过一个开发者视频(在一个名为 Quest 的开放式 GL 游戏中),他们使用 UI Kit 作为 UI 元素,绘制在 GL 视图的顶部.这对 cocos 是否可行/实用?

EDIT: I have just seen a developer video (on an open GL game called Quest) where they used UI Kit for the UI elements, drawn over the top of the GL View. Is this possible / practical with cocos?

推荐答案

  1. Cocos2d 使用 OpenGL 来绘制它的精灵、运动和粒子.尝试使用 Quartz/Core Graphics(未加速!)从根本上来说速度要慢得多且耗电.
  2. Cocos2d 是一个 sprite 库,首先是一个场景图.您将重复使用 UIKit 制作场景图.
  3. 在 Cocos 中有很多不错的免费赠品,您必须从头开始开发.

因此,简而言之:它的绘制速度比 CPU 绑定的绘制调用快,它提供了大多数基于 sprite 的游戏所需的 95%,而无需一遍又一遍地重新发明相同的东西,而且是免费的.

So, in short: It draws way faster than CPU bound drawing calls, it provides 95% of what most sprite based games need without reinventing the same thing over and over, and is free.

这篇关于为什么在 2D iPhone 游戏中使用 Cocos over UI Kit?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆