如何实现HD“视网膜显示器”图形在Cocos2D

编程入门 行业动态 更新时间:2024-10-28 02:31:25
本文介绍了如何实现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

本文发布于:2023-06-05 01:10:59,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/508783.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:视网膜   如何实现   图形   显示器   Cocos2D

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!