How much work can the Server do?

Alright so, if I were to render Explosions on the Server (which I wouldn’t do, I’m using this as an example) would this cause any lag in terms of ping for the Clients? How much work can the Server actually do? Can the Server do work such as Tweening Effects, etc without the clients’ ping being affected? Sorry if I didn’t explain well, let me know if I didn’t. :slight_smile:

1 Like

I’d recommend TweenService2 for that, the tweens will be ran on the client, but replicated to the server and other clients.

2 Likes

Alright, but my question is how much work can the server do without drastically affecting the other client’s ping.

I really wouldn’t recommend it, however if you were to I’d say around 30+ at a time could hurt performance on the server.

I run a few tweens on the server, around 10 and don’t feel a thing but getting to about 30 it starts lowering clients’ ping.

I said I wouldn’t do it, tweens were just an example, I’m just talking about in general, like how much work can the server do without affecting the client’s ping on a large scale.

‘work’ as in explosions? I’ve been in a few games and 10 of those at once lower my ping a lot.
Different types of ‘work’ give different results in terms of performance so if you could elaborate what kind of work you mean I may be able to help.

The server is capable of handling quite a hefty amount but obviously not nearly as much as a client’s machine can. For any kind of effect, you should always aim to perform it on the client with the server only being an information transfer medium.

Global effects would call FireAllClients and pass some information down such as the position of the explosion and the necessary growth size, to which the client would create an effect based off of those parameters. For character-based effects (such as from a gun), the user client would have effects rendered immediately while using the server to tell other clients that they should render the effects from their end.

1 Like

Is the Server capable of handling large amounts of Hit Detection? Such as Region3 hitboxes for Projectiles that need a Hitbox with a size?

General practice for something like that would be to run the detection on the client, Fire to the server, have server do simplified sanity checks like “Is this part close enough to reasonably been colliding” and then replicating effect to other clients.

1 Like

Again, I am just speaking hypothetically and using examples, my main question is how much work can the server do without drastically affecting the clients ping.

This is such a broad and unspecific question that you are not going to get an answer that you want. It depends on what you are doing in lua, what the roblox C++ code is doing under you, what the server OS is doing under that, and then how the hardware is configured under that + some network shenanigans. There is no way to answer your question (not to mention work is not even defined). So really you just need to do tests on your specific task and then build your system to be as conservative as reasonably possible.

2 Likes