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

Bevy VS Unity DOTs

Discussion in 'Entity Component System' started by kvfreedom, Aug 13, 2021.

  1. Sarkahn

    Sarkahn

    Joined:
    Jan 9, 2013
    Posts:
    440
    I guess I don't have enough experience to argue too hard, but it seems to me the crate system is brilliantly designed. It couldn't be simpler to import and use someone else's crate, or even to create your own crates for other people to use. At that point dependency hell and other issues would (usually) be the developer's fault for not auditing what they're importing into their library right? I know there have been some huge issues that have cropped up in npm like the left-pad thing, but I think a simple and straightforward package manager that works well is inarguably a good thing for any developer.

    Have you ever tried to make a unity package for unity's package manager? It's actually comical how annoying they make it and how little up-to-date documentation there is. At least for me who's never used a package manager until recently, it's like night and day between upm and crates. Maybe it's not a fair comparison, I dunno
     
    goncalo-vasconcelos likes this.
  2. april_4_short

    april_4_short

    Joined:
    Jul 19, 2021
    Posts:
    489
    As an end user, getting packages from GitHub is ANNOYING!!!!

    Everything else about the Package Manager is also extremely annoying. Almost as much as The Hub.

    That Packages "pages" in the Package Manager don't have Release Notes inline (must click a link and view in a browser) is bizarre.

    There's no notifications of updates to packages in the project, unless you open the Package Manager, and then the down arrow indicating that there's an update is not the means to open the fold to see what updates are there, that's on the other side of the label.

    And it's single threaded and hogs and flogs whilst doing anything. And it defaults to showing all packages not in the project each time it's opened as if it's trying to sell those packages, requiring a wait while it gets sorted out so that I can hit the filter button to see only installed packages.

    And on and on and on it goes.

    Crates can't be worse.
     
  3. OUTTAHERE

    OUTTAHERE

    Joined:
    Sep 23, 2013
    Posts:
    656
    Problem with Unity's package manager is its awfully slow UI and the many glitches. Packages in general are an excellent idea, and they should actually make it easier to override parts of a package (basically any file or asset that is replicated with the same GUID in your project takes precedence over its packaged version).

    And then instantly and permanently force all Asset Store downloads to be packages.
     
    NotaNaN, Ryiah, april_4_short and 3 others like this.
  4. SamOld

    SamOld

    Joined:
    Aug 17, 2018
    Posts:
    326
    I think that a well designed engine built in the DOTS style from the ground up is probably the future. That's the environment that I want to work in personally. I'm interested to see whether Bevy becomes that.

    I'm a little concerned about Rust. One thing that I think is very important for a high performance engine of the future is effectively instant recompilation. Maybe this is my ADD talking, but I need to be able to work in that rapid tweak check tweak check tweak check pattern when working on gameplay code. Rust is not a language known for fast compilation speeds. Bevy boasts that
    With Bevy you can expect 0.8-3.0 seconds with the "fast compiles" configuration
    which is on the low end of acceptable for me, and frankly I wouldn't bet on that not slowing down over time and with larger projects.

    Looking at something like Jonathan Blow's Jai language as an example, where he's casually doing a full compilation of a 100k line project in under a second, languages like Rust and C++ seem pretty poor in this respect. The ideal DOTS engine of the future would probably be built on a language and compiler designed with these performance characteristics in mind.

    I'm excited to see where Bevy goes, even if it doesn't meet every ideal criteria.
     
  5. xshadowmintx

    xshadowmintx

    Joined:
    Nov 4, 2016
    Posts:
    47
    You're concerned on the basis rust might be too slow to compile?

    I mean, to be fair, rust is often criticised for its compile times, but... have you tried Bevy?

    I mean, spend 10 minutes going through the tutorial if you haven't. Rust has a pretty sophisticated crates system, which means when you partition your code into local crates, you can skip compile of crates with no changes; basically the same as the (half baked) solution unity has implemented with asmdef.

    So yes, the initial compile of all the dependencies is slow... but, the change-compile-run loop is... well, I've been surprised at how effective it is.

    There's good things and bad things about rust, and I get it... but the whole DOTS ecosystem is basically trying to implement a poor-mans version of the rust single-ownership high performance model, with zero language support for it, a hand rolled compiler toolchain.

    Has your experience with DOTS so far been 'instant recompilation'?

    That has not been my experience with it.

    Bevy is a breath of fresh air to me; it is everything I wanted DOTS to be; and sure, it's not mature, but I'm certainly excited about it.
     
  6. SamOld

    SamOld

    Joined:
    Aug 17, 2018
    Posts:
    326
    Not for anything larger than Hello World, so I don't have any idea how it performs at scale, other than the 0.8 - 3s claim on the website, which isn't great.

    Oh no, not in the slightest! Unity is very poor in this regard. I'm not comparing to Unity, I'm comparing to the ideal - the abstract concept of a Bevy style engine implemented as best as it possibly could be to serve the next couple of decades.

    Bevy is definitely on the right track, I just don't know if it's The One. Rust feels like a very opinionated choice, and I'm just not sure how that choice will age.
     
  7. mischa2k

    mischa2k

    Joined:
    Sep 4, 2015
    Posts:
    4,329
    You posted this in august. Do you mind sharing your experience with Bevy compared to DOTS since then?

    Starting to have a similar feeling about the Unity/Mono/Burst/HPC#/DOTS situation.
    It feels like super advanced tech built on non ideal fundamentals.
    Unlike Rust, which is native + fast + stable + easy to use to begin with.
     
    Last edited: Dec 18, 2021
  8. nijnstein

    nijnstein

    Joined:
    Feb 6, 2021
    Posts:
    78
    So true, i guess most people here never had a boss asking them why they spent so much time on their software just becuase you want the code to look elegant... only to be replaced the next version with some hack job component because its cheaper
     
  9. ElliotB

    ElliotB

    Joined:
    Aug 11, 2013
    Posts:
    216
    You might find these interesting for comparison of the two:
    https://github.com/ElliotB256/bevy_combat
    https://github.com/ElliotB256/ECSCombat

    Note that I didn't get as far as I'd like in the bevy one yet because of time constraints, but it has target selection ai, pursuit movement, attacks, damage and some effects in so far. There's a bug on my most recent commit which occasionally crashes, which is because I hadnt been so careful with deleting entities in the bevy one, didn't have time to fix yet.

    Basically, I found the bevy ecs syntax dramatically nicer and substantially more compact with less boiler plate.
     
    Schiznitz3301, Timboc, bb8_1 and 2 others like this.