My attempt at maximizing server performance

The server is set up to do as little as possible (except obviously stuff that needs to be secure).

Here is what the clients see:
https://gyazo.com/3c470cacd951024699b80d4b3ccacab1

Here is what the server sees:

Each character on the server is only 1 part!!

Here are some performance stats for the server:
f95b4ce4a9c5872c35441b7e5e156530
https://gyazo.com/1cf9d7cf95e2f4aed5ea6929d4248205

It remains at a constant 70 threads! Now remember, not much is implemented yet; but I think that is a great start!

Here are some client stats with a prototype (and very inefficient) animation running:
https://gyazo.com/70c0146a7f9731fa578f26df64a9f7cd
https://gyazo.com/6e206a163f2128a4a4c5b1d68e416dc4

What do you guys think?

6 Likes

Omg anti lag script!! Watch out guys, its a virus!

Jokes aside, this is really cool. but what if the player has a bad computer?

3 Likes

As i said in discord, very good idea. Hope it works out, who knows this may just because the new norm…

1 Like

I’ll have everything adapt based on the user’s ROBLOX quality level.

1 Like

Really isn’t anything new, in fact my servers workspace is entirely clear :grimacing:

2 Likes

Yep I havent gotten to that yet.

Did you end up using the solution of CFraming the parts every frame? Server performance matters, but I maybe client performance matters more.

2 Likes

So how did you manage to make each character on the server only one part? I can only manage to get HumanoidRootPart and the Head, if I remove the head the controls become unresponsive, for example pressing space doesn’t make you jump unless you spam jump.

1 Like

Yeah I resulted to CFraming.

However, let me also go into how my animations work:

My custom animations are running on a bindtorenderstep, which are updating about 16 joints’ transform property.

Updating the CFrame of the HumanoidRootPart is essentially the equivilant of adding one part to animations.

Shouldn’t be an issue.

I actually essentially got rid of characters on the server. Rather, create just the HumanoidRootPart on the server and give networkownership to the player.

The player makes their own real character on the client, and then just updates the CFrame of the server part to match their own local character.

I also added a BodyVelocity inside the server part, with maxforce of inf and velocity of 0, 0, 0. This ensures that the part stays absolutely stationary and is always at whatever position the owning client set it to. (aka no glitching up and down).

Similar to my system for my space game, the ships are 1 part, or only a few on the server, but just basic bricks, and the client loads the mesh that goes on top of it, which also allows a LOD system

1 Like

Are the legs and arms added on the client too? I’ve been trying to do something similar to this, but I’m not sure if adding the limbs on the client would mess it up at all.

1 Like

Everything is added, on the client, and added on (physically on to) the HumanoidRootPart that is created by the server.

Additionally, I have included a humanoid in the server rig, and then the client will drag that humanoid into the rig it creates. Now we have accurate humanoid events such as walking, jumping, and running!

1 Like

Oh sweet! I imagine that eliminates a ton of lag

1 Like

Not much to cause lag right now for testing improvements, all I can hope is that down the line it will majorly benefit performance.

1 Like