-
-
Notifications
You must be signed in to change notification settings - Fork 175
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
Inputs being missed #104
Comments
From what I remember when messing within the code, it refreshes every 50 ms... Idk if it’s possible to update the window as soon as a key is pressed instead of every fixed delay... if it was possible, that would be the ideal solution. If not, a setting could be added to let the user choose this delay |
That might help, but it would still at least be limited by the refresh rate of the monitor used. That's why I was suggesting just showing otherwise missed inputs on the next frame. I hope that makes sense. |
Another thing you might consider is the fps of the recording you are making... if you are recording at 120fps, but your monitor is 144hz, you might not see some inputs in the recording that you see while recording... I think the solution would be you select in the settings the fps of your recording, so the app know the minimum it should hold a key being pressed on screen |
@Rubydrag0n @joao7yt |
That's definitely really cool you did that! |
I think i will try to implement it at home later |
I can confirm this also, the last typing of '2' is not detected by Noh, but displayed in the Run box: I hope someone can ping me when this issue is fixed. |
Should be implemented in 38301a4 and 7f90f81. This adds a setting allowing you to choose how long to show every (keyboard and mouse) key for at a minimum. Maybe the settings for the keyboard and mouse should be split up, I'm not sure. Please let me know. Can be tested here: https://ci.appveyor.com/project/ThoNohT/nohboard/builds/31963205/artifacts |
Working fine. |
If at this point, NohBoard doesn't detect it, it probably never even got the message. Because right now, once it gets the keydown message, it will definitely hold it until the timeout (given that the timeout is longer than the render delay of 33ms). If it never got that keydown message, there's nothing I can change about it.
That's true, but unavoidable. I mean I could force it to blink off for a short moment, but if that's too short for your capture software, it's going to still look like a continuously pressed button. If it's too long, it'll look like it is always off, or erratically blinking. And I guess, since NohBoard never updates faster than once every 33 ms, it really physically is unable to show anything between those moments. So if the delay is shorter than that, and the key is pressed and released entirely within one period of 33ms, it will not be shown. This can be prevented though. I could even add a setting that keeps a key pressed until it has been rendered at least once. Then at least every key will appear at least once. But then never shorter than 33ms. However, this does flip the problem around. If the key is released and re-pressed within those 33 ms, it will never be rendered as loose because NohBoard has to do at least one render with it pressed, and by the next frame, it is pressed again. And finally, this gives no guarantees about capturing software, because I don't know what framerates they use, so NohBoard might still be rendering it too short or too long for it to pick it up, or for it to pick up the release. And that's also why I didn't go this route. There will always have to be concessions when looking at this high speed stuff and all NohBoard can do is a best effort and make an error either on the side of showing too much or too little. This setting basically allows you to tune that. Input history would provide a solution to this all, I am aware. But I don't have the time to work on that at this moment. But I will keep it in mind for future projects, and we can continue that discussion in #111. |
Regarding the first problem: how does NohBoard get the events? Does it compares the current frame keys statuses with the previous one or does it hook the pressed keys? I would guess it compares, because logically if it's hooked, then it wouldn't rely on refresh rate, right? |
No it uses a low level keyboard and mouse hook. So every input that it gets there will be registered. But if it detects the key being pressed and release before a frame can be rendered, it will have detected it but just not rendered it. That's how it depends on the refresh rate. |
So NohBoard detects a fast pressed key. The solution would be to check if the key is pressed and released in a same frame, if so, consider it as pressed for that frame and released in the next frame. Right? |
That is a solution, which I also described in my long reply above. Which has similar issues. |
Okay, then only the history element would solve this... But could you also add a setting where you could change the frame rate of nohboard? |
I could. But I'm kind of afraid to add it. NohBoard doesn't do the most efficient rendering, so upping the frame rate might cause some performance issues, which might not be desirable while gaming. I'm thinking I might add the setting, but not add it to the interface, so someone who knows what he is doing can always change it in the settings file. |
I agree with that decision. |
eafcac2 makes the update (and render) interval configurable. 5ms or 200fps is the maximum, my pc seemed to handle this pretty well. Please give this a go, and see if it now captures all of your keypresses. https://ci.appveyor.com/project/ThoNohT/nohboard/builds/32018731/artifacts |
Working just fine. |
When a key is pressed for less than a full frame (in between two frames) it can be missed by the input display. It would be nice to still see the input for the frame after the key was pressed.
In speedrunning (what I and many others use this for) that happens quite a lot and prevents you from going back in the recording to see what actually happened when some inputs didn't show up.
The text was updated successfully, but these errors were encountered: