Satisfactory

Satisfactory

View Stats:
peace Aug 14, 2022 @ 5:22am
Game Save Lag
I will personally write the code for you to take the game save off the main thread.
The lag spikes are a constant interruption.

Please fix this one thing before all else.

EDIT:
I looked into threading a bit on Unreal Engine 4 and I can understand why the save is not on it's own thread.

For UE5 world streaming is greatly improved, so rather than extending UE4 in C++, just switching UE5 will probably do the trick.

Regarding there being too much data: nope.
Regarding turning off save: yep.

Regarding How: In general, you have to lay out your world data as some kind of network. I take it Unreal Engine (4 at least) is using a tile system for that.

It's a very difficult problem, so most teams that succeed, solve it first.

Summary: Request Retracted.
Last edited by peace; Aug 15, 2022 @ 12:11pm
< >
Showing 1-10 of 10 comments
Bobucles Aug 14, 2022 @ 6:05am 
Games with 10kb of data save quickly.
Games with 300MB of data save slowly.
There is more to saving than just copy pasting raw RAM.
Vectorspace Aug 14, 2022 @ 7:20am 
It's not that it is happening on the main thread.
It's that saving the states of all the individual machines, belts, etc. takes time, and if they don't freeze the game then for example:
* Save state of machine A, it contains nothing.
* Belt B contains 1x item C, and feeds it into machine A. Belt B now contains nothing.
* Save state of Belt B, it contains nothing.

Item C has vanished

Objects are moving through the factory constantly. If they don't freeze the game while they save objects will get duplicated or deleted.
Last edited by Vectorspace; Aug 14, 2022 @ 7:23am
Mister Fabulous Aug 14, 2022 @ 5:16pm 
How do you intend to refactor things to go from halting to save and compress data for hundreds of thousands of items that are all being updated many times per second to whatever magical means where the game won't stop running, items continue to move and update their positions, and you get a save identical to the "old" way?

Bonus points for avoiding any "two copies of everything in memory" solution.
kLuns Aug 14, 2022 @ 10:50pm 
you can change the time between autosaves.
MJS WARLORD (Banned) Aug 15, 2022 @ 12:37am 
Hi Vectospace a simple answer to a problem not many understand.
To put it another way , the bigger your individual game is , the bigger and longer the save.
moe_pse Aug 15, 2022 @ 2:55am 
turn off autosave and do it manually instead
MJS WARLORD (Banned) Aug 15, 2022 @ 3:28am 
i do have auto save off because even if you stop doing something as the countdown shows on screen odd things can happen ...... a couple of times i was using zip line or jet pack as save kicked in and isuddenly moved very fast and disappeared into outer space
peace Aug 15, 2022 @ 1:52pm 
Originally posted by Vectorspace:
It's not that it is happening on the main thread.
It's that saving the states of all the individual machines, belts, etc. takes time, and if they don't freeze the game then for example:
* Save state of machine A, it contains nothing.
* Belt B contains 1x item C, and feeds it into machine A. Belt B now contains nothing.
* Save state of Belt B, it contains nothing.

Item C has vanished

Objects are moving through the factory constantly. If they don't freeze the game while they save objects will get duplicated or deleted.

In games, you have to be very disciplined about causal chains. Actually, this is a reason to be very careful with threading.

Lets say you are running at 120 frames a second. That gives you about eight milliseconds to render the world.

Anyway, normally, in a conservative setup, world streaming would get it's own thread and it would also be streaming state to something like Redis (an in memory key/value store), with another thread streaming that to disk or cloud.

Then you would have a thread for the user interface, and a thread for the display engine.
I have not implemented a Physics Engine, but I imagine there would be a temptation give it at least one thread.

Summary:
One thread is not really a viable modern competitive strategy unless I am missing something.

The Unreal Engine saves you a ton of work, unless you spend too much time modifying it.
Also, UE5 has big improvements in world streaming.
Remnar Aug 15, 2022 @ 9:37pm 
I assume the game has to pause to save. This makes sense to me, since I wouldn't want something be screwed from the moment save was initiated to when it finished. I am sure there are optimizations and time to item calculations to ease up on this. However, the bigger your base is, the more data it has to write, and thus the more time it needs to be paused. I could be wrong and it's just a timing thing with the drive and writing to it. I dunno really. It got to the point where auto saving every 5 minutes was abrupt making me think the game is crashing, and I set it to every 15. It is still abrupt but more tolerable.
Last edited by Remnar; Aug 15, 2022 @ 9:39pm
MJS WARLORD (Banned) Aug 16, 2022 @ 6:21am 
auto save can on store 4 per day so on auto save 5 it overwrites 1 of the 4 , this means that if you come unstuck on something the save you want may have got over written , much better to make your own save before trying something new that might not work
< >
Showing 1-10 of 10 comments
Per page: 1530 50

Date Posted: Aug 14, 2022 @ 5:22am
Posts: 10