Search Unity

Should I use DOTS?

Discussion in 'Entity Component System' started by rosenjcb, Nov 16, 2020.

  1. rosenjcb

    rosenjcb

    Joined:
    Nov 15, 2020
    Posts:
    2
    So I'm sure you've seen dozens of these threads before, but I don't know where to start so please forgive me!

    I'm a software engineer by trade but I don't write too many games. After hearing a talk by Mike Acton, I felt inspired to go the ECS route and just try making a game. So I picked up a port of Raylib for Rust, an ECS framework (Specs) and started pounding away. At first, there was a lot of friction in getting something working but once I had a fully implemented ECS system and saw how easy it was to arbitrarily create new entities just by referencing the components that make it up and having all the logic working as intended in my systems with no extra effort. Really, I couldn't care too much about the performance and it was just a nice have. The meat and bones of ECS to me is the architecture itself - it just works.

    Now that's all good and fun but Raylib as a game library lacks a lot of necessary tooling that is needed to make anything professional in a reasonable amount of time. I remembered Unity and so I picked it up. As I went through some of the tutorials, I noticed something: DOTS is preview and the experience you get with DOTS is kind of gimped when compared to MonoBehavior. For example, you can't even look at DOTS components in the object hierarchy of the editor. You can only look at them through the entity window. I've seen some people attach the components themselves to game objects (is this a Hybrid system???) but I'm sure that's not the only oddity there is with using DOTS vs MonoBehavior.

    I type all of this to ask, should I use DOTS? Will I actually be able to do anything in a timely manner with the DOTS tooling as of now or should I just use the typical MonoBehavior architecture? I'm probably not going to be overwhelmed from a programmer's perspective. I've played around with ECS enough to get a decent understanding of how the architecture works. But I'm sure Unity itself has a learning curve that shouldn't be underestimated.
     
    Last edited: Nov 16, 2020
  2. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,780
    You should ask yourself, what is your goal?
    Optimization and performance, or easy of using Editor?
    You want tons of moving, calculating things, or just small quick game?
    What you already know and how much time you willing to spend on? That including time for learning.
    And probably you should ask yourself more question like such, to get some concept what you want and need.

    Either way, you should give play with DOTS samples, to get some taste of it.
     
    MNNoxMortem likes this.
  3. rosenjcb

    rosenjcb

    Joined:
    Nov 15, 2020
    Posts:
    2
    As long as DOTS doesn't become *too* much of a PITA to use in the Unity Editor, I don't care. I'm not too concerned with the performance question - I just like writing code in a way that it prioritizes data instead of code abstractions. I'd prefer to avoid the OOP & SOLID approach altogether.

    I think I'll give it a go. It doesn't look too hard to integrate into the editor.
     
  4. DreamingImLatios

    DreamingImLatios

    Joined:
    Jun 3, 2017
    Posts:
    4,271
    DOTS isn't feature-complete. It is missing ready-to-use high-level implementations for sound and animations. So if that is your biggest concern, then it is probably too soon.

    However, if you are just looking for an upgrade to what you were doing before, you'll definitely get that. DOTS has one of the best ECS architectures I have come across. In addition, you get the editor authoring experience (with near-complete control over the runtime data representation), the build system, an instanced renderer, the input system, asset management, transforms, and even Havok physics if that's something that interests you.

    As for how quick it is to work with, I've completed several weekend game jams using DOTS. All but one of the projects here is DOTS, a few of which were when I was just getting started learning: https://dreaming381.itch.io/
     
    MNNoxMortem likes this.
  5. ScriptsEngineer

    ScriptsEngineer

    Joined:
    Jun 8, 2018
    Posts:
    37
    DOTS makes your game have a new high-performance technology and improved code management at the cost of not having as much productivity with the editor.
     
  6. xshadowmintx

    xshadowmintx

    Joined:
    Nov 4, 2016
    Posts:
    47
    If that's what you're looking for, I recommend not using DOTS.

    If you want to just mess around and create some cool stuff, it's definitely worth playing with; but... I don't really think it's fair to recommend it to someone looking to build a professional quality product at the moment.

    There's a good series of tutorial videos on udemy (just search for "unity DOTS" or "unity entity component system") that are worth $10 to get an idea of whats currently possible and how quickly things have changed in the relatively short amount of time they've been around.

    I'd honestly recommend picking one of the courses up to get a realistic idea of the state of the ecosystem, then have a brief play decide for yourself if its worth your time and effort.
     
  7. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,780
    I am surprised that anything is there on Udemy.
    I would personally keep away from it, as it will momentarily get out of date.
    We got vids and many technical talks on youtube. Anyone can view it at will.

    Thing is, anyone who digs into DOTS, should be capable deduct things from sample provided on gits, and however sparse is documentation, but sufficient. Plus we got great DOTS community.
    DOTS is not for beginners. At least not in current state.
     
    BinaryByron and ScriptsEngineer like this.
  8. xshadowmintx

    xshadowmintx

    Joined:
    Nov 4, 2016
    Posts:
    47
    Exactly.

    It's a clear data point for how difficult it is to keep up to date with things.

    If the 4 month old 10 hour tutorial videos are so out of date that they're worthless, that tells you a lot about the state of the ecosystem.

    Youtube tutorials and blogs are even worse; at least the professionally produced content is making some effort at staying up to date with the changes (otherwise they get rubbish ratings). Youtube videos are just fire-and-forget content that's basically immediately obsolete.
     
  9. jiraphatK

    jiraphatK

    Joined:
    Sep 29, 2018
    Posts:
    300
  10. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,780
    I wouldn't call worthless. They still can contain valuable content. These can hold some ideas, how to approach given problem. But I wouldn't specifically held to them as a solutions.

    But unless devs are using exact same Unity version and packages as per tutorials, it can be very confusing and frustrating for many. We had that with older FPS and Megacity for example.

    In my understanding Udemy is targeted to new Unity devs. If I am correct, that is not current audience target for DOTS.

    Either way, we have few cool projects going on on DOTS forum, showing capabilities of it.
    As an example.

    Unity DOTS case study in production

    And samples.

    https://github.com/Unity-Technologies/EntityComponentSystemSamples
    Please mind, don't expect them up to date with latest Entity packages. They are purposely lagging a bit behind with latest features.
     
    Last edited: Nov 17, 2020
  11. thelebaron

    thelebaron

    Joined:
    Jun 2, 2013
    Posts:
    857
    I feel like if you were managing in a barebones framework, the weak dots ecosystem probably wont bother you as much as it might bother a normal unity user. also that link to the samples should be fixed to point to the master branch
     
  12. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,780
    Fixed thx.
     
    thelebaron likes this.