How to handle projectile replication properly?

Hi everyone!

I’m quite new to UE (but an experienced developer), and I’m trying to make a basic FPS, with proper networking.
I followed networking tutorials from unreal and other sources, but there is some things I’m still wondering about.

From what I understand, all the important stuff, gameplay wise, should be spawn on the server. So I guess the simplest approach would be spawning projectiles on the server and replicating them on every client.
But I fear there would be a little delay between the input event from the owning client, and the actual spawning (depending on the ping).

So my question is: is there a way to make a kind of optimistic firing on the client, immediately after the input, and defer the spawning of actual bullets to the server, so the game always feels responsive?

Also, replicating each bullet from each player over the network seems like a pretty expensive operation to me (if there is 20 players firing rifles like crazy).
So I thought about just replicating an “isFiring” state for each player, and let the server and each client spawn their own bullets. But maybe the number of replicated bullets is not an actual problem?

Do you think these are valid concerns or am I overthinking the whole thing?
There could still be some things I misunderstood entirely :smiley:

If you’re just starting out then spawn it on the server. That’s how pretty much everyone does it and the delays are acceptable with a decent network. It might be possible to have something more for the client that pulled the trigger, but that is way into advanced UE4 territory. You should probably get a better handle on the engine before trying to do that.