Hey guys!
Before I dig into the post, just some context. I am fully aware of how Remote Events (REs) work and their use cases but I am just looking for the most appropriate form of implementation with regards to the network and efficiency.
Currently, I operate with multiple REs and I ensure each one has its own use case. For example, if I am doing a sword slash, I have a remote event for the sword SFX (SwordSfxRE), the VFX/Particles (SwordVfxRE) and, hypothetically, any data I want to communicate to the server or data manager (SwordDataRE).
In my brain, this makes sense, and it is how I have always handled remote events. People ask if they can get messy, not really. I folder them and ensure my structure is clean. Though there are issues that I want to address.
-
System Changes: If I want to change the way I am handling SFX or VFX, I have potentially 20 or more remote events associated compared to some people who just use one and pass through a string value. Though I have heard that passing through strings is bad with a RE? Unsure.
-
If lets say 20 players are swinging their sword at the same time, for each player 3 remote events are firing whenever they use their sword. On top of this, its technically MORE than 3 per player as if I want everyone to hear the sound, the SFX & VFX remote first have to send to the server before being broadcasted back to all clients. Are bindables more effective here?
I am worried the way I approach these systems backlog the server or arenât maintainable and will slow performance. I also tend to fire a remote event to a server script that fires it back out to all clients and again, I am not sure how poor this could be on the network.
Is it better just to do a simple approach, one remote for ALL SFX for example:
SFXBroadcast:FireAllClients({
Sound = "Name",
Position = x,
ExcludePlayer = player
})
How do you guys/what is the proper way to deal with remote events (SFX/VFX/DATA in particular) that need to be fired rapidly by lots of players, especially with it going from Local â Server â Local often. Do I move to bindables for this communication?