Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Are there any ways to reduce server projectile lag?

Asked by 3 years ago

I am currently developing/testing throwable, damage-dealing bricks in my game. This is what they currently look like:

https://gyazo.com/46267f7cbb0de60ecffb9610462dd8ea

They are partially working (they will eventually have torque and more effects, etc.), but I am worried about the initial lag when the brick gets created and given a velocity. It may be hard to see in the video I've attached, but the bricks have a significant freeze before they start moving. Currently, a local script in the player detects when the player clicks with the tool equipped and fires the server to clone the brick in hand to be the projectile, creating some server delay.

I know server lag isn't avoidable so I am currently planning on creating a client/server system where the server handles the 'main' invisible brick for detecting collisions, doing damage, etc., and beforehand the server will fire all clients to create an identical brick of their own so that the players' experience is as smooth as possible.

My questions is, is this the best possible way I should be handling the projectiles? Would there be any issues (like blank hits) caused by the server collisions being slightly delayed from the clients' collisions?

All help is appreciated :D

Answer this question