xBox360上的游戏抖动 [英] Game Jitters on xBox360

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

问题描述

好吧,我的游戏即将完成,一切都在其中完美运行,并且在我的计算机上运行得相当不错(运行在大约99Mb RAM).但是,当我在xBox上运行它时,我往往会偶尔遇到主要玩家角色的不安.我的游戏中确实有爆炸和广告牌效果,但是我正在xBox GPU上进行所有渲染(起初是在发生爆炸时引起抖动的,但现在已经不行了). 抖动也是随机的,当我生成大量单元或执行大量操作时,抖动不是随机的.我不知道为什么会发生这种情况,有什么想法吗?

Ok i've got my game nearing completion, everything is working perfectly in it and it runs fairly well on my computer (running at around 99Mb RAM). But when i run it on my xBox, i tend to get occasional jitters of the main player character. I do have explosions and billboard effects inside my game however i'm doing all that rendering on the xBox GPU (that was originally causing the jitters when explosions occurred, but not anymore). The jitters are random as well, not when i'm spawning large amounts of units, or performing lots of actions. I'm at a loss as to why this is happening, any ideas??

P.s.该游戏确实集成了多线程,可以在一个线程上进行更新,而可以在另一个线程上进行渲染.

P.s. The game does have multi-threading integrated into it, update on one thread, rendering on another thread.

推荐答案

听起来垃圾回收器正在引起您的不安.在Xbox上,每分配1MB数据就会启动一次.花费的时间取决于您的程序中使用了多少引用.

It sounds like the garbage collector is causing your jitters. On Xbox it kicks in every time 1MB of data is allocated. The amount of time it takes depends on how many references are in use in your program.

使用用于Xbox 360的XNA Framework远程性能监视器来告诉如果您有垃圾收集问题.阅读

Use the XNA Framework Remote Performance Monitor for Xbox 360 to tell if you have a garbage collection problem. Read How to tell if your garbage collection is too slow by Shawn Hargreaves.

如果确实存在垃圾回收问题,则需要一个探查器,该探查器可以确定哪些对象正在生成垃圾. .NET Framework 2.0 是一种选择.默认情况下,XNA 4.0不支持此功能,但是Drap on Crappy Coding的.

If you do have a garbage collection problem, you'll need a profiler that can determine which objects are generating the garbage. The CLR Profiler for the .NET Framework 2.0 is one option. It's not supported in XNA 4.0 by default, but Dave on Crappy Coding has a workaround. For strategies to solve your garbage collection problem read Twin paths to garbage collection Nirvana by Shawn Hargreaves.

更新:.NET Framework 4.0的CLR Profiler现在可用.

Update: The CLR Profiler for the .NET Framework 4.0 is now available.

这篇关于xBox360上的游戏抖动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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