如何确定用户看到两个连续图像之间的实际时间间隔

发布于 2024-10-20 08:10:21 字数 369 浏览 2 评论 0原文

我想使用 Actionscript 实现 检查时间 任务。这个想法是根据用户响应动态改变屏蔽图像和未屏蔽图像之间的时间间隔。 “检查时间”被定义为用户达到一定准确度的时间间隔。有多种因素会影响该间隔的准确性:监视器刷新率、闪存虚拟机帧速率、计时器事件准确性、渲染时间。还要别的吗?如何确定用户看到的实际反转?由于该任务的典型性能为 20 至 80 毫秒,因此需要高精度。我认为限制因素是显示器刷新率。如果是 60Hz,我只能增加 16.7 毫秒。有办法绕过这个限制吗?如果我使用更高的帧速率,播放器是否仍会将其同步到 60Hz?

I would like to implement an inspection time task using Actionscript. The idea is to dynamically change the time interval between masked and unmasked images based on user responses. The "inspection time" is defined as the interval at which the user achieves certain accuracy. There are various factors affecting the accuracy of that interval: monitor refresh rate, flash vm frame rate, Timer event accuracy, render time. Anything else? How do I determine the actual inverval the user sees? High accuracy is required, since typical performance is from 20 to 80 msec on that task. I assume the limiting factor is the monitor refresh rate. If it's 60Hz, I would only be able to increment by 16.7msec. Any way around this limitation? If I use a higher frame rate, would the player still sync it to 60Hz?

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

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

发布评论

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

评论(1

安静被遗忘 2024-10-27 08:10:21

Flash 播放器可达到的帧速率有一个上限。虽然从技术上讲您可以将该值设置为高于 60fps,但如果用户安装了现代版本的 Flash Player,我认为屏幕刷新速度不会比这更快。另外,您设置的帧速率并不重要,因为它建议玩家应尽最大努力以该速率刷新......如果可能的话,它会这样做!然而,有许多因素可能导致玩家无法真正跟上该帧速率。

  1. 具有许多不同影片剪辑的复杂场景,多重嵌套。

  2. 过度使用口罩

  3. 反复使用滤镜

  4. 在 ENTER_FRAME 或 TIMER 事件处理程序(或其中许多)中实现的代码特别复杂或效率低下

  5. 复杂的对象图

  6. 浪费地实例化和处置对象,从而强制垃圾收集(这会在非常高的帧速率下导致明显的卡顿)。

    还应该注意的是,即使在最好的情况下,您也不能真正依赖更新之间的增量时间(ENTER_FRAME 或 TIMER)来保持 100% 一致。

希望这有帮助。

There's an upper limit to the framerate achievable by the Flash player. While you can technically set the value higher than 60fps, I don't believe that the screen will ever refresh more quickly than this if the user has a modern version of Flash Player installed. Also, it doesn't really matter what framerate you set, as it's a suggestion that the player should do its very best to refresh at that rate... and it will do so if it's at all possible! However, there are a number of factors that might make it impossible for the player to actually keep up to that framerate.

  1. A complex scene with many different movieclips, multiply nested.

  2. Overuse of masks

  3. Repeatedly applying filters

  4. Particularly complex or inefficient code implemented in an ENTER_FRAME or TIMER event handler (or many of them)

  5. A complex object graph

  6. Wastefully instantiating and disposing of objects, thus forcing garbage collection (this causes a noticable hiccup at very high framerates).

    It should also be noted that you cannot truly rely on the delta time between updates, either ENTER_FRAME or TIMER to be 100% consistent even in the best of circumstances.

Hopefully this helps.

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