OpenNBS / OpenNoteBlockStudio

An open-source Minecraft music maker.
https://noteblock.studio
MIT License
746 stars 51 forks source link

Allow setting custom refresh rates #365

Open arm32x opened 1 year ago

arm32x commented 1 year ago

Is your feature request related to a problem? Please describe. I have a 75Hz monitor and I'm unable to set the refresh rate to 75Hz, resulting in choppy scrolling when the program is set to follow the playhead frame-by-frame.

Describe the enhancement you'd like I'd like to be able to set a custom refresh rate instead of the predefined options. I'd prefer if you didn't just add 75Hz as another predefined option, since that doesn't fix the issue for people with other refresh rates (such as 85Hz).

Additional context I looked at the code to see where the refresh rate was set, and saw this:

https://github.com/OpenNBS/OpenNoteBlockStudio/blob/45f35ea193268fb541c1297d0b656f4964339d97/scripts/control_draw/control_draw.gml#L37-L40

Why not just do game_set_speed(refreshrate,gamespeed_fps) and store the actual refresh rate in Hz in the config? Of course, I don't know GML, so this could be completely wrong.

Bentroen commented 1 year ago

The numbers correspond to the option number you've clicked from the predefined options, so doing this would result in 4 FPS hahaha :) Although it would be trivial to add a custom refresh rate option, is it really necessary? The list of "common refresh rates" is small and finite, so I'd rather add a few more settings to the dropdown (e.g. 75, 120, 165Hz etc.) as opposed to making it unrestricted, since most of the values you could set wouldn't make sense.

KaydaCant commented 1 year ago

Adding a custom refresh rate option makes much more sense in my own opinion. Even some of the settings for my monitor are strange (50fps, 59fps, 119 fps, etc) An alternative is to add vsync but I'd imagine making it unrestricted would be much simpler and account for more people. Or fill the list with every single number :trollface: