如何实现HD“视网膜显示器”图形在Cocos2D [英] How to implement HD "Retina Display" graphics in Cocos2D

查看:119
本文介绍了如何实现HD“视网膜显示器”图形在Cocos2D的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不太确定如何使用高清图像的精灵在cocos2d。我浏览了文档,并下载了最新的beta版本支持点而不是像素,但我不明白整个-hd后缀的想法。换句话说,我需要帮助,不知道如何使用视网膜质量的图形在我的cocos2d游戏。我觉得这很简单,但我找不到任何东西做这个。任何帮助将非常感激。

I am not quite sure how use HD images for sprites in cocos2d. I looked through the documentation, and downloaded the newest beta which supports points instead of pixels, but I don't understand the whole -hd suffix idea. In other word I need help and have no idea how to use retina quality graphics in my cocos2d game. I feel that it is very simple, but I cannot find anything on doing this. Any help would be greatly appreciated.

确定,所以也许这是太多,但是,如果有人可以给我的代码告诉我在哪里可以是非常有帮助它。 (这可能是太多的要求)但如果它是一个线或太,这将是巨大的,如果你可以发布。我在这里绝对没有丝毫。我做了一件事,是设置内容比例因子。图像是高清,但fps下降到大约12fps在iPod touch第4代。我真的不明白这个。

Ok so maybe this is asking too much but, it would be very helpful if someone could give me the code a tell me where to put it. (Thats probably too much to ask) But if it is a line or too, it would be great if you could post it. I am absolutely clueless here. One thing I did try, was to set the content scale factor. The image was hi-def, but the fps went way down to around 12fps on an iPod touch 4th gen. I really do not understand this.

感谢,

Tate

推荐答案

如果你使用的是最新的测试版,你唯一需要做的更改是导出所有的图像大小两倍,并使用-hd后缀,类似于苹果的@ 2x。文档还说,你需要设置导演的内容比例因子,但在我的情况下,我似乎不需要这样做。

If you're using the latest beta, the only change you should need to make is export all your images at twice the size and use the "-hd" suffix, similar to Apple's "@2x". The documentation also says you need to set the content scale factor of the director, but in my case I didn't seem to need to do that.

虽然听起来像您已阅读过,我将链接到文档,希望有人会受益。

Though it sounds like you've already read through it, I'll link to the documentation in hopes that someone will benefit.

这篇关于如何实现HD“视网膜显示器”图形在Cocos2D的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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