Overall is bullet detection on client or server better?

I want to know if client side or server side bullet detection looks/performs better.

3 Likes

If you are using Ray casting, using it on the client would be faster. But if you have the time I would recommend doing both for maximal speed and safety.

3 Likes

If I was casting on client, would the combination of server be for anti cheat purposes or what?

2 Likes

Yes it is the main use of the server here, but depending on how you do it, it can also make it easier to implement stuff into the game later on.

2 Likes

Also I know if I am casting on client, say some lag was involved where on the shooter’s side the bullet hits someone and on the target’s side the bullet missed. Do I just prioritize the shooter’s perspective due to it casting from the shooter I am guessing? Or is there a way to handle that?

2 Likes

Well, since it is on the client, it would only occur on the clients side. If you were making a fps game you would need to make it so that when someone shoots on a client, it gets sent to the server and then to all other clients.

2 Likes

Firing all of the other clients is just for visuals right? Only the shooter is the one casting?

2 Likes

Yes and I believe it used to allows others to take damage if need be.

2 Likes

What about when the projectiles in question are coming from something like a sentry, since it basically “belongs” to the server instead of a player should you still do projectiles client side or switch to server?

2 Likes

I would run it on the server for something like a sentry in a tower defense game

2 Likes

Alright thank you for all your replies.

2 Likes

No problem!
Good luck with your game :+1:

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.