Arrow barrage problem (replication and latency)

Hi guys. Today I wanted to make “Arrow barrage” event for my game.

In my intentions, N of arrows should spawn, and they will damage everything they touch, except other arrows.

But, because there’s ton of them possible, like 1-2k on big servers, I have decided to try to optimize all that arrow mass. Hit detection is made via Raycasting, and arrow movement is made via BulkMoveTo().

But, even with all that things, this event still hard work for server, so I want to make arrows client sided.

But problem I have got is damage moment:
Arrows can move on client screens, but damage is applied via server only. How I can minimize latency of the moment client sees that arrow hits part and part actually receive damage?

at 1k~2k arrows, does the effect of every individual arrow really matter? Why not just make it into an AoE attack and use the arrows just as a visual

3 Likes

Not thought about it that way, I’ll think abt it now.
Thanks.

1 Like