The lag on a place I currently develop just seems to get worse every day with complaints from players and even my own Studio freezing up occasionally. I’ve decided to wage war against 210K+ parts and 770K+ voxels starting reluctantly with StreamingEnabled.
Now I was able to perform a rudimentary streaming test with CollectionService and very small StreamingMinRadius and StreamingTargetRadius values. I started by filling a 512x512 baseplate with some trees from the toolbox and tagged every BasePart descendant in the workspace. The behaviours lined up and I can make assumptions from the API as well: streamed in parts fire GetInstanceAddedSignal, streamed out parts GetInstanceRemovedSignal. The only thing I don’t know is how they’re streamed out.
Judging by the CollectionService API reference page which thankfully had an excerpt on StreamingEnabled and encouraging the use of OOP whenever working with tags, it seems that you can still access the part otherwise the code sample provided wouldn’t work with the edge case of not having access to the Roblox instance stored in the class object.
In addition to the above, given that the connections made in the class are manually cleaned up, this leads me to think that the connections persist meaning the part is reparented to nil (memory) instead of outright destroyed (locked). Logic seems to answer my question but I’d like confirmation from someone who’s familiar with the reality of streaming.
Hopefully this is something you haven’t seen yet, this article on ‘Game Content Streaming’ goes over the Technical Behavior of streaming, it should answer or at least help out your problem.
No, it doesn’t answer my question. Forgot to say that I have read that article and it doesn’t contain any answers to my questions. The only thing it mentions is the flow of streaming and what may cause a part to be streamed out, doesn’t say how though.
Based on what is said in this announcement: Big Changes to StreamingEnabled, It seems like the parts are destroyed, because this challenge : “Clients on poor networks may be able to enter regions before they have been streamed in from the server”(Also later on in the post it says :“servers search for regions to be sent to clients”), if it was parented to nil on the client, then they would be able to access it instantly without delays, or maybe once the client loads in the parts it is then parented to nil after on the client.
I need to know for a fact though, or some technical tests that I can try out to determine this, not through speculation or unclear excerpts from an announcement. This still doesn’t fully answer the question, this is mostly in regards to network details.
Could you determine this by creating a pointer to an object in the game world, have the player spawn by it when they join, then have the player walk away from it so streaming hides it, then print the value of the variable to see what happens to it? Perhaps you could see if its parent is set to nil, then try setting it back to workspace. If it throws an error, then most likely :Destroy() is called on the object.
Not sure, just had this idea.
local brick = workspace:WaitForChild("APart")
while wait() do
print(brick)
if not brick.Parent then
brick.Parent = workspace
end
end
You could honestly probably go about re-creating your own “streaming enabled” that also loads parts in and out instead of loading them in once and keeping them in.
You’d probably have more flexibility doing this as you can choose what parts to load in/out and what to keep there. You can probably keep the ground as thats important to ensure the player doesn’t fall through the world, or you can keep important objects that require scripts to run on them, etc.
Other parts can be hidden/set transparency 1/etc. Make sure its on the client as well.
Also, simplify voxels. Now I don’t know how to neccessarily work but, they dont seem to load in parts that are hidden with other voxels? I haven’t test this however, maybe you can do a really hacky method where if the ground below (which isnt seen at all) is done with voxel terrain like the wood or brick one, it can get rid of most if not alot of unneccessary voxels/polys? Since the rock still shows voxels/polys beneath it. (I may be wrong though)
@C_Sharper Will try, thanks for the idea. Don’t have the time to right now but just letting you know that your suggestion is received. I forgot about RobloxLocked objects. Another problem though is that I can’t seem to trigger a circumstance where a part needs to be streamed out by overloading memory or anything.
@3rdhoan123 Appreciate the suggestion of using a custom streaming solution but that’s not what I’m asking here. I need to know specifically about StreamingEnabled’s behaviour.
Yeah, I got updated clarification from staff and the docs were updated when I posted about this recently. Thanks for the interest in making sure new information was provided, forgot I had such a thread around.