I'm a huge TAS fan.
For those who don't know TAS stands for tool assisted speed run. Many console emulators implement a feature where by you can record a precision timed sequence of input into a file as you play a game, then play it back later. On playback, the idea is that the input should be fed back to the game on exactly the same frame or at the exact same point in time, thus causing the game to behave precisely in the same fassion as it did when the human player initially played it creating a movie of sorts.
I decided to try and implement this in to something I'm creating in BGT, and I obviously didn't realize the mess I'd be getting myself into.
I realize that since a cpu may take more or less time to process instructions from one run to the next, wait() is not precise, audio and other data can take varying durations to load and other factors that this could be a monumental task. My question is, do you think it's realistic at all in BGT? I did get it to a point where I could record and play back gameplay on my own computer, but the implementation is ugly:
*I have to store Boolean results in the recording whenever the game checks if a timer has elapsed more than x milliseconds rather than relying on a real timer during playback;
*I had to store the result of every is sound still playing or is voice still speaking check to avoid breaking the game at points where it waits for sound or TTS,
*It's also necessary to store a bunch of other crap like the name of the TTS voice used and the state of the random number generator, but these items make sense and aren't so bad.
As you can see, it's hacky as all get out and is far more than just an input recorder if it has to spoon feed the game so many return values and such.
It works if you play it back on the computer that recorded it, but if you play it back on another system it's sinomatically wrong (points that wait for either audio or TTS will either cut the sound off prematurely or wait too long due presumably to the cpu processing more or less loop cycles than it did on the original computer). It does play back though and doesn't have the player bumping into walls and doing all sorts of dumb garbage as would happen during playback of a TAS which has failed to play back correctly.
I could convert the game to use frames and only a single timer, but this still breaks whenever there's a need to wait on audio or TTS to complete.
Can anyone think of a less hacky, more productive solution off hand?
Thanks.
PSA: sending unsolicited PMs or emails to people you don't know asking them to buy you stuff is disrespectful. You'll just be ignored, so don't waste your time.