Search Unity

Entitas to Unity ECS

Discussion in 'Data Oriented Technology Stack' started by poettlr, Jan 7, 2019.

  1. poettlr

    poettlr

    Joined:
    Mar 4, 2015
    Posts:
    17
    c0ffeeartc likes this.
  2. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    6,935
    I know there are some people here already, with entitas previous experience. However, since I don't known entitias itself not sure how much difference is there. But don't expect any automatic porting tools at this point. At least not yet.

    However, shouldn't be that hard, if you already familiar with DOD.
     
  3. poettlr

    poettlr

    Joined:
    Mar 4, 2015
    Posts:
    17
    I don't expect any tools. Just basic knowledge. I have "nearly" zero experience with UECS, so I was wondering if somebody has an example port of a simple project.

    Like if you use an Entitas System X with Components Y and Z it looks like this in UECS or how to port Entitas Reactive Systems.

    Concept wise I suppose everything is very similar, in the end, it all is Components, Entities, and Systems.
     
  4. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    6,935
    I think for particular porting examples, you need wait for replay, from these people using both systems.

    Otherwise, You would need investigate your own way.
    Just be patient. Somebody surely will come by, to assist.
     
  5. gromilQaaaa

    gromilQaaaa

    Joined:
    Oct 28, 2013
    Posts:
    14
    I am also wondering how to make ReactiveSystems in Unity ECS. I was expecting that it would be some class like ComponentSystem... From what I see - there is totally no such thing, because all of the systems examples are working OnUpdate. IDK how to make normal game without system that would launch directly on some component change.

    Here is a good topic https://forum.unity.com/threads/statecomponent-reactive-system.534122/

    All I can say from now - it all looks like unity team has a task to make some "high performant" API for ECS and they are not going to sacrifice any minor amount of performance to make API normal for unskilled people. That will attract big companies, but won't be easy to understand for some "middle" developers. Also all that will lead to a messy, hard writable/readable (but again - PERFORMANT) code. So from what I see now - individual developers will just stay on classic unity/Entitas or Entitas team will make some adeqate wrapper for all that trash that unity team does now.

    IMO all that archetypes, sharedcomponents, statecomponents - all of that makes production last twice longer, it is not a solution for small teams.
     
  6. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    6,935
    Wrong. While for ECS current priority is performance, stability and consistency, debugging and standard editor UI is also planned, on top what we have already.
    Look for example Tiny Project.

    I am just hobbyist self thought and I am using ECS right now. Is NOT beyond reach whatsoever. For more, I contacted myself for the first time with C#, just few years back, with no any particular skill in C or C++.

    Actually is opposite round. ECS makes nice and easy to read, understand and scale any size of project. Plus great re-usability of systems.

    If you have nothing constructive to add, just please stay out of the topic. Go for a walk, or something.
     
    pahe, davenirline and elcionap like this.
  7. davenirline

    davenirline

    Joined:
    Jul 7, 2010
    Posts:
    519
    I'll have to defend Unity here. Their ECS is so beautiful. You're just bitter you don't know how to use it. It's hard, yes, but it only takes some practice. Any good programmer will try to adapt to it, not bash it.
     
    mikerz1985 likes this.
  8. poettlr

    poettlr

    Joined:
    Mar 4, 2015
    Posts:
    17
    I would love if we all could go back to the topic at hand :)
    I will try to come up with a simple conversion myself in the next couple of days. If anyone else has something to say on topic feel free to add your knowledge
     
    Antypodish and c0ffeeartc like this.
  9. IsaiahKelly

    IsaiahKelly

    Joined:
    Nov 11, 2012
    Posts:
    335
    Comparing Introduction to Entitas with Unity ECS concepts should help get you started. I'm by no means an expert on either but here is a very brief comparison of the overall concepts:

    Entitas vs Unity ECS
    • Context = World.
    • Class IComponent = Struct IComponentData (Jobs & Burst) or MonoBehaviour (data only).
    • Group = ComponentGroup.
    • Collector = nothing, use reactive systems instead.
    • IExecuteSystem = Job/ComponentSystem with Execute/OnUpdate.
    • IInitializeSystem = Job/ComponentSystem manually executed at start.
    • ICleanupSystem = Job/ComponentSystem using [UpdateAfter()].
    • ReactiveSystem = Job/ComponentSystem using [ChangedFilter] and/or ISystemStateComponentData.
    Please note that some of this might not be accurate as this list was made mostly from memory. Entitas has also probably changed a lot since I last used it. The rest of the features are probably too different to make a simple comparison anyway. Systems in particular are hard to compare because Unity uses a totally different approach, especially for reactive ones.

    I've actually wanted to make a Unity example project that uses both classic, Unity ECS, Entitas and Svelto.ECS for comparison. So people can see each one's advantages and disadvantages, but I'm only one man! So there is only so much I can do in a day. :D
     
    Last edited: Jan 9, 2019
    NOP_W, leni8ec, rigidbuddy and 5 others like this.
  10. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    6,935
    I may be wrong, but does not meant to be JobComponentSystem rather ComponentSystem?
     
  11. IsaiahKelly

    IsaiahKelly

    Joined:
    Nov 11, 2012
    Posts:
    335
    @Antypodish Could be either, was just keeping the comparison simple but I'll add that too. Thanks.
     
    poettlr and Antypodish like this.
  12. poettlr

    poettlr

    Joined:
    Mar 4, 2015
    Posts:
    17
    Wow! That gives great insught.
    I try to get a simple example working thanks!
     
unityunity