XNA 丢帧

发布于 2024-11-30 22:36:46 字数 151 浏览 5 评论 0原文

我读到,为了提高性能,可以删除帧(60 fps 之外)以允许与时间一致的更新,而不是减慢整个游戏的速度。我认为这只是指绘制而不是更新/后缓冲......?

也就是说,跳帧可能会导致更多的抖动动作,但不会使游戏变得不切实际。有谁对如何实现这一点有任何建议以及是否建议这样做?

I've read that to improve performance frames (out of the 60 fps) can be dropped to allow for updates which are consistent with time rather than slowing down the entire game. I presuem this just refers to draw rather than update/backbuffer...?

That is - skipping frame may cause more jerky motions but does not make the game impractical to play. Does any one have any tips on how to implement this and whether this is recommended?

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

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

发布评论

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

评论(1

如梦 2024-12-07 22:36:46

如果您将 IsFixedTime 设置为 true,xna 游戏类会自动管理该时间。

来自 MSDN:

If IsFixedTimeStep is false, 
   Update and Draw will be called sequentially as often as possible. 
If IsFixedTimeStep is true, 
   Update will be called at the interval specified in TargetElapsedTime, 
   while Draw will continue to be called as often as possible. 
   If Draw is not called, IsRunningSlowly will be set to true.

http ://msdn.microsoft.com/en-us/library/microsoft.xna.framework.game.draw(v=XNAGameStudio.41).aspx

xna game class manage that in an automatic way if you set IsFixedTime to true.

From MSDN:

If IsFixedTimeStep is false, 
   Update and Draw will be called sequentially as often as possible. 
If IsFixedTimeStep is true, 
   Update will be called at the interval specified in TargetElapsedTime, 
   while Draw will continue to be called as often as possible. 
   If Draw is not called, IsRunningSlowly will be set to true.

http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.game.draw(v=XNAGameStudio.41).aspx

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