Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Is DataFlowGraph appropriate for when game logic is centered around message passing between systems?

Discussion in 'Entity Component System' started by Abbrew, Sep 29, 2020.

  1. Abbrew

    Abbrew

    Joined:
    Jan 1, 2018
    Posts:
    417
    My game logic does perform calculations across dozens of entities in bulk, which is what ECS is suited for. However, the majority of the logic is just firing off events from a Behavior Tree in Monobehaviour land, events that propagate through systems. Too many of my systems create jobs that don't execute every frame, but rather react to events and perhaps generate even more events. Would it be worth using the experimental DataFlowGraph and rewriting my codebase in it?

    @DreamingImLatios
     
  2. DreamingImLatios

    DreamingImLatios

    Joined:
    Jun 3, 2017
    Posts:
    4,223
    It is hard to say. The simulation phase (event phase) isn't Bursted yet. So you would have to encode things using booleans in the rendering phase. I'm still trying to figure out if DFG is a good fit for sparse event chains myself.