hi, I am currently working on a game that involves A TON of unanchored parts and I want to see if I can make it work. I know this may seem a little bit out there, but if anyone could give me any ideas or tips it would be greatly appreciated.
I want to know if there is a way that you can reduce the amount of physics lag in the roblox engine, whether it’s creating my own or optimizing it in some sort of way. Does anyone know how I could fix this lag issue? Here’s an example
You could give each of the players in the game network ownership over a small amount of the parts. But this does raise security concerns as if they happen to be an exploiter then they can control the physics of the parts they have network ownership of. Pretty sure natural disaster simulator does something like this though.
Just parts? I’m not sure if it’s just me but it looks like that’s more than just parts, rather a whole NPC with a Humanoid. If that’s the case then your issue is a whole lot more than just unanchored parts and that would be trying to simulate that many Humanoids at one go.
Without parallel Luau, Humanoids are incredibly expensive and most of their logic is baked into the engine so you have to do some serious reducing on their capabilities with whatever APIs are provided to you. You can get started in two ways: disable all Humanoid state types that you can guarantee the NPC will never need to enter and let the client render them instead.
For the latter part of the above section, there are many ways you can hand off rendering of an NPC to the client. The simple and most approachable way is by having the server represent every NPC as a single part (a HumanoidRootPart possibly may need a Head and/or Torso). The absolute most efficient way would be to have the server acknowledge NPCs as pure data (positional, states, etc) and then replicate those to the client to have it transform state into objects. This is a much more complex solution though so I’m not really going to delve deeply into it, just know that’s a possible resolution.