Which of these options fits a projectile better?

My game is a PvE one. This means that the way the other clients will see what the other players are doing will not matter. This being said, I think it is still important that the other clients see projectiles coming from where they should come.

The effects that “confirm” whether or not the bullet hit happen on the client, upon the bullet’s collision with anything. This question is purely regarding these effects, for a better responsiveness to the clients.

I am unsure as to if I should make the bullet’s starting position the one given by the server (excluding the client that shoots it) or still keep the position but making the hitboxes process from the position the bullet comes out of in each client. The implications are:

  • For the former the bullet has the detection apparently accurate on the client but may hit a target it would not hit on the server, thus making a “fake hit”.

  • For the latter, there might be slightly wrong timings on the bullet hitting a valid target and may even clip completely a target it would normaly hit due to slight position differences.

All help is appreciated to deal with this dilema.

what do you mean by effect. is it sort of like a particle?

Also I am confused by what you mean when you say the bullets starting position, or “making the hitboxes process from…”

so clarification as to where your dilema is coming from and maybe explaining your scenario a little more in detail might be helpful.

1 Like

To not overload the server, I am having the clients have the parts that correspond to the bullets.

When making these parts, they will obviously get an inicial position they are created on, which, in both these situations, is the position that would look more realístic. However, these are just a display. Every frame, I am storing the new CFrame, and based on a size variable, detecting hits on that point. Note that this detection has nothing to do with the visible bullets.

My question in this post is whether I should make the position of these “detectores” start from the server’s position, giving a better feedback for other clients while allowing some instances of seemingly (to the player) not detecting hits and even having slower detections (depending on the difference between the position) or have these detectors have the exact same starting point as the visible bullets and getting some instances where it seemingly hit but it actually did not.

The server is handling any damage necessary or whatever kind of consequences the hit may have while the client is just doing effects that would happen on hit.

I apologise for not explaining so well, is there something you would need further clarification on? Thanks for the help, in advance.

how are you detecting whether it is hit or not?

A bunch of raycasts from the new position to the last and vice-versa. Because this game has 2D gameplay (if you want some reference of what I want to create check Enter the Gungeon), I can do the following:
image

I just raycast these red points to their last position.