iOS图形问题 [英] iOS Graphical Issue

查看:139
本文介绍了iOS图形问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我创建一个侧滚动射击游戏,但我偶尔有一些问题。我跑进这条神秘的线路出现。正如你可以看到下面的图像,它出现在一些但不是所有的精灵。如何解决这个问题?这是我的还是艺术家错了?



我使用Cocos2d开发并使用CCSpriteBatchNode,我的sprite表是一个.png,不知道信息是否相关只是想我会离开尽可能多的信息



任何想法



解决方案

的cocos2D游戏。我通过做两件事来解决这个问题。



一个:

在ccConfig.h中定义

  #ifndef CC_FIX_ARTIFACTS_BY_STRECHING_TEXEL 
#define CC_FIX_ARTIFACTS_BY_STRECHING_TEXEL 1
#endif

第二:


检查spriteSheet,在sprite Spacing中使用2像素间隙$ b Zwoptex)有一个选项。


我相信第一个应该肯定能解决你的问题。 b $ b

so I am creating a side scrolling shooter game but am having an issue with some of the graphics occasionally. I'm running into this mysterious line that appears. As you can see on the image below it appears on some but not all the sprites. How can I go about fixing this? Is this mine or the artists mistake?

I am developing with Cocos2d and using a CCSpriteBatchNode and my sprite sheet is a .png, not sure if the information is relevant just thought I'd leave as much info possible.

Any ideas???

解决方案

I also observed the same thing in one of my cocos2D games. I fixed this problem by doing 2 things.

One:
In ccConfig.h define this

#ifndef CC_FIX_ARTIFACTS_BY_STRECHING_TEXEL
#define CC_FIX_ARTIFACTS_BY_STRECHING_TEXEL 1
#endif

Second:

Check your spriteSheet, use 2 pixel gap in sprite Spacing.(I used Zwoptex) there's an option.

I believe first one should surely solve your problem.. Happy Coding.

这篇关于iOS图形问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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