For a current project I’ve been working on I send a lot of remote event calls to the server. Some of these server calls send 5 separate parameters of data. I realize the more data you send the slower it reaches the server. Would it be more efficient to concatenate these parameters into one string in the form of “type|type|type|type”, and then send that and dissect it in the server? Any help or input would be great!
So my game involves the player placing crops at a specified location and then the crops grow. These events fire rapidly. I handle the growth calculation for each player on the client and then send a remote event to replicate the growth stages on the server. I’m sending in a seedName type string, location string (“x:y”) , and stage of growth (int) in my most rapid remote event calls to handle growth. Sometimes there is a noticeable delay in replication. Should I create a local copy so the feedback is immediate or is there a better way to optimize this with the given parameters?
I think the first thing to think about is do you need to send remote events so rapidly? Cutting down on the number of events would be a much better approach than trying to make marginal gains by condensing the information. Additionally handling the growth calculation on the client seems like a bad practice because it could be exploited.
I would recommend just calculating the growth level on the client based on the time planted. A client could just be sent the plant type, location and time planted and display the correct growth stage. When the plant is harvested, the server can simply check does the time planted to make sure it is in the correct growth stage.