savegame replay Video

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

FritzHugo3
Fast Inserter
Fast Inserter
Posts: 140
Joined: Tue Jan 09, 2018 4:30 pm
Contact:

savegame replay Video

Post by FritzHugo3 »

I am aware that the replay function is not a video recording, but a reconstruction of the player input and the seed of the map.

However, I don't understand why you can't jump forward or back at a certain time - surely, it would take a long time to “jump” to a past point, as the game has to “play” the whole way from the first second to the newly selected point (64x speed).

You could enter a time, then the game calculates and in that time you can just go for lunch and don't have to wait for the moment yourself.

If you miss the important 5 minutes in a 10 hour gameplay that you wanted to show, you have to start from the beginning and stay with it the whole time.

Short version:
Please an input field where you can enter the timestamp to which the simulation should pre-calculate
+ please show us the playtime

+ The regulary playtime from a save in the debug menue would be also a good thing.
+ An otion to show the evolution in the debug menue.
(So booth can be shown permanent without a mod or a third party speed run tool).

Thx.
User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 3758
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: savegame replay Video

Post by boskid »

Replay has only a limited set of data which it can use: there is level-init.dat inside of save file which is a state of save file at the beginning of recording (used when starting a replay playback), there are all the input actions recording actions player did (replay.dat) and there is level at the end of replay (level.dat), not used by a replay but just to allow resuming given save file without having to rely on replay artifacts. This effectively means a replay recording is like a a video file, where the only I-frame is at the beginning of the record and everything else has to be computed from the start of the game. We have no "update 1 tick bacward" because that is simply not possible to implement, game can only advance game state forward by 1 tick if its given input actions to apply in that tick. Fast forward rewinding is not available because it just requires full game update to happen from beginning to end and if a save file was taking 100% cpu to update when recording, it will take 100% cpu to update when doing a playback. All the features you are asking for would require an extra replay playback session that would save game state with some high interval (lets say a save file every minute) just so doing a seek backward could read a precomputed game state at that tick or slightly earlier and then move it forward to the required timestamp. All such extra full game state records would take significant amount of disk space, possibly making a save file take 500x as much (if your save file takes 50MB, having extra data stored every minute for a 10 hour recording, assuming all save files would take 50MB and are done every minute, that would be a set of 600 save files each taking 50MB, just so you could seek backward without having replay doing full update). This is way too much to ask for in terms of what features we want to have.

The only possible feature that would not explode without player noticing would be ability of doing manual save of game state at a specific point in time of the replay where an intermediate game state would be saved (as level-init.dat) with all remaining input actions to be applied from this point onwards. This would give you a manual control of where to put the "I-frames" from which a replay could be resumed without having to watch replay from the beginning. Such save files would still take about twice as much as normal save files (level would have to be saved as both level-init.dat and level.dat)
FritzHugo3
Fast Inserter
Fast Inserter
Posts: 140
Joined: Tue Jan 09, 2018 4:30 pm
Contact:

Re: savegame replay Video

Post by FritzHugo3 »

I'm not sure if you really read everything I wrote or if the meaning was completely lost in the automatic translation.

There shouldn't be any technical problems at all, as I actually wrote. All that happens is the player stops at a time specified by the player, after simulating the entire simulation at 64x game speed.

My point is not to wait permanently at the computer until the game time xy has been reached during a recording of several hours.

All it would need is an input from the player for the time to be reached, the player lets the simulation run from second 1 to the right point and then stops on its own - that's all that should happen and I don't see any major technical hurdles.

Then the player can play football or do something else in the hours he would otherwise have to wait in front of the computer to press the pause button.
eugenekay
Filter Inserter
Filter Inserter
Posts: 310
Joined: Tue May 15, 2018 2:14 am
Contact:

Re: savegame replay Video

Post by eugenekay »

It is not able to start from an Arbitrary point because Intermediate State is not saved - only the Starting State + Input along the way. The Game Engine cannot run in reverse - so there is no way to "Rewind", only start over from the beginning. It is possible to reconstruct the "Game State" at an intermediate point - this is exactly what playing a Replay is doing. You can also Save a (copy of a) Replay while it is in-progress, so that you can Continue from that point.

I have never tried using a Replay file with the Command Line Parameter --load-game, maybe give that a shot? The --until-tick option may also be of interest. If you have a lot of Replays to watch you can try capturing them with a tool such as OBS to get a rewindable Video file.

Good Luck!
FritzHugo3
Fast Inserter
Fast Inserter
Posts: 140
Joined: Tue Jan 09, 2018 4:30 pm
Contact:

Re: savegame replay Video

Post by FritzHugo3 »

eugenekay wrote: Sun Mar 16, 2025 2:04 am It is not able to start from an Arbitrary point because Intermediate State is not saved - only the Starting State + Input along the way. The Game Engine cannot run in reverse - so there is no way to "Rewind", only start over from the beginning. It is possible to reconstruct the "Game State" at an intermediate point - this is exactly what playing a Replay is doing. You can also Save a (copy of a) Replay while it is in-progress, so that you can Continue from that point.

I have never tried using a Replay file with the Command Line Parameter --load-game, maybe give that a shot? The --until-tick option may also be of interest. If you have a lot of Replays to watch you can try capturing them with a tool such as OBS to get a rewindable Video file.

Good Luck!
This is exact what I have written in my first post!
And that's not what I wrote, no one seems to read what I write.

The game simulates from second 1, up to a value that the player enters. The recordplayer already does that, but without pausing at a certain time - please read what I write before answering. Very frustrating.
eugenekay
Filter Inserter
Filter Inserter
Posts: 310
Joined: Tue May 15, 2018 2:14 am
Contact:

Re: savegame replay Video

Post by eugenekay »

FritzHugo3 wrote: Sat Mar 15, 2025 2:11 pmYou could enter a time, then the game calculates and in that time you can just go for lunch and don't have to wait for the moment yourself.
eugenekay wrote: Sun Mar 16, 2025 2:04 amI have never tried using a Replay file with the Command Line Parameter --load-game, maybe give that a shot? The --until-tick option may also be of interest. If you have a lot of Replays to watch you can try capturing them with a tool such as OBS to get a rewindable Video file.

You have asked for an Option to " enter a time, then the game calculates" - this is what --until-tick Command Line Parameter's purpose is. :)

From here, you could then Save the Game (to create a new, resumable Replay from this point), or you could Capture the entire replay with OBS. As-covered, there is no "Reverse"; only "Start Over".
Post Reply

Return to “Ideas and Suggestions”