-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Precise input timing information #9087
Comments
Just a couple notes because we've actually been building towards a solution to this for a while.
This is the approach we're going for, but (currently) any timestamps taken in the #9122 will remove this obstruction, but until then these timestamps won't be much better than It'd be best if
I think we should upstream changes to IIUC Footnotes
|
@maniwani Thanks very much for the detailed note! I'd be happy to help out with this effort somehow - what would be useful for me to work on? |
@cryslith, I think we need help adding timestamp support to events in general, only the "accurate" part is blocked on rust-windowing/winit#1194 or #9122. For rhythm games, I assume there's probably more to it than just having timestamps? Do we also need to translate between "audio time" (e.g. DSP clock time, track time) and "app time" ( For |
What problem does this solve or what need does it fill?
The application I'm concerned with is rhythm games. Currently it is not possible to determine the time at which an input event (such as a keyboard press) occurred with precision better than 1 frame. However, rhythm games require input timing information which is more precise than this. For example, the ECFA Fantastic window is 11ms long, and the osu! 300 window can be as short as 13.33ms. On the other hand, a frame at 144fps is 6.94 ms long, while a frame at 60fps is 16.66 ms long. This means that the error incurred by measuring the time of an input precise to the next frame could be 50% or more of the actual timing window, making it impossible for players to reliably input in the window.
Besides rhythm games, precise input timing information is also applicable to other issues, such as #5984 and #6183.
What solution would you like?
Add
Instant::now()
to events processed in the winit event loop and the gilrs event loop. Additionally rewrite the gilrs integration so that gamepad events are polled continuously (like winit events) rather than once per frame so that these timestamps are accurate.What alternative(s) have you considered?
Use timing information from the OS passed through by winit and gilrs, instead of measuring it ourselves using
Instant::now()
in the event loop. This has several issues:SystemTime
, which could lead to issues. For instance these timestamps aren't monotonic and are affected by system time changes.Additional context
The text was updated successfully, but these errors were encountered: