Too Much Data Transfer

How do I prevent too much data being sent across remote events?

When you fire a weapon and kill a zombie, for example, there’s a lot of data that needs to be transferred.

For example, damage, exp, money, all multiple times in second. From the client to the server then back to original client/other clients. Any tips on how to keep this at a minimum so your client’s connection isn’t tanked?

When you fire a weapon and kill a zombie, for example, there’s a lot of data that needs to be transferred.

No there isn’t. For firing a weapon, send your mouse position/angle/whatever.

To kill a zombie, either just do it entirely on the server or send a remote event with the zombie instance.

You’re already describing your own issue, there’s no reason to be sending any of that information multiple times a second. Most information should be handled by the server to begin with, and you only need to send data when it actually changes.

Firing a weapon should just be as simple as saying the player pressed the trigger, sending an angle, and then the server should handle EVERYTHING beyond that point

2 Likes

But after you kill the zombie and it updates the player data table on the server it still needs that data to be sent back to that player’s client so they have it up to date.

1 Like

Why not use value objects on the player object itself to have the data automatically replicate?

lol i believe I made a whole thread about that a while ago and you posted on it

1 Like

We did and what I said is still true that values are an optimal way of automatically replicating data.

The data structure is very complex tho.

And when I mean send the player data to the client im not sending the whole thing, i’m sending only bits of it.

The parts that were updated only.

1 Like