Bullet replication high recv

What do you want to achieve? I want to minimize recv.

What is the issue? Recv is very high.

What solutions have you tried so far? I’ve tried using remote events, attributes, and parts, but none of them worked - recv was still extremely high in all cases. I also can’t handle bullet ballistics on the client side because my system has penetration and other mechanics that must be checked on the server.

The video shows a method using attributes, which, based on my tests, turned out to be the most efficient, but the recv is still too high. Within this method, the bullet is created on the client and follows the path that was defined by the server.

I would appreciate any information on how to replicate this properly while maintaining low recv usage.

how much and what kind of data are you sending thru the remote?

I don’t use remotes, I use attributes. I update the position when the bullet falls along the trajectory

image

Bullet Simulation is the way to go, although its a hefty task if you need to revamp your entire code because the server does all the checks whilst the client just simulates some of it’s behavior, Although this is not easy if you add fundamental replication rules, like latency.

for this, you’re probably better off using a remote, updating attributes will send the affected object, the new value, along with other data after some overhead

everything else done on the server will also impact the recv, we don’t have too much info to go off and tell you what exactly is causing the high recv, you should probably check your bullet simulation or send a snippet of code

I’ve already used remote events, but they only increased the load. On the server, I’m not creating anything that should be replicated to the client. When I disable the bullet VFX, recv goes back to normal, as if I were just on the baseplate.

Right now, I’ve reduced the recv to 80, but it’s still too high.

You can use buffers with remote events and minimize the size of data you are sending, possibly into 16-bit numbers.

The way professional games do it, is they use a UDP connection (which in Roblox would be ‘buffers’ since all Roblox connections are technically UDP but with checks)
The client will send a signal, saying a bullet was fired (unless its like a server controlled automated gun or npc fired gun)
The server will tell the other clients you fired a bullet
Each client does the simulation of the bluets movement while
the Server checks to see if the bullet hit anything, while giving periodic updates as to where the bullet is positioned at, and its velocity etc…
Then when the bullet is out of range or hits something the server lets everyone know.

The server updating the clients doesn’t have to be super fast or contain tons of data, it can just contain data that has changed since the last update, since the clients are doing the simulation.

if you use attributes, you should instead use remotes and reduce amount of data you send

The simpliest thing to do is to use multi-remote structure and use bit-buffing to compress the data, remember that each string character costs 1 byte, each number 8 bytes, each instance 4 bytes, it’s practically better to send 1 remote with data you need to replicate bullets, rather than updating it every time or sending huge tables

then you should check code related to the vfx, people will tell you to use buffers, optimisers, etc. but i advise you to check your vfx code or send a snippet.

i can shoot well over 60 bullets a second in my own system with replication and all, while keeping recv well under 5 kbp/s without any sort of buffer or optimization, as long as you have the right approach, it should not go as high as >10 kbp