libTAS icon indicating copy to clipboard operation
libTAS copied to clipboard

Differences in monitor refresh rate results in non-deterministic behavior

Open Matte27 opened this issue 6 years ago • 9 comments

In super meatboy running the game with 59hz monitor with 60fps causes different behavior from 60hz monitor with 60fps.

Matte27 avatar Apr 24 '19 16:04 Matte27

Were those tests done with the game running natively? If so, on which platform and how was 60fps enforced? If it was done inside libTAS, does one movie sync on one setup and not the other?

clementgallet avatar Apr 24 '19 17:04 clementgallet

It was done in both windows and inside the tas tool.

This seems to explain why different resolutions behave differently in meatboy. Some resolutions run at 59.xx and some at 60.xx. If the refresh rates were different the movies wouldn't sync.

Matte27 avatar Apr 24 '19 20:04 Matte27

Could reproduce this in the tool. Currently, setting a virtual screen resolution in the tool also set a virtual refresh rate of 60, and with this setting, Super Meat Boy intro doesn't have the same length as with my native monitor setting.

Now, I'm not sure how to fix this. Either we replace all refresh rates with 60 even with native monitor setting, or we rename the custom screen parameters to show that it also enforces a 60 Hz monitor refresh rate (something like 800x600@60).

The first option transparently fixes a desync issue, but kinda lies to the user (native resolution, but custom refresh rate). The second option is much cleaner, but it requires the user to detect that a desync issue may be caused by different screen refresh rates

I personally prefer the second option.

clementgallet avatar Jun 12 '19 17:06 clementgallet

WidthxHeight@FPS is common enough and clear to everyone. May have a note on the wiki about potential problems and how to dodge them.

vadosnaprimer avatar Jun 12 '19 17:06 vadosnaprimer

Would it be possible to have the monitor refresh rate as a parameter in the input file?

Matte27 avatar Jun 29 '19 07:06 Matte27

Is it ok if the monitor refresh rate is set to the framerate setting?

clementgallet avatar Dec 31 '19 11:12 clementgallet

Some functionality is lost because you might want to have them be different.

Matte27 avatar Jan 02 '20 08:01 Matte27

But then, it should be ok if we implement the framerate setting mid-run?

clementgallet avatar Jan 02 '20 09:01 clementgallet

Not sure what you mean. Are you talking about the variable framerate? If so that isn't enough to cover all possible settings. In meatboy having different monitor refresh rate and game framerate causes some behaviour that can't be replicated if they are both the same.

Matte27 avatar Jan 02 '20 13:01 Matte27