Search Unity

  1. Unity 2019.1 beta is now available.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. We're looking for insight from anyone who has experience with game testing to help us better Unity. Take our survey here. If chosen to participate you'll be entered into a sweepstake to win an Amazon gift card.
    Dismiss Notice
  4. On February 28th the Feedback website will shut down and be redirected to the Unity forums. See the full post for more information.
    Dismiss Notice
  5. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  6. Unity 2018.3 is now released.
    Dismiss Notice
  7. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

Chunk iteration time splicing and determinism

Discussion in 'Entity Component System and C# Job system' started by yc960, Feb 8, 2019.

  1. yc960

    yc960

    Joined:
    Apr 30, 2015
    Posts:
    225
    Let's say I have some pathfinding workload that I want done over multiple frames. So I have 12 chunks of entities and I iterate one chunk per frame so everything gets done in 12 frames. My question is that, would the result be deterministic across different platforms/specs? What is the recommend pattern for time splicing workload while preserving determinism in ECS/C# jobs?
     
  2. Brendon_Smuts

    Brendon_Smuts

    Joined:
    Jun 12, 2017
    Posts:
    7
    At the moment we are guaranteed determinism only when executing on the same platform.

    In theory you would have cross platform determinism in the execution order of your ECS systems and scheduled jobs so long as you are not using any floating point math to make decisions on whether you want to execute a system/schedule a job.

    In the future the intention is that the Burst compiler will be able to enable floating point determinism across platforms through class/method compilation using attributes.
     
  3. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    4,279
    Deterministic simulation will generally have to assume that the order of chunks is the same across machines.

    So in terms of timeslicing processing, you just have to have some index for which chunks to process every frame that index has to be chosen deterministically. Should be very straightforward.