hrydgard / ppsspp

A PSP emulator for Android, Windows, Mac and Linux, written in C++. Want to contribute? Join us on Discord at https://discord.gg/5NJB6dD or just send pull requests / issues. For discussion use the forums at forums.ppsspp.org.
https://www.ppsspp.org
Other
10.87k stars 2.13k forks source link

Rewind feature bugs/improvements #16954

Open hrydgard opened 1 year ago

hrydgard commented 1 year ago

I'm getting reports on Discord that it complains about no rewind state found, and also when I tried it, not only did it do a lot of log spam, but it crashed in LockedDecompress.

Also, WinnerWind had a cool idea for better behavior - if rewind is enabled and you rewind before the first memory save has happened, within one rewind wait time, we should just load the latest savestate, or reset the emulator as appropriate - if, and only if, that savestate is not older than the rewind interval.

Additionally, we should make configuration more intuitive. Specifying a frame count is not.

unknownbrackets commented 1 year ago

Wow, loading a save state from 3 hours ago or resetting the emulator and destroying my progress just because I tried to rewind as far back as I could to retry a jump sounds horribly confusing. I'd hate that.

-[Unknown]

hrydgard commented 1 year ago

Which is why I only propose doing if the old state is within the time range of the rewind saves. So if the frequency is every 15 seconds but the first one hasn't happened yet, if your state is older than that, it won't load. I think it would feel "right" to be able to rewind to such a recent save state. Obviously wouldn't load a 3 hour old one.

unknownbrackets commented 1 year ago

The way I've used this feature before (in other emulators as well), often but not always I just rewind as far back as I can to try something. Definitely there could be improvements - like a scrubber or something - but for me, even going 15 minutes back automatically would be annoying.

For example, imagine you're doing a race and you realize by glancing at the minimap that you missed a shortcut. Well, rather than restarting the race completely, let's just rewind and take it. Rewind, rewind, rewind - ACK. Why am I back in the previous race from 15 minutes ago? I spent so much effort getting the top score in this one. Oh no, how do I go back?? I should've never used rewind. Stupid, stupid, stupid. If only I'd just restarted the race. Stupid emulator.

-[Unknown]

hrydgard commented 1 year ago

Yes, but again, that's not what's gonna happen. At our maximum save interval, 1800 frames, you'd go 30 seconds back at most. If your savestate is older than that, we won't autoload it on rewind.

The use case I imagine is, let's imagine it's set to save every 15 seconds:

And that's it. No loss of hours of play, no loss of any 15 minutes.

hrydgard commented 1 year ago

Anyway, after fixing an uninitialized variable that MSVC wasn't happy about at runtime, it doesn't seem that anything is actually broken, and I'm not sure I'm gonna work more on this beyond #16955 for 1.15.