为什么cocos2d-iphone用户应该避免使用@ 2x文件扩展名?

为什么cocos2d-iphone用户应该避免使用@ 2x文件扩展名?,第1张

概述Cocos2d-iphone使用-hd扩展为Retina图像(和其他资产)。对于@ 2x来说, cocos2d Retina guide只是模糊地说出“一些不兼容性” Apple uses the ”@2x” suffix, but cocos2d doesn’t use that extension because of some incompatibilities. Instead, coco Cocos2d-iphone使用-hd扩展为Retina图像(和其他资产)。对于@ 2x来说, cocos2d Retina guide只是模糊地说出“一些不兼容性”

Apple uses the ”@2x” suffix,but cocos2d doesn’t use that extension
because of some incompatibilitIEs. Instead,cocos2d has its own
suffix: ”-hd”.

WARNING: It is NOT recommend to use the ”@2x” suffix. Apple treats
those images in a special way which might cause BUGs in your cocos2d
application.

大。我感觉很好。

通过2-year old bug report regarding @2x,我得到了一个forum thread that supposedly explains the issues with @2x的链接。但是没有。我在那里发现的唯一提示是有关于@ 2x的iOS(4.0 / 4.1)错误,我认为不再相关。可能我可能错过了一些关键的方面(有一些关于缓存或重复加载问题的讨论) – 线程很久以来。

我想知道cocos2d开发人员遇到什么具体问题,如果他正在使用@ 2x后缀的图像而不是-hd?

请给出具体的可能出现或实际上会出错的例子。

这似乎是这个链接的主要原因: http://www.cocos2d-iphone.org/forum/topic/12026

具体这个帖子由riq:

I don’t kNow if initWithContentsOffile was fixed,but in 4.0 it was broken and it wasn’t working with @2x,~iphone extensions.
imagenamed caches all the loaded files so it consumes much more memory than initWithContentsOffile
Also the @2x extension does something (I don’t kNow exactly what) but it doesn’t work OK with cocos2d.

另一个好点:当iPhone 4刚刚与视网膜显示器一起发布时,我确信Cocos2D的一些用户正在使用旧版本,因此当用户在不支持的Cocos2D版本上使用视网膜显示器时事情是他们应该是两倍。再次,除非您使用的是非常早期的Cocos2D版本,否则现在已经解决了这个问题。

概述,所以似乎主要的问题是从iOS 4的initWithContentsOffile,但他们已经解决了这个,因为我在我的应用程序中使用了Cocos2D 2.0-rc2的确切的API,我没有任何问题。我使用所有Apple指定的扩展图像,一切工作快乐好! 总结

以上是内存溢出为你收集整理的为什么cocos2d-iphone用户应该避免使用@ 2x文件扩展名?全部内容,希望文章能够帮你解决为什么cocos2d-iphone用户应该避免使用@ 2x文件扩展名?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1085657.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-27
下一篇 2022-05-27

发表评论

登录后才能评论

评论列表(0条)

保存