Best ways to prevent server/clients from straining with mass unanchored parts

Hello DevForum!

In a game that relies on at between 0-1000 unanchored parts, how would I prevent the server and client from straining? (don’t really expect a 100% no strain solution)

Each player controls around 250 of those unanchored parts.

Possible options I thought of include setting network ownership or steaming enabled.

Network ownership for at most 250 parts won’t play well with weak mobiles or PCs.

Code would need to be adjusted to work with SteamingEnabled, sounds like a possible solution though.

Advice/other methods are appreciated, thanks!

Do all of the unanchored parts need to be in view of the player?

If not, then this would be a cool approach:

  • Anchor everything.

  • Split map into chunks (e.g. Models).

  • Turn on fog.

  • If player is within lets say 500 studs of an “unloaded” chunk for 5 seconds, load the chunk (Unanchor the parts).

  • If the player is more than 500 studs away from a “loaded” chunk for 5 seconds and isn’t looking at the chunk, then unload the chunk (anchor the parts).

It’s good practice to make sure there is at least 5 seconds of certainty so that chunks cannot unload and load repeatedly when the player moves back and forth between the 500 stud limit.

The fog helps to cover up the anchored parts.

If you can also efficiently incorporate StreamingEnabled and NetworkOwnership for good performance, that’d be awesome!

Good luck. (Credits to @TheAviator01 for some guidance).

1 Like