Can this be used for a projectile handling system?

hello, Im designing a game that will involve lots of projectiles being fired during 30 second rounds.
there is of course the problem of hit detection for projectiles on the client( projectiles hitting too early or too late on the client).

to counter this, I want to try the standard method developers use to solve this by having the clients spawn their own projectiles, and have them handle visuals while the server handles hit detection.

right now however projectiles are fired and handled by modulescripts on the server.

so here the setup:

1: I have modules in replicated storage, and modules in serverscriptservice.
2: replicated storage modules handle visuals on the client, while serverscriptservice modules handle server hit detection.
3: since there will be a lot of projectiles being fired, one remote event could easily be overloaded and exhausted, to fix this, Im going to get a group of remote events, pick a random event on the server, then fire all clients on the picked remote event.
the client will connect an OnClientCvent to every remote event and will recieve info regardless of which remote event was fired, this should in theory allow much more network traffic and prevent remote event exaustion.

the reason Im doing this the way it is is because the weapons firing the projectiles are blocks on the server and will fire by themselves automatically.

would this system be ideal for what Im trying to accomplish?

1 Like

Using one remote event will work fine, or you could use one remote per gun, that way every player has their own remote, also, most games do hit detection on the client and validate it on the server. In addition, never assume something before you actually test it, like this " since there will be a lot of projectiles being fired, one remote event could easily be overloaded".

the reason I believe it will be overloaded is because of how the game will play out.

there will be around 8 players, each player will potenially have well over a dozen turrets in their “base”.
assuming each player has 12 turrets in their base that’s 8 x 12, which is 96, this means that if every turret is firing every 1 second, a single remote event will be fired 96 times per second.
from the past ive been able to fire a remote event 150 times with a few arguments before it is overloaded, so I can definitely see some leg room.

but of course there’s other things that can happen, such as a player having 20 turrets instead of 12, that will increase the amount of times the remote event is fired by a lot and increase the chances of overload for one remote event.

I could add a turret limit but I want to avoid that if possible, players may have a lot of weapons but they wont be able to obtain hundreds.

and to answer the question of adding a remote event to each gun, that would be messier for projectile replication since all your trying to do is tell all clients to spawn a projectile at a specific vector, it would be a lot easier if all u needed was in one place, such as replicated storage.

so far Im not having trouble doing the mutliple remote event stradegy mentioned above, I was just curious if there would be any future problems with this, or if any other devs tried this before.