精灵表与动画
我正在开发一款 Flash 游戏,并聘请了一位图形设计师来使其看起来更专业。问题是我不知道是否应该使用时间动画或精灵表。 这是他的图形示例: www.quickguitartuner.com/monster_reduced.png
我应该如何进行以获得更好的性能?
另外,如果我只是将精灵表拆分为许多图像,将它们放在一个数组中并继续在它们上使用 add/removeChild() ,那么在谈论性能时它会正常工作吗?
I'm developing a flash game and I hired a graphic designer to make it look more professional. The problem is that I don't know if I should use timelime animations or sprite sheets.
Here is an example of his graphics:
www.quickguitartuner.com/monster_reduced.png
How should I proceed for better performance?
Also, if I just split the sprite sheets in many images, put them on an array and keep using add/removeChild() on them will it work properly when talking about performance?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Adobe Flash 平台发言人 Lee Brimlow 表示,Flash 中的位块传送比使用显示列表具有更好的性能。他制作了几个关于如何从头开始执行此操作的视频教程,这应该可以回答您的问题“我应该如何继续”:
http://gotoandlearn.com/play.php?id=140
http://gotoandlearn.com/play.php?id=141
http://gotoandlearn.com/play.php?id=142
http://www.gotoandlearn.com/play.php?id=143
According to Lee Brimlow, an Adobe Flash platform spokesperson, blitting in flash gives much better performance than using the display list. He has produced several video tutorials on how to do this starting from scratch, which should answer your question "how should I proceed":
http://gotoandlearn.com/play.php?id=140
http://gotoandlearn.com/play.php?id=141
http://gotoandlearn.com/play.php?id=142
http://www.gotoandlearn.com/play.php?id=143
最好让艺术家在时间轴中制作动画,作为矢量图。如果需要,可以稍后转换为精灵表。您甚至可以在运行时对自己进行一些位图缓存(整个动画的位图缓存,而不是 Flash 提供的默认位图缓存)。
如果您有矢量/时间轴动画,您仍然可以缩放对象而不会丢失细节,并及时缩放动画,而不会使其成为一组离散的帧切换。它给了你很大的自由来调整你的游戏。
因此,请艺术家制作矢量/时间线动画,您仍然可以稍后将其转换为位图/精灵表。另外,如果动画很复杂(即有一些离散的运动),您还可以要求美术师将动画拉伸到比您实际需要的更多的帧上。如果您需要动画运行得更快,您可以跳过动画中的几帧。
It's better to let the artist make the animations in the timeline, as vector drawings. Converting to a sprite sheet can be done afterwards, if needed. You could even do some bitmap caching (of the whole animation - instead of the default bitmap caching Flash offers) of yourself at runtime.
If you have a vector/timeline animation you can still scale the object without loss of detail and scale the animation in time without it becoming a set of discrete frame switches. It gives you a lot of freedom afterwards to tweak your game.
So, ask the artist to make vector/timeline animation, you can still convert it to bitmaps/spritesheets later. Also, if the animation is complex (ie there are some discrete movements) you can also ask the artist to stretch out the animation over more frames then you actually need. You can skip a few frames in the animation if you need it to run faster.