iPhone Air 游戏的像素化问题
我正在开发一款适用于 Android 和 iOS 设备的跨平台手机游戏。我使用 Adobe Flash 与 AIR 和 AS3 来编写游戏代码。我正在 Adobe Illustrator 中绘制我的角色、障碍物和背景。 Flash 中的画布设置为 960x640。该角色的高度预计为屏幕高度的 1/3,即大约 213 像素高。我在 Adobe Illustrator 中设计的角色高度约为 900 像素。当我将角色导入 Flash 时,我为他设置了动画,使用 var player:Player = new Player() 实例化他,并使用scaleX 和scaleY 属性将他缩小到一定大小。我在台式机和 Android 手机上进行了测试,看起来非常棒。然而,当我在 iPhone 上测试它时,播放器的边缘像素化程度令人无法接受。我认为我绘制的动画远大于预期高度一定是问题所在,因此我将播放器重新绘制到正好 213 像素高,并在 iPhone 上重新测试,动画质量没有任何改善。我还尝试将 MovieClip 转换为位图矢量解释 此处 但这对动画的质量也没有影响。
此时,我不知所措。有人对如何避免我从 Adobe Illustrator 转到 Flash 再到 iPhone 时遇到的像素化问题有任何建议吗?
I am working on a cross-platform mobile game for Android and iOS devices. I am using Adobe Flash with AIR and AS3 to code the game. I am drawing my character, obstacles, and backgrounds in Adobe Illustrator. The canvas in Flash is set to 960x640. The character was intended to be 1/3 of the screen height so around 213 pixels high. I designed the character in Adobe Illustrator to be somewhere around 900 pixels high. When I imported the character into Flash I animated him, instantiated him using var player:Player = new Player(), and scaled him down to size using the scaleX and scaleY properties. I tested it out on the desktop and Android phone and it looked wonderful. However, when I tested it out on an iPhone, the player was unacceptably pixelated around the edges. I figured the fact that I drew the animation much larger than the intended height must be the problem, so I redrew the player to exactly 213 pixels high and retested on the iPhone without any improvement in the quality of the animation. I also tried converting the MovieClip to a Bitmap vector explained here but that also had no effect on the quality of the animation.
At this point, I am at a loss. Does anyone have any suggestions on how to avoid this pixelation issue that I am experiencing when going from Adobe Illustrator to Flash to the iPhone?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
为了获得更优化的 iPhone 路线,您可能需要考虑将动画创建为一组位图图形,即使用 PhotoShop 将它们创建为 png 文件,并按照您希望它们显示的大小。
通过这样做,您将节省 Flash 创建平滑位图时的 CPU 活动
For a more optimised iPhone route you might want to consider creating your animation as a set of bitmap graphics, i.e. create them as png files using PhotoShop at the size you want them to be displayed at.
By doing this you'll save CPU activity in having Flash create smoothed bitmaps
尝试将位图的平滑设置为 true。
yourbitmap.smoothing = true;
Try to set smoothing to true for your bitmap.
yourbitmap.smoothing = true;
我对你的问题有一些解决方案。
I have some solutions for your problems.