beatoraja icon indicating copy to clipboard operation
beatoraja copied to clipboard

feat(TimeSmoother): Smoother note falling on vsync mode

Open phu54321 opened this issue 1 year ago • 1 comments

Vsync doesn't really ensure evenly timed MainController::render() calls. They jitter, and they jitter a lot. More than you'd expect. (You can measure it yourself) This commit adds TimeSmoother that smooths jittered time when vsync is enabled. Smoothed time only takes effect on rendering. The commit does not intend to introduce any in-game internal processings.

If we don't have vsync, It is expected to have frame drops or changes in render() call interval, so TimeSmoother is not enabled when vsync is off.

Example video: Right is before, Left if after. Both vsync on 60fps display.

video

Note that because on current master branch the key input is synchronized to render() call, https://github.com/exch-bms2/beatoraja/pull/829 should be merged for better vsync-ed play experience.

phu54321 avatar Nov 18 '24 13:11 phu54321

I hope it also applies whether vsync applied or not. capping FPS w/o vsync in beatoraja is also very jittery.

RaceDriverMIKU avatar Nov 21 '24 12:11 RaceDriverMIKU