Vector-Pinball icon indicating copy to clipboard operation
Vector-Pinball copied to clipboard

game speed changes with fps change

Open Yarick1 opened this issue 9 months ago • 1 comments

my S23 Ultra can do 120 fps, but when it enabled powersaving mode, its limited to 60 fps, if it switches mid game, the gameplay speed halves (audio unaffected).

i can try/test a bit more later

Yarick1 avatar Mar 27 '25 08:03 Yarick1

video

i took a recording: first testing without batt. saving, turning it on, game slows down (60 fps with "120 fps" cap), turning off batt. saving, game goes to normal 120/120.

second part: started with batt. saving on, game works fine (game reports 60 with a cap of 60), turning off batt. saving, phone reports 120 fps (system settings -> developer mode -> show fps), game spikes to 70/60 (prob cuz notif panel does/goes above 60), game shows 60/60 fps, didnt notice gameplay acceleration...

cant seem to upload even trimmed/scaled video to GitHub, so YT it is

Yarick1 avatar Mar 31 '25 11:03 Yarick1

I think a proper delta time option would be better and fix the problem for you and for when people cant even play at 60. If they can only play at 30 it would double the speed. The only downside to adding delta time is it would make it a little bit harder to add a replay system.

Spike1377 avatar Aug 29 '25 13:08 Spike1377

Should be fixed in 1.15.0

dozingcat avatar Oct 05 '25 01:10 dozingcat

@dozingcat did you make it fully frame rate independent like I was thinking about or just check the power saving options?

Spike1377 avatar Oct 05 '25 01:10 Spike1377

@Spike1377 it listens for the power save option changing and resets the frame rate when it does. If I understand your previous comment, it's already "frame rate independent" in that the duration of each physics step is proportional to the target frame rate. That is, if the game has to drop to 30fps because of hardware limits, the perceived speed should be the same as at 60fps. The original bug was because the game didn't drop the target rate to 60fps after the power saver prevented it from running at 120.

dozingcat avatar Oct 05 '25 17:10 dozingcat