0 Members and 3 Guests are viewing this topic.
static uint32& s_FrameRecordCounter = *reinterpret_cast<uint32*>(0x97FB40); // STATICREF if (Mode == MODE_PLAYBACK) { PlayBackThisFrame(); } else if (CTimer::GetTimeInMS() - s_FrameRecordCounter > 26) { s_FrameRecordCounter = CTimer::GetTimeInMS(); RecordThisFrame(); }
Conversely, older replays are able to be played, but the wheels of bikes will most likely bug out. There is no actual bike wheel data so it tries to read whatever gibberish is present in the replay.
That's awesome, dope job . I wish to learn programming every time I see cool things like this.
I have a question based on the replay system's source code, I tried to read it but I could only understand so much as someone with zero programming experience. I was once under the impression that SA captures replay data every 40ms (25fps), but later down the line, I compared live footage to replays, and noticed that playing replays at 30fps is often closer to the actual game speed, particularly with FL off replays. This lead me to believe that SA might actually capture replays at 33.3*ms (30fps), and they're simply being played back too slowly due to SA's frame limiter being 25fps. Now that I've attempted () to read the replay system's source code, I'm questioning my conclusions. Quote from: Replay.cppstatic uint32& s_FrameRecordCounter = *reinterpret_cast<uint32*>(0x97FB40); // STATICREF if (Mode == MODE_PLAYBACK) { PlayBackThisFrame(); } else if (CTimer::GetTimeInMS() - s_FrameRecordCounter > 26) { s_FrameRecordCounter = CTimer::GetTimeInMS(); RecordThisFrame(); }I might be understanding this totally wrong, but I'm guessing it means that with FL on, the game captures 25 frames into the replay buffer per second, and with FL off (26fps or above), it switches from calculating time in frames (25fps) to calculating time in milliseconds (40ms), to get the same amount of frames without suffering VC's variable frame rate replay issues, but without programming knowledge I'm probably just making stupid guesses . The main reason I'm interested is to try and match SA's replay recordings in future videos to game speed as closely as possible, and it seems like you have insight .Speaking of game and replay speed, I have a second question if I may. It's known that SA's FL off replays are usually slower than FL on replays, but I'm not 100% certain why. I'm guessing they're slower either due to interpolation issues when the frame rate rapidly changes, or when the frame rate isn't a multiple of 25fps or 30fps (depending on which most closely resembles the rate of capture), but is that misguided? Your knowledge would be very helpful .
Quote from: Reynard The Fox on December 31, 2022, 04:47:46 AMConversely, older replays are able to be played, but the wheels of bikes will most likely bug out. There is no actual bike wheel data so it tries to read whatever gibberish is present in the replay.That's very unfortunate to hear. Do you maybe happen to have a visual example of how faulty it can look?Also, does this count for the spinning wheels only or also the suspensions? Having those work independently could still make a neat lil improvement for older replays.
14ms frame delay has been removed. As a result, game now locks properly on 30 FPS instead of 25 FPS.Game FPS has been limited to 1000 FPS (with Frame Limiter off) to prevent freezing during fadeout moments.
It seems indeed that the game tries to capture a frame for a replay every 26 milliseconds.
else if (CTimer::GetTimeInMS() - s_FrameRecordCounter > 26)
I have experimented before with this changing the value of 26 to other values and I remember that by changing it to 3 ms it would save replays at about 60 fps. However, this does not make much sense.
This makes total sense when considered with my theory. We know that 3ms + 14ms = 17ms (58.8235294118fps). Perhaps this explains why changing SA's code to 3ms captures replays at approximately 60fps (you would need to set SA's code to 2.6666666667ms for it to add up to 16.6666666667ms equaling 60fps exactly). GTA SCIENCE!!!!
Nice work on the script. Definitely using it from now on. It kind of bugs out when doing wheelies/stoppies with a MTB, though.
Hhmm I didn't notice that before. In any you can always not use the script the record MTB stunts. It should look normal then.
SMF 2.0.19 | SMF © 2021, Simple Machines