Updates to Streaming Enabled

Lovely! All my major wishlist items are on there :smiley:

2 Likes

I’d really like to see streaming based on occlusion in addition to distance. It’s a waste of resources to replicate instances that the player can’t see.

2 Likes

That Exclusion Mode sounds very nifty. It’ll let me safely host my scripts in Workspace without hackers being able to copy instances in workspace, since I can exclude the script objects from being streamed – which, in turn, prevents workspace copy scripts from reading them.

Doing so would actually be a very big step forward for Roblox, as it would allow people to place scripts in Workspace in a secure manner. In turn, this change allows people to delete entire chains of WaitForChild() or the various WaitForDescendent() implementations people have posted here. No more game.Workspace:FindFirstChild("Game Objects"):FindFirstChild("Tycoon Blocks"):FindFirstChild("Upgrader 1")... chains!

TL;DR: adding Exclusion Mode would allow people to return to an object-oriented programming style that Roblox was originally visioning in the first place, as well as giving me the ability to hide Workspace objects from clients, such as anti-cheat range checkers to prevent flying and speedhacks.

4 Likes

I don’t think you’re quite aware of how roblox scripts work. Roblox never has and never will send the bytecode of server scripts to clients so exploiters never could copy your scripts but they very much do and need to send the bytecode of local scripts which exclusion mode won’t really solve since for those local scripts to run the bytecode has to be sent to the client.

3 Likes

The bytecode of server scripts in Workspace can be replicated through a few exploits (though, admittedly, most of which rely on some things to be set up in a certain way – if there are any that can do it without a specific framework in place, I’m not aware of them.)

But my issue is moreso that I want to be able to hide objects from the client - not bytecode. If, say, an exploiter finds a script and a remotevent in the workspace, it wouldn’t be hard to guess that spamming or exploiting the remoteevent affects the script in question - ergo people ticker with stuff that shouldn’t be tinkered with. Yes, I could put it in ServerStorage, but now I have to deal with a dozen WaitForChild calls for objects inside a non-atomic hierarchy.

4 Likes

Recently a Roblox developer (staff) provided a rather unconvincing reason for why selective replication hasn’t happened yet. You can read the replies to see what people thought of it.

I have a few use cases for selective replication.

Provide information only to players who need it.

  • For example, we have an instance holding information about a players inventory. By default it is only replicated to the player whose inventory it represents. If two players are trading we can temporarily replicate each players inventory object to the other so that each player can see what the other owns.

Moving between different ‘rooms’ in the same server.

  • Let’s say we have many different areas you can go to. In the current replication / streaming model you would place these areas physically far apart from each other so that you don’t see the other areas and instances / network updates for the other areas are filtered out from being sent to you. You would still be able to physically fly across a void from your current area to another area, which may be undesireable.
  • In a selective replication model, only the area you are currently assigned to is selectively replicated to you. The areas may be physically next to each other from the server side view but the only thing the client ‘sees and receives’ is the area they are assigned to. In this example, the player characters, game objects, and map of an area are descendants of a Model, which is what gets selectively replicated.

Selective replication does get complicated when you start to think about Physics and Terrain however.

  • If you are separating your game into discrete areas, physics starts being a problem because server side physics has the full picture, and it will collide parts that belong in different ‘areas’. Something would have to be worked out so that you could separate the physics simulation into arbitrary groups of instances (Something with having multiple WorldRoots?).

  • As for Terrain, it currently exists as a single object, parts of which are streamed to you based on your ingame position. In a selective replication model, it would make sense if you could create and render multiple different Terrain instances at the same time, similar to a part. And just like a part, you could have multiple Terrain objects with different shapes and appearances, and they will be able to occupy the same space without ‘joining’. Of the Terrain instances that are currently replicated to a client, only the relevant voxels of those Terrain instances will be streamed to them.

  • Going down this route would also allow for future ‘terrain type instances’ to be added, such as a ‘heightmap terrain surface’ object or an ‘arbitrary vertex terrain surface’ object, with the terrain of today becoming known as a ‘voxel terrain’ object. This idea is so good that I think I’m going to make a feature request about it.

Also if a selective instance replication API is added, current replication rules that exist for instances such as PlayerGui, PlayerScripts, ServerStorage and ServerScriptStorage, should be implemented using the new API. Such that, if desired, we have the choice to enable replication of a PlayerGui to a player that it doesn’t belong to.

7 Likes

As others have said, this issue can be addressed by having the entire train under a single model with the model streaming mode set to atomic, so that the entire train exists at once, rather than being partially available.

4 Likes

Super excited to see where this goes! Making a customized setup for this that still ‘works’ with streaming has been pretty challenging, but seeing it all “just work out of the box” would be magical, to say the least.

4 Likes

this was probably answered and i’m just a bit blind but, is there a fix to rod constraints disappearing?

1 Like

Improvements are always welcome!

1 Like

I really appreciate the transparency in these posts recently. There has been a tremendous improvement in this regard over the past few months from Roblox.

Many of the new features you are exploring are evidently very highly requested features and I really appreciate how much effort is being put into streaming enabled. It has been such a limited feature for years but recently these updates have made it infinitely more useful

