Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Feedback Which ECS framework should I be using?

Discussion in 'Entity Component System' started by BitPax, Dec 7, 2020.

  1. BitPax

    BitPax

    Joined:
    Oct 4, 2019
    Posts:
    89
  2. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,541
    @BitPax None of them are associated with DOTS.
    I am only aware, that Entitias is quite good one.

    However, if you want to use DOTS ECS, you are most likely want build what required on top of it. Not the one you linked.
    Mind, on DOTS forum there is at least one framework, worked by community members, which is associated with DOTS. But neither can be called "For production ready" as the state of DOTS is the same.
     
    PublicEnumE likes this.
  3. PublicEnumE

    PublicEnumE

    Joined:
    Feb 3, 2019
    Posts:
    729
    To echo what Antypodish said, none of the products you listed are what people are mean when they talk about using “ECS”.

    People in this forum are using Unity’s built in ECS package. It’s still in active development, but it’s built to make use of Unity’s Jobs and Burst packages. So it will almost always be much faster than those 3rd party approaches.
     
    Antypodish likes this.
  4. BitPax

    BitPax

    Joined:
    Oct 4, 2019
    Posts:
    89
    I would like use DOTS ECS but it seems very unstable. Aren't the Unity devs constantly changing it up still?

    I was thinking I could use one of the 3rd party ECS frameworks and was hoping maybe those 3rd party devs would figure out a way to implement Jobs and Burst compiler in their own frameworks. This is also assuming Unity makes it accessible.

    I suppose it's a gamble at this point in time and eveyone is preparing for when the time comes. But who knows, maybe it's going to be like UNet and 3rd party devs will lead the way.

    Those 3rd party ECS implementations seem more complete and have already resolved a lot of the issues the the Unity devs would also have to deal with. The Burst compiler was impressive though.
     
  5. Lieene-Guo

    Lieene-Guo

    Joined:
    Aug 20, 2013
    Posts:
    547
    As from my experience. You never know if DOTS is your thing if you only ask questions here without dive deep into using it. I believe it would be the same case even when DOTS is officially released.
    So If you really want to try ECS in Unity. Try Unity DOTS. And ask questions when you have a specific one.

    And for ECS, Job and Burst. Their base building foundations are from UnityEngine and out of preview. These packages will change over time, but UnityEngine API changed over time also. And Api upgrade will help you fix most of the problems.
    In other words, you can be 99% assured that DOTS will work as you expect. And for the 1% chance of failure. You have packages source code! You can always look into source code and find the problem then make a walkaround.

    That is how I feel about it.

    And for third-party ECS:
    They are not built with UnityEngine's built-in HPCS supports(malloc/Typing/TypeManaging/Job/Burst) from the start. And mostly they don't have solid test cases(DOTS packages contain hundreds of test cases to validate their codebase).
    So if you think DOTS is not stable then none of these third-party codebases are, for sure.
     
  6. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,541
    Yes, it is still development. But that doesn't stop you from locking the version of Unity and packages, that you are happy to work with. But it seems it is not an issue, since most of references you have provided, are not maintained over past few years anyway.

    In fact, only 2 of these repos are somehow still getting recent updates.
    So I don't expect much of jobs and burst integration to be hones. Or maybe they can just work fine with. Don't know. You would need find official channels. Seems some have active discord, or forum thread.

    It really depends however, what is your actual goal, in terms of using ECS. Is it for performance reason, DOD convenience, or is the ECS buzzword, what you are after?

    People seems getting fine using current state of DOTS in various projects.
    Share Our DOTS Showcases

    Despite the state of DOTS and however these ECS framework are good, I wouldn't be recommending any of these today.
    Just for simple fact that DOTS went very long way (years of R&D) and don't feel like it is stopping anytime soon.
    Additionally, you got range of debugging and profiling tools integrated, to help deving.
    On other hand, I don't know, if these last two repos, which are getting still updated, will be kept updated, or for how long. Plus you want to consider hardware support, specially if you target mobile market (just my guess).
     
    BitPax likes this.
  7. BitPax

    BitPax

    Joined:
    Oct 4, 2019
    Posts:
    89
    Should I read the documentation for Unity ECS? What do you guys recommend for ramping up on Unity DOTS?

    What tutorials do you recommend?
     
  8. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,541
    Unity-Technologies/EntityComponentSystemSamples
    This is good starting point. Mind there are actually two projects, ECS samples and Physics samples.
    You got various samples and use cases that you may want to give a play with.

    As of today, you will need Entities 0.16 and compatible packages.
    But that will be handled automatically, when opening project for the first time.

    I would first look into samples and get some ideas, how thing works, and learn using Entity Debugger tools.

    Then you can also get some docs, and read about general concepts.
    But it is no point to deep dive, without practicing. So make sure you balance things.
    For most cases, you may be able to figure out things without docs. Specially these are rather lacking still. But in contrast, out forum community is very helpful. There are many useful topics here. So feel free and look around.
     
    Last edited: Dec 8, 2020
    BitPax likes this.
  9. BitPax

    BitPax

    Joined:
    Oct 4, 2019
    Posts:
    89
    Really appreciate it. Thank you
     
    PublicEnumE likes this.
  10. sschmid

    sschmid

    Joined:
    Jul 1, 2014
    Posts:
    5
    Hi, this might be an interesting info for this topic:
    Entitas is now free, so you can use it and test it if fits your requirements well.

    Entitas is free now!

    See full announcement on the Entitas GitHub repo
    https://github.com/sschmid/Entitas-CSharp/issues/973

    Happy coding :)
     
    benzsuankularb likes this.
  11. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,541
    It has been free for ages isn't it?

    You could at least write down, why you think your product is better than others.
    Otherwise, is just shameless marketing.
     
  12. brunocoimbra

    brunocoimbra

    Joined:
    Sep 2, 2015
    Posts:
    676
    Actually, Entitias was only partially free, there was some features (some related to the code generator if I am not mistaken) that were only present on the paid Asset Store version.

    But I never used it, and I would like to know too which are the benefits of it over Unity's ECS.

    If it is already compatible with everything from GO world without code changes, this is already a big plus for me.
     
  13. alexandre-fiset

    alexandre-fiset

    Joined:
    Mar 19, 2012
    Posts:
    699
    We're using it in a 8 developers production. As crazy as it sounds, it has been working quite well so far with only minor issues. Our codebase is quite large now and we're still upgrading at every update. It really is not that bad, about an hour of work each time to update in exchange of many performance and workflow benefits.
     
    danilofcestari and davenirline like this.
  14. Laicasaane

    Laicasaane

    Joined:
    Apr 15, 2015
    Posts:
    276
    Or you would like to take a look at Svelto.ECS. Svelto can be used with Unity Burst and Jobs.
    https://github.com/sebas77/Svelto.ECS

    There are various examples to show its usage:
    https://github.com/sebas77/Svelto.MiniExamples

    However, Svelto is quite strict. There are many enforcements to ensure that things must be done the way Svelto has chosen. Such as components must be structs, and they cannot hold reference type of any kind. Or you cannot dynamically add or remove component from any entity at runtime. (It means the form/design of an entity is static/immutable.)

    For more information you should read the blog:
    https://www.sebaslab.com/whats-new-in-svelto-ecs-3-0/
     
    Last edited: Feb 22, 2021
  15. Mortuus17

    Mortuus17

    Joined:
    Jan 6, 2020
    Posts:
    104
    It's a 10.000 line project with garbage collected memory all over the place.
    I highly doubt it comes even close to now 4+ years of work done by multiple teams of Unity engineers.
     
  16. Extrys

    Extrys

    Joined:
    Oct 25, 2017
    Posts:
    329
    I recommend you take a look at Svelto ECS