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

Should ray-casting be handled on the server or the client?

Asked by
Mineloxer 187
6 years ago

As the question in the title says. Should ray-casting for guns be handled on the server? If so, wouldn't it lag the server, especially when multiple players are shooting their guns?

And if we were to handle it on the client, how would we detect and validate that the client has got a hit?

1 answer

Log in to vote
1
Answered by
H4X0MSYT 536 Moderation Voter
6 years ago

This is a hard question. IO games follow this issue. Usually an IO game would let the client calculate it, and make changes, but send data to the server. The server would then validate that information, and send it to the client to compare it with what change it made.

In short, the server validates the information, clients are free to make a bullet appear etc, but the client will make changes if needed based on the reply from the server.

0
Server validation is the problem, since it's hard(atleast for me) to make a validation algorithm. Thanks tho. Mineloxer 187 — 6y
Ad

Answer this question