简体   繁体   English

用精灵替换电影剪辑

[英]Replacing Movie Clips with Sprites

Hey everyone so I'm relatively new to AS3, I had a question. 大家好,所以我是AS3的新手,我有一个问题。 I'm developing a Mobile Application for Android devices and all my objects that are on the stage and that are added to the stage are Movie Clips. 我正在为Android设备开发移动应用程序,舞台上添加到舞台上的所有对象都是影片剪辑。 After awhile I begin to notice a drop in FPS. 一段时间后,我开始注意到FPS下降。 I know that this is due to me not using the devices GPU. 我知道这是由于我没有使用设备GPU。 Also I have read a lot about 3rd party programs that make use of the GPU and enhance the performance immensely such as the Starling framework. 我也阅读了很多有关使用GPU并极大地提高性能的第三方程序的信息,例如Starling框架。 I've tried to implement that into my game and create the sprite sheets etc... But I just get error after error and i understand I'm not as advanced in AS3 to truly grasp how to use it. 我试图将其实现到我的游戏中并创建子画面表等。但是我只是一次又一次地出错,而且我知道我在AS3中不能真正掌握如何使用它。 So I was wondering if replacing the movie clips with sprites would enhance the performance? 因此,我想知道用sprite替换影片剪辑是否可以提高性能? Or is that even possible. 甚至有可能。 I know that Sprites are capable of working like move clips via able to add tweens etc... But will this enhance the performance of the game? 我知道Sprite可以通过添加补间等来像移动剪辑一样工作……但这会增强游戏的性能吗? Or am i pretty much screwed unless I learn how to use the starling framework? 还是除非我学会了如何使用Starling框架,否则我几乎会感到困惑吗?

Any help would be appreciated thanks everyone. 任何帮助将不胜感激,谢谢大家。

Just how many MovieClips do you think are bogging you down? 您认为有多少MovieClip会让您感到困惑? What are those errors? 这些错误是什么? I would not put your faith in a framework to save you from poor programming. 我不会相信让您摆脱不良编程的框架。 Better to do good programming first. 最好先做好编程。 Sprites vs. MovieClips are probably not the answer. 精灵vs MovieClips可能不是答案。 Post some code and specifics, please. 请发布一些代码和详细信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM