Search Unity

  1. New Unity Live Help updates. Check them out here!

    Dismiss Notice

ECS world replication

Discussion in 'FPS.Sample Game' started by e199, Oct 26, 2018.

  1. e199

    e199

    Joined:
    Mar 24, 2015
    Posts:
    100
    Are there any plans to make actual ECS world replication? The solution used in fps sample seems hacky

    I have some experience with code-generating auto-syncronization code for another ECS solution with usage like this:

    There is also [DeltaCompress] attribute, which generates *HistoryComponent to store prev states and systems to do delta calculation and data package for each marked component type.

    But it takes time to support that kind of stuff.

    What are the plans with "native" way of doing it?
     
  2. Mogens_H

    Mogens_H

    Unity Technologies

    Joined:
    Mar 7, 2017
    Posts:
    20
    It is hacky and and we do hope to change to native ECS data serialization similar to what you describe at some point.

    Early on we (the FPS Sample team) settled on a very simple and manual approach to serialization as we wanted to focus on other networking problems (e.g compression algorithms) and general gamecode. Our solution have now mutated into something that also supports pure ECS entity replication by wrapper classes.
    A lot of work is being done on ECS and it is still experimental, so I think for the time being we will keep this "whatever works" mentality for the actual serialization.
    I also think we have a more important task to solve first: how to make it transparent who data is replicated to and how it is handled on client (e.g. predicted and interpolated). It should be easy to create a new replicated object and define how different sets of data should be handled (local non-replicated, replicated to all, replicated to owner, replicated to non owners). And currently it is .. not simple.
     
    nevermorint and rigidbuddy like this.
  3. e199

    e199

    Joined:
    Mar 24, 2015
    Posts:
    100
    Thanks for the answer, it makes sense.
     
unityunity