LabAPI icon indicating copy to clipboard operation
LabAPI copied to clipboard

[IDEA] Make DrawableLineMessage serialize Vector3[][] instead of Vector3[]

Open Someone-193 opened this issue 9 months ago • 1 comments

Goal Description

I would like the DrawableLineMessage next update to be serialized using a Vector3[][] instead of a Vector3[] that way many different segments can be sent in a single line message rather than multiple (you can technically accomplish this by inserting a bad vector (new Vector3(float.NaN, float.NaN, float.NaN)) into the array but it's a crude solution)

This change makes more sense as it would reduce network overhead for complex line objects at a minimal cost (even if you limited the size of the outer array to a byte, 255 different connected line segments is nice and then the added cost for single connected segment packets would only be a byte, which is 1/24th the cost of an extra Vector3, so very small)

Notes

Idk how you'd want to implement this with mirror, but a whole extra int for each message to indicate the length of the outer array seems excessive

Someone-193 avatar Feb 10 '26 03:02 Someone-193

What would be benefits of this? We use drawable lines for debug, maximum performance is not necessary.

davidsebesta1 avatar Feb 13 '26 17:02 davidsebesta1