如何在XNA中管理Time Step [英] how to manage Time Step in XNA

查看:88
本文介绍了如何在XNA中管理Time Step的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello Dears

我在C#的时间跨度上遇到问题

我想模拟球运动。我有一些方程需要在每微秒重新计算,我想要显示结果60 FPS。

请帮帮我...

Hello Dears
I have a problem in time span in C#
I want to simulate ball motion .i have some equation that needs to recalculating in every microsecond and I want to display result 60 FPS.
Please help me...

推荐答案

我没有太多使用XNA但是你有两个事件,一个更新和刷新。从你所说的你想要更频繁地更新你的模型,但仍然以60FPS绘制。我找到了这篇文章:



http://geekswithblogs.net/Sharpoverride/archive/2009/08/08/xna-tip-changing-the-frequency-for-the-update -and-draw.aspx [ ^ ]



涵盖了这个问题。我不知道你是否可以在不牺牲你的FPS的情况下以你需要的频率获得更新。你可能已经知道了这一切,但我想我会把它扔出去。
I''ve not used XNA too much but you have two events an Update and a Refresh. From what you''re saying you want to update your model more frequently but still draw at 60FPS. I found this article:

http://geekswithblogs.net/Sharpoverride/archive/2009/08/08/xna-tip-changing-the-frequency-for-the-update-and-draw.aspx[^]

which covers this issue. I don''t know if you can get update at the frequency you need without sacrificing your FPS. You may already know all this but I thought I''d throw it out there.


这篇关于如何在XNA中管理Time Step的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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