May 3rd, 2024 - Lightweight Actors

May 3rd, 2024

Lightweight Actors

https://www.youtube.com/watch?v=yIKjR5jVv9Y&t=373

Suggested Wiki Refrence Code

Topics

    Transcription

    1. Snutt

      Speaking of objects that may occur frequently everywhere, we've now introduced a system that converts several architectural buildables that players don't interact with, or don't produce anything, into data-only objects.

      Currently, these buildables are what's referred to as heavy actors in Unreal Engine, like buildings that have logic and actually do stuff.

      The most common examples going data-only would be foundations, walls, or architectural buildables like railings or stairs and such.

      What changing the fancy term means is that we're basically cutting a lot of fat from a massive amount of stuff present in almost all factories.

      So now we only store the crucial data for these things like locations, the mesh that's using customization data, such as like the colors and the recipe that we're built with.

      And the cool thing with all this lightweight data stored in a pre-prepared location in memory is that writing it to save data will be much faster.

      So hopefully this will reduce the time the game stalls when saving when you have a big ol' factory.

      We're also skipping a bunch of steps when gathering save data for these lightweight buildables related to production, which also saves a bunch of time.

      On that note, load times could also be a lot faster in 1.0, and actually quite substantially faster.

      Because when all objects were heavy actors, spawning them was costly because we had a bunch of code that was like running through everything, loading it all, no matter if it was a foundation piece or if it was an assembler being spawned.

      So having non-production buildables be lightweight allows us to skip a bunch of this code and, you know, set your files up faster.

      And the actual save files will also be a lot smaller.

      Non-production buildables being lightweight...

      By the way, I just realized I probably haven't pronounced lightweight properly, but it's too late, we're too deep into it, we gotta keep going.

      Non-production buildables being lightweight also helps decrease runtime memory consumption.

      Actors are huge in Unreal, and with so many heavy actors turned lightweight, enjoy not having every inch of your RAM being used up by Satisfactory.

      This also connects to multiplayer because when actors are replicated to clients in Unreal Engine, it requires that those clients allocate memory to track the state of the actors.

      Lightweight buildables means that this extra data is no longer needed.

      So yeah, TLDR, Lightweight System, makes stuff that don't have logic a lot smaller and easier to load and gooder.

      And on the client side, when playing multiplayer, joining a game is also much faster now because processing those lightweights is so much faster than plowing through all these like heavy actors that existed before.