Search Unity

Server side\Resimulation\Replay\Determinism

Discussion in 'Entity Component System' started by echeg, Mar 27, 2018.

  1. echeg

    echeg

    Joined:
    Aug 1, 2012
    Posts:
    90
    We like ECS approach and use Entitas-CSharp.
    We write a network strategy with full determinism and fixedmath. (All core-game code in DLL with unit tests)

    In https://www.twitch.tv/videos/241945353 you are talking about determinism.

    May you provide any examples of deterministic code?
    If there are no examples, if there is any more information about this?
     
  2. PaulNK

    PaulNK

    Joined:
    Apr 8, 2015
    Posts:
    27
    I asked a similar question recently. It looks like it's not in the current preview and I wouldn't expect to see it anytime soon.
     
  3. GabrieleUnity

    GabrieleUnity

    Unity Technologies

    Joined:
    Sep 4, 2012
    Posts:
    116
    The Burst compiler will be able to generate code that is deterministic cross-architectures. In the beginning, we won't focus on pointer determinism, maybe we will eventually tackle that too if it ends up being important.

    The way we are achieving determinism is by a mix of efficient emulation of non-deterministic function, leveraging operations that are well defined across architectures. We will expose more details as we release the first experimental implementations.

    Determinism will be CPU only. We might experiment with GPU determinism assuming on some hardware capabilities, but it is so far in the future that you shouldn't count on it.

    In the beginning, we will expose some attributes you could use to flag specific jobs to be compiled as deterministic. In the future, the idea is to allow to categorize code (say as "Simulation Code") and then allow game-wise configuration to turn on/off determinism for a set of code categorized in a given way.