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

问题描述

我在cocos一直在建立一个游戏一段时间,现在我刚刚发生,它可能只是一个很容易使用UIKit。



你能帮助我加重优点和缺点,并分享一些经验你有。



这里是我的基本优点列表。我觉得我不知道cocos有足够的知情决定是最好的。



Cocos




  • 游戏引擎免费。暂停/恢复每一帧的回调

  • Sprite动画

  • 使用开放GL(这是真的吗?)

  • ...帮助我想起更多!



UI Kit >


  • 更多帮助/文档/示例代码

  • 熟悉iPhone程序员

  • 轻松查看动画

  • 轻松自定义

  • 加载时间更快? (这是真的吗?)



任何反馈都是非常好的!



编辑:我刚刚看过一个开发视频(在一个名为Quest的开放GL游戏),他们使用UI Kit作为UI元素,绘制在GL视图的顶部。

解决方案

  1. Cocos2d使用OpenGL绘制其精灵,和颗粒。试图使用Quartz / Core Graphics(这不是加速!)基本上是慢得多,功耗很大。

  2. Cocos2d是一个精灵图书馆,首先是场景图。

  3. 在Cocos中有很多很好的免费项目,你必须从头开始。

简而言之:它绘制方式比CPU绑定绘图调用更快,它提供了大多数基于sprite的游戏所需的95%,而不需要重新创建相同的事情,并且是免费的。


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.

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.

Cocos

  • Game engine comes for free. Pause / resume callbacks every frame
  • Sprite animations
  • Uses open GL (is this true? is this an advantage?)
  • ...Help me think of some more!

UI Kit

  • Far more Help / Documentation / Sample Code
  • Familiar for iPhone programmers
  • Easy to handel touch
  • Easy view animations
  • Easy to customise
  • Faster loading times? (is this true?)

Any feedback would be great!

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 uses OpenGL for drawing its sprites, movements, and particles. Trying to use Quartz/Core Graphics (which is NOT accelerated!) is fundamentally much slower and power hungry.
  2. Cocos2d is a sprite library with a scenegraph first and foremost. You would be duplicating effort to make a scenegraph using UIKit.
  3. There are lots of nice freebies that work within Cocos which you would have to develop from the ground up.

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.

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

09-17 14:25