What are the benefits of streaming-enabled I heard that it gives your game a performance boost for your game but I want to know what exactly are the pros and cons of streaming-enabled
(also I hope this isn’t the wrong forum channel to be asking this)
It’s mostly a matter of reducing client memory usage. Does a player need to have data about an area a couple of thousand studs away that they can’t see or interact with? Probably not. So the server doesn’t send that client any instance data or updates, and the client doesn’t needlessly store them instances in memory. Awesome! When you do get closer to that area, it’ll load in what you need and unload what you don’t.
There’s a few things you do have to be aware of though.
This isn’t a magic button to fix lag. It might help free up memory and up yer frames on your local device - but remember that this is client streaming, not server streaming. The server still has to store all this data and keep it in memory. Enabling streaming might make things seem faster for the player, but if your game is still memory heavy then the server is going to take the fall and you’ll find server FPS dropping. You can create your own server streaming, but it’s not natively supported by Roblox.
There are also some implications when it comes to scripting. How do you deal with parts that you need but they haven’t been streamed in yet? This isn’t a concern for server scripts where the entire game is loaded in, but for client scripts where only parts of the game are streamed in, you have to be careful about waiting for children and working around the fact that parts might simply not exist yet. It’s not a massive problem, just be aware of it and work around it.
So while Streaming will help free up client memory, it won’t benefit the server and you’ll have to work around some goofy little situations where parts or players don’t exist yet. It can be a powerful tool if used properly and allow lower end devices to play your game, but if your game’s design or just overall concept doesn’t work with streaming then you’ll have to find other methods of using memory efficiently. If you have any other questions feel free to ask, I’ll try and answer if I can!
Instances that are too far away won’t be loaded on the client. (They won’t exist on your client unless they’re close enough, which can cause local scripts that use instance.other_instance to error, as well as make instance:FindFirstChild(“other_instance”) return “nil”. instance:WaitForChild(“other_instance”) is a quick fix tho)
streaming enabled doesn’t affect server at all, it only affects clients.
pros: less laggy because not everything is loaded at once
cons: non-loaded instances can be a tad bit inconvenient for local scripts (they’re gonna stop running until the player gets near enough for the instance to load or straight up error if you don’t do something about the instances not being loaded in) AND won’t stop server lag