#DOTS netcode floating origin support
1 messages · Page 1 of 1 (latest)
It's not built in as far as I'm aware
floating origin in multiplayer is an... interesting topic
like, how do you handle that on the server?
it definitely is, but it is possible because of games like DCS
sure it's just not using doubles?
a quick google seems to imply this, but i can't actually see a dev source to confirm
there was a 32 version at some point, but it looks like they dropped it after floating point limitations
pretty sure unity doesn't support doubles either for transforms
looks like you were right
but games like VTOL VR do exist as a multiplayer game with vast distances, and after decompiling it, it looks like the developer also uses floating origin
so it does seem possible
the question is, what is the origin on the server though
if 1 player is -100,000 and another player is 100,000
how do you resolve it
not saying it's impossible, it's just complicated
based on what I can see, the game uses a lot of client side physics for players, and they might keep track of their unedited origin position to be sent to the server
i have seen games use floating origin only on clients
but there's also server side ai's, which I'm curious on how they work
the server was built in unity
from what I can tell, the server's physics are accurate enough that server side AI's/objects don't have to worry too much about major miscalculations, it's just visual glitches are the main worry due to minor millimeter glitches causing major visual bugs on clients
This is a topic of current active research for future entities & netcode & unity versions but no decisions have been made about it yet
it would be great, but I don't think server authorative (with client prediction) physics movement would work at exceptionally great distances due to eventual floating point precision errors you would get on the server, but good luck nonetheless!
how much is "exceptionally great distances"?
I have "floating origin" on my netcode (but it uses 2 bytes floats to send position) writing first the player position as a full float on the first 12 bytes of buffer and then writing all positions of all entities (i`m using snapshot interpolation) relative to it
writing "origin" as double can work here