xBox360 上的游戏抖动

发布于 2024-10-18 06:21:01 字数 244 浏览 2 评论 0原文

好的,我的游戏已接近完成,一切都运行良好,并且在我的计算机上运行得相当好(运行内存约为 99Mb)。但当我在 xBox 上运行它时,我往往会偶尔感到主角的紧张。我的游戏中确实有爆炸和广告牌效果,但我是在 xBox GPU 上进行所有渲染(这最初是在爆炸发生时引起抖动,但现在不再是了)。 抖动也是随机的,而不是当我生成大量单位或执行大量操作时。我不知道为什么会发生这种情况,有什么想法吗?

PS游戏确实集成了多线程,在一个线程上更新,在另一个线程上渲染。

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. The game does have multi-threading integrated into it, update on one thread, rendering on another thread.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

场罚期间 2024-10-25 06:21:01

听起来垃圾收集器正在引起您的不安。在 Xbox 上,每次分配 1MB 数据时就会启动。所需的时间取决于程序中使用的引用数量。

使用 适用于 Xbox 360 的 XNA Framework 远程性能监视器 来判断您是否有垃圾收集问题。阅读如何判断垃圾收集是否太慢 作者:Shawn Hargreaves。

如果您确实遇到垃圾收集问题,则需要一个分析器来确定哪些对象正在生成垃圾。 CLR 探查器.NET Framework 2.0 是一种选择。默认情况下,XNA 4.0 不支持它,但 Dave 在 Crappy Coding 上有一个 解决方法。有关解决垃圾收集问题的策略,请阅读 垃圾收集必杀技的双重路径作者:Shawn Hargreaves。

更新: 适用于 .NET Framework 4.0 的 CLR 探查器现已推出。

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.

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.

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.

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

世界等同你 2024-10-25 06:21:01

听起来您的渲染线程只是坐在那里等待更新线程完成其正在执行的操作,这会导致“抖动”。也许放入一些代码来记录一个线程在被允许访问另一个线程之前必须等待多长时间,以查明这是否确实是问题所在。

Sounds like your rendering thread is just sat there waiting for the update thread to finish what its doing which causes the "jitter". Perhaps put in some code that logs how long a thread has to wait for before being allowed access to the other thread to find out if this really is the issue.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文