Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Does it matter how many remote events are in a game?

Asked by
Sketchi 18
6 years ago

Does it matter how many remote events are in a game? Will it lag the server or something? My game has a lot, should I try to cram them down?

2 answers

Log in to vote
2
Answered by 6 years ago
Edited 6 years ago

Short answer: No

Excellent question though! The difference between having one remote or many to handle your client/server interactions is negligible. It all depends on what is deemed more organized to you, or what compliments the work environment of your game the most.

Some people opt for using one RemoteEvent/RemoteFunction to handle communication with the server and client, while passing a conditional argument to tell the remote what to do once it has received information. Here's a little example of how one might implement that method which you can examine here. In that example, the request variable is used as the condition under which the function for the remote chooses what to do with the given information (...). Likewise, you could create a separate remote for each of those conditions if you so choose (i.e, a remote event for ChatUpdate , SavePlayerData , etc for each condition showed in the example).

As a side note, sweetkid01 made a good point referencing the bandwidth excerpt from the ROBLOX wiki. You do want to be careful regarding how many data packets you're sending to the game server, however, this has little to do with "how many" remotes you have and more to do with "how frequently" you're using them. So in conclusion, it doesn't matter.

0
I just have colors for a part-coloring button in a gui, each button has its own remote event with the color in the event name, i was wondering because i cant figure out how to link all buttons to one event with multiple colors, otherwise what i have works great server and client. I just dont want lag, i may try to link them all if possible, thank you for the descriptive response!!!! Sketchi 18 — 6y
Ad
Log in to vote
0
Answered by 6 years ago

From wiki.roblox.com:

Bandwidth

For most devices and connections, a Roblox server can only send and receive about 50 KB/sec of data to each client, not including physics updates. That said, it is highly recommended to maintain a lower value during normal gameplay as sudden spikes in data transfer can cause lag and an overall subpar user experience.

Every time a remote event is fired or a remote function invoked, a packet of data is sent over the network between the server and client. This packet is counted towards the 50 KB/sec limit. If too many packets are sent (remote event or function used often), or too much data is sent per packet (lots of large arguments to the event or function), the latency of the connected clients can be adversely affected.

Coming from:

--https://wiki.roblox.com/index.php?title=Remote_Functions_%26_Events#Bandwidth
-- ooh shiny link

Considering this, I'd say yes, you probably should.

Answer this question