RTT's update loop iterates over each player, running an update function on every unit one by one. This means that different units see a different state of the world. Worse it means that some players are at advantage as they see the future positions of their opponents.
I previously experimented with an Entity Component System. I've uploaded that to https://gist.github.com/46bit/aca9571c67c553c7223c1f9f1c61d879. That setup prevents this problem very efficiently, by having two buffers of the same size and alternating them similar to blue-green deploys. So long as RTT uses dynamic state and references (even circular references) this is not so easy.
Unless I really want to adopt an ECS or command-passing architecture, the best thing I can do is to get rid of most of the direct references and refer to things by ID instead. That will simplify cloning.
RTT's update loop iterates over each player, running an
updatefunction on every unit one by one. This means that different units see a different state of the world. Worse it means that some players are at advantage as they see the future positions of their opponents.I previously experimented with an Entity Component System. I've uploaded that to https://gist.github.com/46bit/aca9571c67c553c7223c1f9f1c61d879. That setup prevents this problem very efficiently, by having two buffers of the same size and alternating them similar to blue-green deploys. So long as RTT uses dynamic state and references (even circular references) this is not so easy.
Unless I really want to adopt an ECS or command-passing architecture, the best thing I can do is to get rid of most of the direct references and refer to things by ID instead. That will simplify cloning.