Streaming out active physics simulated parts to save bandwidth and performance

As a Roblox developer, it is currently too hard to support huge worlds with a large amount of physically simulated parts without physics replication getting throttled, this includes player characters and active humanoid NPCs around the maps. Streaming Enabled helps with this problem partially as streaming terrain and parts out depends entirely on the devices memory.
Let’s look at an example:


My character just spawned in the center of workspace with 700 humanoid characters root parts that are randomly walking and jumping around, most of them haven’t been streamed in just yet so I roughly see 50 of them around me. Now look what happens as I start walking around the map:

New characters are being streamed in, but due to my PC having a lot of memory available, none of the previous ones ever gets streamed out. This raises my recieved packet amount by a lot, even beyond 60KB/s. And from what I know after a certain amount of bandwidth the physics replication automatically gets throttled, which causes packets to be dropped and parts to start teleporting around. What if we released all the extra physics parts that the client doesn’t care about anymore since they are outside of our minimum streaming radius? that would improve the performance of the more important physics parts that are around me and prevent using up extra network bandwidth.
Here’s exactly what I do here (I might have taken it a bit too far in this video though :smiley:)
I used this plugin made by @Maximum_ADHD to reduce the max allocated memory for streaming


The problem is that the only condition in which parts are streamed out is when there isn’t sufficient memory, my PC had a lot of memory to spare, but if my internet connection wasn’t fast enough, my experience would’ve been ruined in a game like this. My proposition is to take into account how much data the server is constantly sending to the player from physics replication, and to try and stream out active parts that are outside of the minimum streaming radius so that bandwidth and potentially interpolation performance (on lower end devices) can be saved.

If Roblox is able to address this issue, it would improve mine and others development experience as we would easily support larger player and NPC counts spread across bigger worlds, as well as more mechanisms like vehicles and elevators without having to worry about slower devices being left out.

26 Likes