Post subject: Rewind while recording a bk2 movie?
ody
Joined: 11/12/2014
Posts: 14
Hi everybody. I've just started using BizHawk and it's already one of my favorite emulators. I have one problem. Rewind doesn't work when recording a bk2 movie. I press the hotkey and nothing happens. The statistics in Rewind & Savestate Configuration indicate that it is enabled. It works as expected when not recording. I've tried fresh installs of versions 1.7.4, 1.8.4, 1.9.0 and 1.9.1. Changing any of the settings doesn't make a difference. I've read almost all the threads in the forum and all I found was a recommendation, something like "use savestates, rewind is not recommended for TASing." Can rewind be functional during recording? It would make a world of difference. What I'd like is this: You press the hotkey, rewind works, you release it and, just as if you loaded a savestate, the rerecording count increases by 1 and you continue to play.
adelikat
He/Him
Emulator Coder, Site Developer, Site Owner, Expert player (3599)
Joined: 11/3/2004
Posts: 4739
Location: Tennessee
I dont' let you do rewind while recording a movie. Because if you mix that with savestates (and out of order savestates) you can easily wreck your movie in bad ways.
It's hard to look this good. My TAS projects
ody
Joined: 11/12/2014
Posts: 14
I figured that their combination could cause problems. Too bad... I'd prefer to have rewind available when recording simple gameplay videos. And savestates when doing a speedrun. Could there be an option to have one or the other when starting a recording? Or is this too much to ask?
adelikat
He/Him
Emulator Coder, Site Developer, Site Owner, Expert player (3599)
Joined: 11/3/2004
Posts: 4739
Location: Tennessee
I wouldn't be opposed to making the option available, but I don't know how to prevent someone from wrecking a movie by doing the wrong combination of savestates and rewind. And I'm not sure how to make it clear to the user. I'm open to suggestions.
It's hard to look this good. My TAS projects
ody
Joined: 11/12/2014
Posts: 14
First let me say that I'd love to use rewind and future savestetes to create a time paradox in a movie and wreck it like that :D Anyway, in the Record Movie dialog you could put a dropdown menu with three options: Use savestates Use rewind Use both at your own risk! I don't know what combination could wreck a movie so I can't tell what you could write to make it clear. Perhaps the third option is not worth having. I know that it's not fun at all when you play for hours and then your movie desyncs.
adelikat
He/Him
Emulator Coder, Site Developer, Site Owner, Expert player (3599)
Joined: 11/3/2004
Posts: 4739
Location: Tennessee
ody wrote:
I don't know what combination could wreck a movie so I can't tell what you could write to make it clear.
That's exactly my concern. I think most people wouldn't know what could wreck your movie so it is a time-bomb waiting to happen. I suppose I haven't considered an either/or and have an option to only record with rewind, I might ponder that.
It's hard to look this good. My TAS projects
ody
Joined: 11/12/2014
Posts: 14
If rewind resets itself and starts saving frames from the beginning, every time you load a savestate, would that reduce the possibility for something to go wrong? As for future savestates, would they be a problem to use? Since they contain the whole movie up to that point. Maybe you could first make an experimental version so that people can test it and report what works and what desyncs. I'd like to beta test this feature.
adelikat wrote:
I suppose I haven't considered an either/or and have an option to only record with rewind, I might ponder that.
That would be awesome.
Site Admin, Skilled player (1237)
Joined: 4/17/2010
Posts: 11274
Location: RU
The problem is state musmatch between what you rewind to and what was saved as an explicit savestate, right? How about giving a message like "This savestate doesn't match the rewind history. Load it anyway?" that would erase the paradoxed rewind states and create fresh ones? As for future states, there might be a term "rewind gap" that would be an understandable side effect when using both methods at once.
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
creaothceann
He/Him
Editor
Joined: 4/7/2005
Posts: 1874
Location: Germany
If there were some sort of advanced TAS movie format that includes both savestates and all input sequences of the TAS, this wouldn't be a problem. Normal TAS movie files are like video files without keyframes. You can fast-forward, but jumping backwards requires starting over from the beginning and playing back quickly until the desired point. Adding savestates into the file would be like adding keyframes to a movie file. Jumping back is faster because the number of frames that have to be processed is reduced dramatically, at the cost of file size and some additional CPU time. Loading a savestate located earlier on the timeline and changing the input for even a single frame creates a new history. There are 2 options for handling that:
  1. This invalidates and removes all savestates located behind the changed frame, so loading them is no longer possible.
  2. This creates a new branch in a TAS recording tree, similar to how you can create branches in source code version control systems like git. Rewinding creates a savestate (the "tip" of a branch) so that recording can be resumed instantly when switching back to that branch. Jumping to another branch simply loads the "tip savestate" of that branch. And finally, jumping to an intermediary savestate (either a "branching point" savestate or a "keyframe" savestate) is also possible.
Note that there are two issues: first, both options are incompatible with "regular" savestates as they exist now (option 2 would allow importing savestates as completely new branches if they would contain the complete input history though). And second, option 2 would require some sort of graph window for selecting/renaming/exporting/etc. branches (rewinding wouldn't need a GUI though).
Site Admin, Skilled player (1237)
Joined: 4/17/2010
Posts: 11274
Location: RU
Now we're getting right to TASEditor logic. It keeps states for all frames that are present in the current input log, but throws away all the side branch frame states, only keeps input logs for them, and the keyframe state (the frame you get to as you load the branch). One really doesn't need to keep all the frame states that aren't corresponding to the the current input log version: it costs space and time with little practical benefit. The main point is recreating frame states as soon as the branch becomes current and is emulated through.
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.