Skip to content

Resolve ambiguous system order bugs in default systems #1466

Closed
@alice-i-cecile

Description

@alice-i-cecile

Implicit dependencies were replaced with explicit ones in #1144. While this is a great choice, it's resulted in numerous flaky behaviors in the engine due to ambiguous system ordering.

So, I think we can probably get away with 6 (PreUpdate, Update and PostUpdate + the startup stage equivalent) core stages total for 0.5 honestly.

You only need more stages when you need to process chains of systems that rely on command processing to work, and I would be surprised if we have very long chains of that anywhere yet.

So, as an overall strategy:
0. Label all of the systems.

  1. Place the systems that generate commands.
  2. Place the systems that consume entities / components that would be generated by these commands in the stage after they're made.
  3. Toss all of the other systems in Update, since this allows users to run systems in stages before / after them without needing to make new stages.
  4. Resolve all of the ambiguities, either with a dependency or a permitted ambiguity (this functionality would have to be built out on at least a pairwise basis).
  5. Ensure that change-detecting systems come after things that can generate changes for them if we haven't solved System-order-independent ECS change tracking #68.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-BugAn unexpected or incorrect behaviorP-HighThis is particularly urgent, and deserves immediate attention

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions