Skip to content

feat(TimeSmoother): Smoother note falling on vsync mode#835

Open
phu54321 wants to merge 4 commits intoexch-bms2:masterfrom
phu54321:feature/fluent_vsync
Open

feat(TimeSmoother): Smoother note falling on vsync mode#835
phu54321 wants to merge 4 commits intoexch-bms2:masterfrom
phu54321:feature/fluent_vsync

Conversation

@phu54321
Copy link
Copy Markdown

@phu54321 phu54321 commented Nov 18, 2024

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, #829 should be merged for better vsync-ed play experience.

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.

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.
@phu54321 phu54321 changed the title feat(TimeSmoother): Smooth skin rendering on vsync mode feat(TimeSmoother): Smoother note falling on vsync mode Nov 21, 2024
@RaceDriverMIKU
Copy link
Copy Markdown

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants