Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bevy VS Unity DOTs

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

  1. kvfreedom

    kvfreedom

    Joined:
    Mar 30, 2015
    Posts:
    37
    The advantage of Bevy is that it is a brand-new engine built entirely for ECS, and it can be iterated quickly without historical baggage. If Bevy can learn Unity’s experience and achievements, understand Unity’s current or past pain points from Unity roadmap, forums and other places, and don’t take the detours that Unity has taken, Bevy may be Unity’s biggest competitor in the future.
    I have been using Unity since Unity 4 and I have always believed that Unity is the best commercial game engine. I hope Unity can firmly follow the DOTs route, learn the development results of other excellent ECS engines, and increase investment in DOTs development as much as possible. I can't wait to fully use ECS.

    https://bevyengine.org/news/bevys-first-birthday/
    In the link above, Bevy claims that some aspects have greatly surpassed Unity DOTs. Is this true?
     
  2. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,754
    They show one feature comparison, which is probably least relevant for most DOTS uses.
    You want comparison and draw conclusions, build two similar project render 100k fish with boids, collision avoidance etc., or something shooting en mass, then we can compare what is really better.

    Don't forget, Unity DOTS is much more than just ECS and jobs. Show wort comparison, to be able compete.
     
  3. pixldev

    pixldev

    Joined:
    Nov 6, 2019
    Posts:
    15
    I've used both Bevy and Unity DOTS. Bevy seems much easier to use. It would be nice to see a performance comparison between these.
     
    deus0 likes this.
  4. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,136
    Way too early for bevy. I've seen most of the blog posts and what not.
    It will be interesting to see it's state in in two years or so from now.

    Speed isn't everything, ease of use also matters. I'm not really interested in DOTS, I like the current system.
    I'm not sure how good rust would be for game logic. Feels like it's not gonna be fun lol.

    Honestly though, if they want to get anywhere close in the 3D department (graphical features and else), ecosystem including asset store and tools (animations, editor, builds, terrain) it's gonna be a while, to catch up to unity especially HDRP and unreal engine.

    And while that's happening, both engines are adding more features. In unity's department, HDRP is probably the one with the fastest and most active development. Compare to URP for example. Maybe a budget thing.

    Although it is interesting for sure, and it's currently what's hot in th rust gamedev world.
    Problems with projects like this is, if the hype dies down, it'll go into obscurity. Like some other open source projects.
     
    Last edited: Aug 13, 2021
  5. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,554
    This looks like somebody's pet project. Meaning the creator is very enthusiastic about it and feels strongly about, but betting your money on it is probably not a good idea.

    THe project is only one year old, and most importantly it lacks "showcase" or "games made with this engine" section. Meaning, there's no track record.
     
  6. JesOb

    JesOb

    Joined:
    Sep 3, 2012
    Posts:
    1,106
    Bevy ECS code looks very nice,
    Using method directly as query is very nice and clean, wish unity to take all good decisions from bevy ECS to Unity ECS

    So instead of this:

    Code (CSharp):
    1. public class RotationSpeedSystem_ForEach : SystemBase
    2. {
    3.     // OnUpdate runs on the main thread.
    4.     protected override void OnUpdate()
    5.     {
    6.         float deltaTime = Time.DeltaTime;
    7.  
    8.         // Schedule job to rotate around up vector
    9.         Entities
    10.             .WithName("RotationSpeedSystem")
    11.             .ForEach((ref Rotation rotation, in RotationSpeed rotationSpeed) =>
    12.             {
    13.                 rotation.Value = math.mul(
    14.                     math.normalize(rotation.Value),
    15.                     quaternion.AxisAngle(math.up(), rotationSpeed.RadiansPerSecond * deltaTime));
    16.             })
    17.             .ScheduleParallel();
    18.     }
    19. }
    we can write this:


    Code (CSharp):
    1. public partial struct RotationSpeedSystem : ISystemBase
    2. {
    3.     //generating actual UpdateMethod with job struct that use this method as core logic and provide deltaTime is responsibility of C# Source Generators
    4.  
    5.     [UpdateBefore(...), After(...), WithoutComponent(...)]
    6.     [BurstCompile, Query] static void RotationSpeedSystem( [DeltaTime]float deltaTime, ref Rotation rotation, in RotationSpeed rotationSpeed )
    7.     {
    8.         rotation.Value = math.mul(
    9.                 math.normalize(rotation.Value),
    10.                 quaternion.AxisAngle(math.up(), rotationSpeed.RadiansPerSecond * deltaTime));
    11.     }
    12. }
    After this unity ecs will be as simple to write as MonoBehaviours :)
    They already do something with source generator and I wish that their api to be as simple as this or even better, because most of the systems really very simple
     
    Last edited: Aug 13, 2021
    Rewaken, Ruchir and Lukas_Kastern like this.
  7. JesOb

    JesOb

    Joined:
    Sep 3, 2012
    Posts:
    1,106
    Looks like I have already love SourceGenerators


    Code (CSharp):
    1. [ImplicitCastValue]
    2. public partial struct Rotation : IComponentData
    3. {
    4.     private Single _value;
    5. }
    6.  
    7. //     \/  \/  \/  \/
    8.  
    9. public partial struct Rotation : IComponentData
    10. {
    11.     private Single _value;
    12.    
    13.     public static implicit operator Single(Rotation v) => v._value;
    14.     public static implicit operator Rotation(Single v) => new Rotation{ _value = v};
    15. }
    Amazing thing is that we can implement this on top of current entities even if unity dont want to :)
     
  8. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,753
    You are aware Entities is being rewritten with SourceGenerators right?
     
    andreiagmu likes this.
  9. JesOb

    JesOb

    Joined:
    Sep 3, 2012
    Posts:
    1,106
    Yeah
    There was many messages from Unity Devs about using SourceGenerators for ECS.

    As I understand ECS rewrite with source generators was one of major reasons why Unity add C#9 compiler into Unity 2021.2 while not C#9 itself.

    https://forum.unity.com/threads/feedback-request-ijobentity.888121/#post-6315795
     
    andreiagmu likes this.
  10. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,754
    How this is any cleaner/simpler than other?
    Also, both examples are not equal.
     
  11. DreamingImLatios

    DreamingImLatios

    Joined:
    Jun 3, 2017
    Posts:
    4,223
    It "was" a pet project, but there is a real and active community around it now. Honestly I'm kinda jealous. :p We'll see where it goes.

    I can give a little bit of insight on this since I got asked this by a couple of different people and did a little digging.
    So first off, for the particular callout to DOTS, yes and no. This is ultimately a tradeoff. DOTS uses change version numbers per chunk. Bevy uses change version numbers per element. The latter consumes more read and write bandwidth even when you don't need change detection. But it is really convenient when you do.

    There are other aspects where Bevy may be ahead, and where Bevy is behind. It is important to recognize that DOTS came first and innovated a lot in this space. Bevy was able to look at what DOTS as well as other ECS solutions and take all the best parts. There's even a term or two in there that looks familiar on a personal level.

    Anyways, it is nice to see another player prioritizing both performance and good API design. Competition is good and will hopefully also push DOTS to be better.
     
    Occuros, NotaNaN, GilCat and 2 others like this.
  12. JesOb

    JesOb

    Joined:
    Sep 3, 2012
    Posts:
    1,106
    Code without comments and other things:

    this:
    Code (CSharp):
    1. public class MovementsSystem : SystemBase
    2. {
    3.     protected override void OnUpdate( )
    4.     {
    5.         float deltaTime = Time.DeltaTime;
    6.  
    7.         Entities
    8.             .WithName("RotateWithSpeedJob")
    9.             .ForEach((ref Rotation rotation, in RotationSpeed rotationSpeed) =>
    10.             {
    11.                 rotation.Value = math.mul(
    12.                     math.normalize(rotation.Value),
    13.                     quaternion.AxisAngle(math.up(), rotationSpeed.RadiansPerSecond * deltaTime));
    14.             })
    15.             .ScheduleParallel();
    16.     }
    17. }
    vs this:
    Code (CSharp):
    1. public partial class MovementsSystem: SystemBase
    2. {
    3.     [Job] static void RotateWithSpeedJob([DeltaTime]float deltaTime, ref Rotation rotation, in RotationSpeed rotationSpeed )
    4.     {
    5.         rotation.Value = math.mul(
    6.             math.normalize(rotation.Value),
    7.             quaternion.AxisAngle(math.up(), rotationSpeed.RadiansPerSecond * deltaTime));
    8.     }
    9. }
    Second version have simple update methods that receive data that it needs, I see it as Zero boilerplate code for job that it do.

    Can you clarify why they not equal?
     
    Last edited: Aug 14, 2021
    apkdev and andreiagmu like this.
  13. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Unity very well knows that unless they can make DOTS as sweet and simple as the smallest mono components, they've quite a battle on their hands to get adoption. I'm liking the second simpler, comforting coding style. I love performance I don't have to think too hard about.
     
    andreiagmu, NotaNaN, Ryiah and 6 others like this.
  14. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,754
    Yeah little shorter, but not really deal breaker. Isn't it?
    For sure is much better than writing IJobs ;)
    The question is, how would you apply ScheduleParallel, Schedule and Run equivalent?
    I assume will be addition to decoration kewyord?
    Like for example:
    Code (CSharp):
    1. [Job] [Schedule] static void RotateWithSpeedJob([DeltaTime]float deltaTime, ref Rotation rotation, in RotationSpeed rotationSpeed)
    The last question, how manual dependencies can be are delt?
    Something like that?
    Code (CSharp):
    1. JobHandle dependency = [Job] static void RotateWithSpeedJob(..., dependency)
    That would cover major variations of things.
    How ECB equivalent is handled?
    Or how we can create entities?
    You know, these all quirks with ECBs and EntityManager, when handling entities ...
     
  15. IgreygooI

    IgreygooI

    Joined:
    Mar 13, 2021
    Posts:
    48
    Glad to see a lot of people discussing bevy. Many features that you are discussing are because bevy are writing in Rust with powerful macro for codegen and a lot of language features that HPC# does not provide, and bevy does not have to deal with multiple compiling backend: Burst and mono.

    Honestly, Unity DOTS is hitting the limit of C#. There are too many complains about writing HPC#: memory management, no easy polymorphism, C# language-level limitations, and bad eco-system(hard to connect to library from .NET and hard to connect to native plugins). If it was not because of what we have developed in C#, we will probably replace Unity DOTS with a few pinvoke, using use C# as a glue code and Unity as a renderer. At that point, Unity has no competitive advantages comparing to Unreal for us.

    With all that being complained, I appreciated the effort from DOTS team to make it work in C#, and I can see them overcoming a lot of challenges. But at the end of the day, I question C# is a right decision for DOTS due to low ceilings at language-level.
     
    mischa2k, xotonic, jdtec and 2 others like this.
  16. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,136
    Unity il2cpp is actually pretty close performance to c++, and you get that while using C#.
    Burst and jobs is one of the greatest things to come from unity.

    I'm personally not into dots, although I see it's pros and the great things you can do with it.
    Same things with unreal, you get nice performance, but programming in there to me personally, is just not fun.

    I feel like bevy and rust would be similar to how things are in unreal, somewhat.
    Although I'm not very knowledgeable in ECS so I can't really comment on the details of of Dots and bevy's ECS.

    Unity's API's and C# is just too good. And now we have il2cpp/burst/jobs.
     
    Last edited: Aug 14, 2021
    Krajca likes this.
  17. DreamingImLatios

    DreamingImLatios

    Joined:
    Jun 3, 2017
    Posts:
    4,223
    I thought I read somewhere that Bevy doesn't use macros, and that's partly why it is as popular as it is.
    A lot of this is because people are coming at this from the wrong viewpoint. Instead of thinking of it as a stripped-down C#, think of it as a beefed up C. It is C with generics, interfaces, encapsulation, properties, and a few other niceties.

    I will agree that Unity was hitting the limits of C#, but I think those limits are going to expand fast once source generators land. We'll have to see how Unity implements it and how customizable it is.
     
    Krajca likes this.
  18. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,965
    How valuable is the programming framework to you? Are you willing to live without or have to build the other major features of a game engine yourself? Because looking through what Bevy offers shows it's nowhere near Unity, and if Godot's seven plus years are any indication it will never be.
     
    Last edited: Aug 14, 2021
  19. april_4_short

    april_4_short

    Joined:
    Jul 19, 2021
    Posts:
    489
    Any ECS can surface an idealised abstraction of itself for extreme ease of conceptualisation and usage AND provide lower level access, too.

    Not sure why the abstractions aren't ever very high, nor usefully abstract and considerate of ease of conceptualisation and usage.

    This isn't something difficult to parse, nor to create a simply grammatical structure of and around, with a set of minimal rules that both guide and teach, whilst absolutely empowering.

    All can be made highly readable, so much so that visual coding's clunkiness can be done away with - in the native form of the paradigm:

    System -- Component(s) - EntityGroup(s)

    eg.

    Treatment for Pimples on FacialSkin:
    apply AcmeClear morning and night
     
  20. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,554
    I've heard this one before.

    Didn't buy it back then, don't buy it now.

    Track record is more important than community, and there is no "games made with this engine" section. Even godot and ogre had one. From my experience, an engine backed by an actual company is going to develop much faster than a community driven one.

    Basically, it doesn't matter if there is community, if it is enthusiastic, or if it is active.

    What matters is results and track record.

    We had common lisp which had the most powerful code generation facilities forever. You can write code that writes code that writes code and that's part of the language spec. It also allowed coding in functional style, meaning, no side effects which is great for multithreading.

    Now the question is, why is nobody using Lisp for this stuff?
     
    unity-freestyle likes this.
  21. davenirline

    davenirline

    Joined:
    Jul 7, 2010
    Posts:
    969
    Man, I love Rust. How I wish it was Unity's scripting language. Bevy is looking great but not quite there yet. I asked the dev when is going to be feature parity with Godot and the answer is at least 2 years. I'm actually supporting this project via donation. I really believe that Rust is the future of any real-time software.
     
    xotonic and dannymcgee like this.
  22. april_4_short

    april_4_short

    Joined:
    Jul 19, 2021
    Posts:
    489
    (((Two (times)) too many) parenthesis(es))


    Causes Parenthesis Paralysis
     
    RaL likes this.
  23. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,554
    That's wrong way to do it, and it is like complaining that python has too many idents or C# has too many curly braces and semicolons.

    For example, if you try to drive an unusual value in dotween, it will quickly explode into something like
    Code (csharp):
    1.  
    2. DOTween.To(
    3.     () => val,
    4.     val => {
    5.          blah();
    6.          setVal(newVal);
    7.     },
    8.     end,
    9.     t
    10. );
    11.  
    Which is not too far removed from what you'd get in common lisp. Except you get more commas and semicolons.

    It is a language construct and parenthesis matching is going to be handled by IDE. And then you'll get something that heavily resembles python or C-like code, depending on how you format it
    Code (csharp):
    1.  
    2. (dotween-to
    3.     (lambda () val)
    4.     (lambda (val)
    5.         (blah)
    6.         (set-val val)
    7.     )
    8.     end t
    9. )
    10.  
     
  24. april_4_short

    april_4_short

    Joined:
    Jul 19, 2021
    Posts:
    489
    All incredibly messy and unnecessary. Surfacing something enjoyable, elegant and empowering might look more akin to this:

    Code (csharp):
    1.  NowDoTween EaseInOut of SpaceShipXYZ to AsteroidOneABC over 4 seconds
     
    Last edited: Aug 14, 2021
    andreiagmu and hippocoder like this.
  25. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    So far that's really not the case with Unity vs Unreal. Unity's community (and solutions available online due to it) are one of the major pulls for Unity.
     
    andreiagmu likes this.
  26. april_4_short

    april_4_short

    Joined:
    Jul 19, 2021
    Posts:
    489
    A lot of people with a lot of experience with Unity say this, but they're seeing this through rose coloured glasses.

    For a newer user, it's impossible to filter through the enormous noise of low effort, low value, low quality and low calibre tutorials, blog posts, forum suggestions, discord messages, youtube videos and tortured twitter treatises on Unity usage.

    That's before we get to the very modern problem of trying to match a Unity version to package versions aligning exactly with those being used by the "teaching" source.

    Then there's the absolutely insane number of little things that go wrong when using Unity, as a new user, that they don't yet have the lexicon and base terminology to ask about, if there was somewhere that wasn't hostile to these sorts of naive questions.
     
    Tony_Max and UndeadButterKnife like this.
  27. Enzi

    Enzi

    Joined:
    Jan 28, 2013
    Posts:
    954
    Can you elaborate?
     
  28. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,554
    Common lisp uses this kind of syntax in "loop" statement and that's the reason why people hate "loop" statement in common lisp.

    Code (csharp):
    1.  
    2. (loop for i from 1 to 10 by 2
    3.      do (print i))
    4.  
    https://www.tutorialspoint.com/lisp/lisp_loops.htm

    Because this sort of syntax is trash due to being ambiguous. It is the opposite of "empowering" and "elegant".
    The purpose of syntax is to be unambiguous while retaining readability. And this one introduces extra ambiguity by introducing a dialect not used anywhere else in language.

    C# did the same stunt with linq, by the way.
    Which wasn't that great either.

    But. If for some incomprehensible reason you want to use common lisp to program in english:
    Code (csharp):
    1.  
    2. (program-in-english if I am hungry then look for food)
    3.  
    Then you can code that too, since the language allows it. All hail defmacro, lisp's most powerful feature and the greatest weakness, that allows you to create your very own dialect of the language nobody else is going to understand.
     
    Last edited: Aug 14, 2021
  29. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,554
    ...but they're telling you the truth.

    The forums are one of the most helpful information sources I've seen.
    Unreal community is full of passionate people, but a lot of those passionate people have very little skill which doesn't prevent them from trying to argue with you, passionately. Unity community is full of people that know their stuff.

    Generally, you (well, alright, not "you" but "I") wouldn't be using discord, blog posts and twitter (why would you even need it) but solve the problem on your own using documentation. And when you can't do that you ask for help here. Then there's high likely hood that someone will be able to assist you without having to deal with soup nazis and the like.
     
  30. JesOb

    JesOb

    Joined:
    Sep 3, 2012
    Posts:
    1,106
    The goal is not to be shorter but to be cleaner and easier to use for newcomers :)
    Additionally current lambda style is hack that work because of IL rewrite.
    This style dont need any rewrite this is direct C#
    It is more looks like Loved

    Code (CSharp):
    1. void Update(){...}
    but not magic named and it process not only one component at time but all that declared in parameters
    and it by default very fast and multithreaded.
    Code (CSharp):
    1.  [Job] static void Update(ref Component c, in Component2 c2){...}
    I just want to say that with this interface it is correct C# without hacks and most of Unity community can move onto ECS when it looks like this

    Yes. Make one of these to default if nothing specified and you can specify another options.
    For more complicated scenario there will be more code like it must be :)

    No your code sample will not compile it is not C# :)
    We can create shortcuts for most common scenarios but for very complicated and for full direct control you still can write manual System.Update methods manually create job struct and schedule them manually controlling dependencies.
     
    apkdev and Antypodish like this.
  31. nijnstein

    nijnstein

    Joined:
    Feb 6, 2021
    Posts:
    78
    I can see why people like the bevy sample provided above but in my opinion its code style is less informative then unity's. If you let an outsider read both snippets the unity version is much clearer in its intent. It is for example immediately clear that code is used on a list of things while in the bevy sample its inferred from the programmer knowing the environment.

    A c# developper with no knowledge of unity or bevy will understand more from the unity sample, and in my opinion that is an underlooked aspect.
     
  32. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,554
    The point is usually not to "have no hacks", but to "Get things done".

    Magically named methods are used so the C++ part of the engine can cache them and not to call them if they aren't there.

    Dogmatically correct solution would be to:

    1. Either have a baseclass with Blank Update() method and the like, in which case an object will waste CPU cycles calling dud methods.

    2. OR to have it inherit an interface. Which means more typing (you'll have to declare your intent to have an Update() method twice - first by inheriting, and then by declaration), and additionally all the interface methods have to be public.

    Unity's approach to monobehavior and magic methos is consistent with its use of C# of scripting language. And it might be worth mentioning that magic methods show up in production in other areas. For example, C++ expects main() to exist. That's a magic name method.

    And then we have python with duck typing that results in libraries using this a lot, sometimes to pass dictionaries as objects.
     
  33. DreamingImLatios

    DreamingImLatios

    Joined:
    Jun 3, 2017
    Posts:
    4,223
    I'm not saying anything about whether or not one should invest in Bevy, expect Bevy to succeed, or anything like that. All I am saying is that there's a difference between one person's pet project and a group of people working on something.

    I see a lot of pet projects on this subforum for DOTS. But I don't see an active community effort towards any single codebase.
     
    sngdan likes this.
  34. Vacummus

    Vacummus

    Joined:
    Dec 18, 2013
    Posts:
    191
    And to be fair, Embark Studios (from the creators of Battlefield) is a significant contributor of Brevy: https://twitter.com/BevyEngine/stats1296525644004593664

    I am not sure if they are using Brevy internally, but they are using Rust for their new games and are big supporters of the Rust open source community when it comes to making games with Rust.
     
  35. JesOb

    JesOb

    Joined:
    Sep 3, 2012
    Posts:
    1,106
    Totally Agree with you :)

    But do you think mutch that your
    Code (CSharp):
    1. void Update()
    2. {
    3.    //some logic in MonoBehaviour
    4. }
    5. void Start()
    6. {
    7.    //some logic in MonoBehaviour
    8. }
    9. //and all other magic methods
    10.  
    actually process "list of things"?

    I have agree that "ForEach" part and others is better to understand logic but in some cases and in cases where Developer came from MonoBehaviour land into ECS there may be better to see familiar concepts.
    For experienced developer that understand what going on there better to write less, shorter and cleaner code.

    And with source generators your System.Update method will be generated and there you can see full unity version if you want to and when you launch debugger :)
     
  36. JesOb

    JesOb

    Joined:
    Sep 3, 2012
    Posts:
    1,106
    You can write ton (200+) of C++ code to make things dont or write about 10 lines of code on python and make things done. Python is slower for sure but it help make things done faster and with shorter code and easier to maintain...

    Good phrase not main:
    "Anyone is capable of doing complicated things, there’s really no merit in that. What’s more difficult is accomplishing complex things in a simple, elegant way."

    So verbosity is not good for big programs. There we talk about same logic with same performance but with less code from programmer and more clear without surroundings and others.
    Full code in ESC is create job pass parameters to it and then schedule.

    Same concepts everywhere:
    https://docs.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-9#top-level-statements

    In My Opinion
    "Dogmatically correct solution would be to":
    Check all methods that need to be called from engine side with attribute. True C# solution to mark method as special one
     
  37. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,554
    Yes. It can kill your performance if you have thousands of those.

    Here's the blog post.

    https://blog.unity.com/technology/1k-update-calls

    You can also write twenty lines of code in C++ and not Python, if you know what you're doing.

    Python has low entry barrier, but its weakness it has almost no compile checks, and most errors trip at runtime. So amount of trouble you get increases with your codebase, things became difficult.

    It works as a Duct Tape language.

    C++ has array of bug prevention features on the level approaching levels of hardcore functional language, You can foolproof anything, and work without any tests being sure that your program has no unintended side effects and one module cannot wreck another (in python it can).
    The price for that is steep learning curve and increased study time.

    It works better as a larger project language.

    C# is closer to C++ than to Python, but it lacks certain bug prevention features such as const methods and const correcntes. It is also impossible to have non-nullable references.

    That's a bad advice.

    Here's an alternative suggestion.
    "Anyone is capable of doing comlicated things, some can accomplish complex things in a simple, elegant way, but non of that matters if you fail to finish the project and never actually get things done".

    Trying to make things elegant is a great way to get distracted and fail to accomplish your goal.

    Verbosity is great, because six month later you'll need to understand what you were thinking there, plus modern IDEs have autocompletion. However, verbosity should not be excessive. So,
    float projectileMaximumImpactDistance
    is good (descriptive), while
    Dictionary<string, LinkedList<Projectile>> projectilDictionary = new Dictionary<string, LinkedList<Projectile>>();
    (duplicated declaration) is bad.

    The original unity solution requires neither attribute nor interface nor base class. A replacement with attributes requires more typing while offering nothing in return. Hence, it is not an improvement.

    Anyway, I wandered in there because the OP posted a duplicated. I'll now excuse myself out of here.

    Have fun.
     
    TieSKey and april_4_short like this.
  38. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Not really, no. The same people who get *some* help in Unity land from from discord, forums, answers, (or even me via pm) get fat nothing on epic's side. You either work it out, or you don't, which is why most low-effort mobile titles are made in Unity, and why Unity absolutely *SMASHES* epic when it comes to number of Unity-engine titles available on steam.

    In short, you can be talentless and ship in Unity because even though half of it is deprecated, there's usually enough funnelling aka community going on that you'll land somewhere. It won't be optimal, but nobody said it had to be.
     
    NotaNaN, neginfinity and PutridEx like this.
  39. Enzi

    Enzi

    Joined:
    Jan 28, 2013
    Posts:
    954
    Well, Unity can certainly learn from Bevy. The categorization of sparse and and table sets is pretty cool. I think the problem Unity has and a lot of other developers, including me, is that they want one thing, to do two things when it's actually impossible or unnecessary hard and complicated.
    This is one of them.

    The change detection sounds also pretty cool. Honestly, the change detection in Unity is nearly unusable or it doesn't make a difference. Kind of wish they adapt this logic, maybe on a per-archetype level.

    As for the rest of this thread. I'm always perplexed how long people can talk about semantics. Who cares how it's written, really? C# is great, other languages are too. C# won't go away, so what's the point? It won't get better because you can put [Attribute] on something or some other detail. This is really stuff that is only details and we can care about details when the foundation is solid, which it isn't.
     
    april_4_short likes this.
  40. april_4_short

    april_4_short

    Joined:
    Jul 19, 2021
    Posts:
    489
    I think we h
    The above is not resolved, and cannot be resolved, through what you're supposing.

    And this is right at the beginning of the new user journey. Starting with 2D vs 3D templates was tricky, for some, because it has repercussions that extend far into the project.

    But that was then.

    Now the new user must choose between Builtin, URP and HDRP, vs two different LTS versions with varying issues, and a beta version, along with all corresponding versions of packages, before they can do a "hello world" and begin understanding the workflow of the engine... which is vastly different in Builtin to SRPs.

    Where's the common sense approach to ease of entry into using Unity, now?

    Make the wrong first step, and the new user's issues compound, and all the problems of all the noise become extreme.

    Further, looking at games currently released is, generally speaking, insight into Unity 5 or 2017's onboarding, at the earliest. It's not a reflection, nor indication, of how things are, now.
     
  41. nijnstein

    nijnstein

    Joined:
    Feb 6, 2021
    Posts:
    78
    No but is shows that there is something with a lifecycle pattern and defined flow, in the bevy example i only find a class with logic in a constructor and i would need extra information on it just to understand the flow would ive not known unity or bevy. Imagine looking at it a decade later.... now in games you probably wont have decade old code but as an old business software writer i would always choose for unity;s verbose descriptive style then bevy;s style which just assumes too much for my liking.

    That said, it is actually all irrellevant. Its relatively easy to be bevy and roll out a small subset of unity's capabilities with a 'clearer' ecs style but for me the power of unity is the 15 years of components stacked in one amalgam of packages all somewhat working together, although in different degrees. Can bevy really compare to that?
     
  42. JesOb

    JesOb

    Joined:
    Sep 3, 2012
    Posts:
    1,106
    You somewhat wrong like neginfinity

    In bevy all system based around one concept so even after decade you will start with that concept and understand everything from first glance. It is not true for unity ESC on SourceGenerators and there definitely part of code hidden like in WindowsForms designer but it actually there all code all connections. That code dont have magic connection like reflection or SendMessage("literal") or Unity Magic Methods. Everything is written in code.

    But after decade with current unity style if you forget that your super slow GC allocating closure will be rewritten on IL level by Unity to super fast job, you will be shocked few seconds or minutes. This rewrite never be seen by you at all, this code always hidden you can not debug it or see how it works, unlike in bevy and ESC based on SourceGenerators. Then you will find on forums that this antipattern of C# actually automagically best pattern when written inside Unity System code after "Entities.blah" and easily continue to work with system.

    But if you from guys that think this is bad:
    Code (CSharp):
    1. var somedata = Foo();
    Then your position is understandable :)

    This Thread not about Unity vs Bevy. It is DOTS vs Bevy. And may author want to call it Unity ESC vs Bevy.
    This fair comparison. And bevy begin with good modular architecture from start what Unity can not do even today with packages. Unity often write new core api specifically for their packages, so community can not actually create system that works same as written by Unity Devs.
     
    Neto_Kokku and pixldev like this.
  43. Guedez

    Guedez

    Joined:
    Jun 1, 2012
    Posts:
    827
    Will keep an eye on it in case Unity decides to implode itself post going public. But otherwise I don't see a point in switching, specially since I got way too much deeply dependent on Unity itself for my project. Maybe future projects, but I really doubt. I am still willing to trust Unity for a while, even though they basically stopped talking with the community.
    I am glad I got to know this exists, but I doubt I will use it for a very long while.
     
  44. jdtec

    jdtec

    Joined:
    Oct 25, 2017
    Posts:
    302
    Yes. I've really enjoyed switching back to my native language of choice for the sim and sticking with Unity/other engine for rendering, asset management, UI etc.
     
  45. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,965
    No. Newcomers to Unity like to believe that we had it easy in the early days but that's simply not true. Very few learning resources existed prior to Unity 5. Here is the extent of our learning resources.

    Just look at how anemic those sections are. Six graphical tutorials and the most complex topic was how to place a light source. Scripting was the only one that had any complexity and that was already very well covered by external sources thanks to being C#.

    Beyond this we only had the reference manuals and each other to make sense of them.

    https://web.archive.org/web/20140108151937/http://unity3d.com/learn/tutorials/modules

    Kids these days are too busy passing the blame to someone else for their own limitations to realize just how easy they have it. Today a new developer can pick up the engine much more quickly because they don't have to dig through the forums to figure out how it works.
     
    Last edited: Aug 16, 2021
  46. Sarkahn

    Sarkahn

    Joined:
    Jan 9, 2013
    Posts:
    440
    Bevy is really cool. It seems to have a really passionate (although tiny compared to Unity of course) community. There's about a million reasons to stick to Unity for most people - having an actual editor, the ability to port to every platform known to man, massive community support being big ones. But if you find yourself frustrated with dots, I would personally suggest giving bevy a try, especially if you're comfortable with lower level languages. Just keep in mind it is VERY early days.

    I'm going to be messing with Bevy at least until we have a better idea of where dots is headed. For me writing code in Rust has actually made me love coding again. The crate ecosystem and simplicity in setting up projects is just fantastic. It's still early days for Bevy but they've made great progress already and I'm really looking forward to seeing where it goes.
     
    skdamico, davenirline and dannymcgee like this.
  47. april_4_short

    april_4_short

    Joined:
    Jul 19, 2021
    Posts:
    489
    Unity, back then, was much smaller and more unified.

    You have grown with the engine.

    it is now a messy myriad of mazes in need of maps, more difficult to orientate within, and get to "Just Work".
     
  48. Thygrrr

    Thygrrr

    Joined:
    Sep 23, 2013
    Posts:
    699
    Bevy could be cool but a) it has basically zero tooling infrastructure and b) Rust is objectively pretty garbage as a language for productive (as in, production) devopment.

    Wake me up when something as powerful as Rider exists for Rust. It's a sweet, if overly restrictive, language, where C# has for the most part the right balance.

    (I have 20 years of C++ experience, trust me, it's not the native code and memory management I dislike)

    I, for one, don't like the crate ecosystem at all. It's the same fallacy as npm, ensuring only one thing - inevitable dependency hell the more the platform grows.
     
    l33t_P4j33t, TieSKey, Luxxuor and 2 others like this.
  49. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    20,965
    Barring the SRPs every major stable component we use today started life before or during Unity 5. If you disable the components that are in preview you're basically running Unity 5.
     
  50. april_4_short

    april_4_short

    Joined:
    Jul 19, 2021
    Posts:
    489
    That's exactly what I'm doing.

    minus Mecanim. That thing is the spawn of the dark one.