1 Like

being able to work with multiple Terrain instances would be amazing - expanding the usability of the almost-unheard-of TerrainRegion class would be a great boon. It’s always been tough working on multiple islands when they’re all considered one object!

4 Likes

I do have the ask, what does “massive worlds” really mean? I personally have quite the massive world for one of my places and using streaming would just cause it to crash the server on start so uhhhhhh yeah. Not helping the fact that my “massive” world is more of a massive grass plate with extrusions in different directions. Personally ive never had a good experience using the built in streaming as it often loooves to do its own thing along with the fact that im not sure how to feel about having the server waste resources on handling the swapping in and out of very specific assets for all its players. So with all these things in mind, i just have a relatively simple request:
Can we just get some sort of api designed to let developers store and request game assets to and from disk? Basically something roblox already does but mainly just to automatically cache a few games to disk for quicker (and WAY quicker) loading in said game after the first initial join. Like to be honest thats kinda all i really need, just some sort of system that would let me store and get various assets (like textures of different resolutions, meshes of different quality levels, models of different quality levels and etc…) and just make my own specific streaming system based primarily on the client. Or would this be too unreasonable to add because of the fact that some people will try and push 10 gigs worth of junk onto peoples disks? I mean i guess but dosen’t the current asset cache system already have some sort of limitation for these scenarios? Pretty sure it does not store games in cache forever and will eventually delete them after not playing said game for quite a while but i could probably be wrong about this. Still, is this something we could just have? This sort of system would help developers ACTUALLY (and hopefully) make real massive and detailed worlds without crippling or just straight up killing the server in 2 seconds. (Would appreciate if this sort of adding and requesting assets to and from disk could be done to also add assets in other places designed to keep players in them one way or another and have said assets requested from disk in the places that they actually reside in)

2 Likes

I’m very happy to see that the Roblox team is starting to improve their communication with users and developers on the platform- this is a great thing which should be encouraged.

With that being said, very excited to see what the team is thinking about. Per-Instance Streaming Controls and Regional Streaming sound especially exciting!

1 Like

Streaming automatically from disk would be great after it’s downloaded from network, could also persist between sessions and speed up load times even more

2 Likes

Yeah, that i was asking for in my last point! Would be a game changing feature to have!

1 Like

This would be a huge resource for developers. Even if streaming can eventually make all custom optimization solutions obsolete, we still need those solutions during the months/years it takes for improvements to roll out and become stable.

It’s also something that will probably always have use cases no matter how good streaming natively is. There are just too many conditions and circumstances in which a client will need access to something in the server’s datamodel that no other client should have access to.

I have several use cases in my games where things need to be replicated to a single client, that aren’t supported by streaming (or even planned to be in this post):

  • Inventory/shop ViewportFrame models
  • Large UI menus rarely accessed
  • Model placement visuals
  • Fog of war
  • Skins/cosmetics

If we could set instances to not automatically replicate unless a player was added via a method similar to Model:AddPersistentPlayer(), that would cover all these cases and many more.

2 Likes

Question: If I want a large model to be persistent, but the models /within/ the model not be, how do I do that?..

I have a base model with a primary part and a few other parts, of which I want to all be together, but within that model there are details I want to stream out. When testing, it seems like even when I set models specifically to non-atomic within an atomic model, everything inherits what the base model was set to - so, atomic. Assuming this applies to Persistent as well.

Considering this means that a Map contained within a model loaded in cannot have any part of that map in the model itself set as Atomic, without putting the parts within a redundant second model, this is either me misunderstanding something or a massive oversight…

I’d assume Default should inherit what the model above it is, but if I specifically set something to non-atomic, it should be non-atomic, and ignored during it’s parent model’s atomic load-in.

2 Likes

Does anyone know why Streaming Enabled is lowering performance when the min distance is set higher?

For reference: Because everything is still within the Target range, this isn’t actually loading in anything new. It is just lagging a lot despite the min distance change not loading anything more in…


(The game crashed immediately after this.)

I have spent like a dozen hours in my game attempting to get Streaming Enabled to work and I continue to find new and cruel roadblocks. Guess the setting goes off again - Maybe one day I will be able to publish this game update months in the making at this point…

(No seriously somebody help me figure out what is going on I am losing my sanity)

EDIT: Likely caused by repetitively trying to load an area in a localscript loop. Would love a way to ‘keep’ an area loaded.

1 Like

Seeing the feature I’ve been proposing for months now actually be considered… :sweat_smile:.

This is an excerpt of a post I made on an older topic:


In all honesty, the route taken in the development of streaming enabled is botched like you wouldn’t believe. It truly blows my mind how selective replication has yet to be implemented despite the fact that it will undoubtedly pave the way for further improvements to streaming enabled. What I mean by this is that rather than just giving developers arbitrary features they think they need, give them the ability to craft their own custom streaming functionality so that they can both confirm that they need it- but also not delay or outright abandon their project waiting for a feature to be implemented.


Words of wisdom by @tnavarts:


1 Like