Sending cframe every 4 times every two frames, to the server using remotes

The reason Im doing this 4 bullets with spread are fired every two frames.

Each bullet is simulated on the server using raycasting for hit detection, without a model acting as the hitbox. The client sends the direction and the startingcframe of the bullet. These thing is created when a client fires a remote event to the server, with sanity checks upcourse. The client also makes its own bullet raycasting for visuals, for example when hit destory the bullet.

Right now I can handle this, and it works fine with 3 people, i’m just wondering if theres more performant way to do this.

I know I could just send a table of 4 bullet datas to the server, but here :

it clearly says the amount of times sent doesn’t matter, but the amount of data sent does, any compression formulas, ect would be helpful.

  1. You could use string.pack to pack the data into binary, but I also don’t know that you will beat roblox’s own protocol.
  2. You probably don’t need to, that’s not a ton of data. Probably just keep doing what you’re doing until it becomes an issue.

This is a cool article about physics that you might wanna read as well.

Thanks for the information i’ll come back once I read it.

A thing I found intresting was Deterministic Lockstep, if you don’t mind could you point me guides or tutoials which cover this topic?

I don’t think it would work out well on roblox though, do you know any alternatives?

Yeah that article goes a little too in depth for roblox. The section about how they compress data is probably the most interesting.

Unless you’re simulating your own physics (which I don’t recommend), you don’t have that fine of control. Best you can do is to send as little data as possible.