Posts for darkid

Experienced Forum User
Joined: 11/4/2020
Posts: 5
feos wrote:
darkid wrote:
Well, I've spent a couple of weeks trying to get this to work, with a lot of help from Keylie. I'm having two main issues: - Playback is inconsistent. Due to the way Unity loads content, stepping over a frame has different impact from just playing the movie outright. (Specifically, if you step and then wait, lag is incurred without any frame cost, but if you play, lag occurs and the framecount increments.) - Savestates aren't working. Due to the way this game is written, it creates and discards threads fairly often (at the start and end of every level, as well as on every menu change). So, along with the other issue, I have to frame-by-frame step from the beginning of playback to work on this TAS. I don't think this is a practical approach for this game -- is there any other option?
Does that mean watching the movie also has to be frame by frame? Well without savestates there's no point I guess. However, your injection method doesn't seem to allow savestates either, is that correct?
I'm still working with Keylie, so the frame-by-frame might still get fixed. You're correct, the injection I had didn't support savestates. It was slightly less necessary, because the hack would input all the keys on the first frame possible (including animation delays). The game also has a built in "reset level" function / "undo" function, which I integrated into the tool I wrote, so it was pretty easy to go through inputs one at a time.
Experienced Forum User
Joined: 11/4/2020
Posts: 5
Well, I've spent a couple of weeks trying to get this to work, with a lot of help from Keylie. I'm having two main issues: - Playback is inconsistent. Due to the way Unity loads content, stepping over a frame has different impact from just playing the movie outright. (Specifically, if you step and then wait, lag is incurred without any frame cost, but if you play, lag occurs and the framecount increments.) - Savestates aren't working. Due to the way this game is written, it creates and discards threads fairly often (at the start and end of every level, as well as on every menu change). So, along with the other issue, I have to frame-by-frame step from the beginning of playback to work on this TAS. I don't think this is a practical approach for this game -- is there any other option?
Experienced Forum User
Joined: 11/4/2020
Posts: 5
Patashu wrote:
Could this be generalized to arbitrarily inject TASing tools into any unity game, or is it SSR-specific?
The hack I wrote is SSR-specific, but the infrastructure isn't. The challenge is that (to my knowledge) most games read *all* keys every frame. This game happens to have a "What is the movement for the current frame" function. Without that, you'd need to keep track of which keypresses occur in which order. Still quite possible, though.
feos wrote:
Please ask Keylie directly, maybe he finds a way to make your game work.
I assume you mean this Keylie? I'll send them a PM.
Experienced Forum User
Joined: 11/4/2020
Posts: 5
It does have a linux port, but it's not working nicely with libTAS. I checked the forums, and people are saying that Unity games mostly aren't supported (I suspect due to the complexity of the engine). I'm happy to keep poking at it, but it might be a lot of work to get this started.
Experienced Forum User
Joined: 11/4/2020
Posts: 5
I have a slightly unusual TAS that I worked on. It's for a game called Stephen's Sausage Roll, which is a grid-based puzzler. - As opposed to taking the usual emulation approaches (since Windows emulation is generally bad, and I would have to find a way to make the game loop a consistent speed), I wrote an injection which modifies the game's "Read player input" function to return from a buffer (the TAS inputs). This breaks the "No tampering with the files the game is composed of" rule. - The game is written in Unity (which is written in C#), which only generates bytecode for functions after they are called. This means that I can only run my injection on the "Read player input" function only after I start a new game and move the player. This breaks the "The movie must begin from console power-on" rule. I'm wondering if the rules could be bent slightly to allow this submission. For reference, here's a video of World 1: https://www.youtube.com/watch?v=0jklIVuIcX8 and here is a link to the repo, so you can see the code injection: https://github.com/jbzdarkid/SSRDecompile/blob/main/Source/InputBuffer.cpp#L42