Comparing Unity DOTS and Bevy

  Рет қаралды 9,399

Logic Projects

Logic Projects

Жыл бұрын

A few weeks ago I completed the LudumDare 53 Game Jam as part of a collaboration with @TurboMakesGames and we both made basically the same game in both Unity Dots and Bevy. In this video I go through some of the comparable systems and components and talk about the differences in both engines.
Johnny's Channel: / @turbomakesgames
My Game: logicprojects.itch.io/deliver...
Johnny's Game: johnnyturbo.itch.io/pizza-sur...
My Code: github.com/mwbryant/logic_piz...
Johnny's Code: github.com/JohnnyTurbo/LD53

Пікірлер: 39
@TurboMakesGames
@TurboMakesGames Жыл бұрын
Great video comparison between the two games! All your points on Unity DOTS are certainly valid, I will just clarify that components and systems can all be in the same class files, it is just a choice I make to separate them out into different files. The only things that need to be in their own files are the authoring components, which are what you put on a GameObject in the Unity editor to set the values - in the past there was an attribute that could be added to the data components to automatically generate this authoring component, but it has been removed... long story... 😐 Anyways this was such a fun experiment, I hope to have my comparison video up next Friday 😀
@logicprojects
@logicprojects Жыл бұрын
I'm really excited to see your video on the topic too! It was a lot of fun to have such comparable products. Thanks again for having me on your channel and doing this!
@tenthlegionstudios1343
@tenthlegionstudios1343 Жыл бұрын
Thanks for the great content! just getting into rust and bevy and your channel has been great help.
@MrMackman191
@MrMackman191 Жыл бұрын
Glad to see a new video out :)
@mf_therry
@mf_therry Жыл бұрын
Another great video thanks :)
@cubbucca
@cubbucca Жыл бұрын
I learnt Unity Dots from TurboMakesGames before finding your videos. But I prefer bevys ECS, it very easy to build a scene in blender then load it into bevy.
@logicprojects
@logicprojects Жыл бұрын
Yeah bevy just makes everything a little bit easier!
@PeterAuto1
@PeterAuto1 Жыл бұрын
I wish you good luck finding a new Job
@beemstream
@beemstream Жыл бұрын
Good luck with the job search. Hope you get an awesome offer
@nomadshiba
@nomadshiba 10 ай бұрын
5:00 im not expert at ecs, but as a user of it i think the reason he didnt place too many variables inside a component is so he can get more cpu cache hits while querying components since unity places them next to next in the memory. for example if you only wanna check health of an entity, when you have one struct named Health you can fit more health data into the cpu cache. also its easier to parallel for unity, since unity can only make system code parallel, if a component is not being writen by another system at the same time, otherwise unity have to wait for other systems to finish working on the component. also in unity ecs you have "archtypes" that lets you combine multiple components. so keeping data in seperete components, if they are not highly related and regularly queried together, is better when it comes to authoring components and gluing with gameobjects, i have never done that before i just use pure ecs, but i think for now its useful if you wanna use the editor visually other than that, you can just write pure ecs like i do
@nomadshiba
@nomadshiba 9 ай бұрын
i use bevy now btw
@neolynxer
@neolynxer 9 ай бұрын
You said there could be a video on performance comparison. I wonder if linearizing memory layout in unity paid off.
@mikkelens
@mikkelens Жыл бұрын
I've been using Unity as my main engine and entry into programming (past text adventure games in python etc.) for around four years now, as both a hobby/interest thing and also for some school projects (programming classes etc.), and this video is quite interesting to me now that I've dipped my toes into working with Rust. I'm still very unaware of how bevy works, but all the things I love about my rust code seems to be present in your bevy game as well, which is pretty inspiring. I haven't used DOTS yet (because it untill recently was experimental etc.), and should probably give that a try, but all this video makes me feel is that I wish I could write the bevy code and work with it in a "Unity Editor" type environment. This isn't something I've tested, but I have this idea that Unity is uniquely friendly as a GUI for collaborating on games with normal people who aren't programming wizards, and that unfortunately might make it so I couldn't effectively collaborate with many amateur game devs in game jams if I was using something like bevy. What are your thoughts on this, as someone who actually has experience with it? I'll still learn bevy for the simple fact that it is the rust game engine™, just having a hard time pitching it to myself as productive for the goal of making games with other people.
@logicprojects
@logicprojects Жыл бұрын
Bevy is definitely an engine for programmers. You can make your own dev tools to help other people work on games with you but unity definitely has it beat there. Things like level design are best done in the editor and bevy doesn't have one (yet). But if you put in the time to make the tools then bevy can handle most things
@Boxing_Gamer
@Boxing_Gamer 9 ай бұрын
​@@logicprojectsI don't think you can use unity's editor for serious level design anyway. Could you imagine setting up a GTA world in unity? Impossible. They made their own specialized tool/editor or whatever it is, for that. I think most non-trivial games will have to do that.
@diehenne
@diehenne Жыл бұрын
Good comparison! Doesn't sound biased to me :P
@pedrodesanti6266
@pedrodesanti6266 Жыл бұрын
it is very cool that you didint tray to be "neutral", thats makes clear the advantages of each engine, i like unity, but i love rust and i will give a try to bevy
@publicalias8172
@publicalias8172 Ай бұрын
- Structs don't require being in it's own file of the same name, it's perfectly acceptable being in a shared file like you have here as long as it makes sense organizationally. Personally, having a single file to dump components into that don't relate sounds like a nightmare to extend and refactor.
@LuisCassih
@LuisCassih Жыл бұрын
What about using other library for the UI? let's say egui, or wgpu , it's possible?
@logicprojects
@logicprojects Жыл бұрын
Yeah you can. Bevy egui is great and some professional companies use it with bevy. Also I've used kayak UI and there's a couple other plugins. For this project I stuck with bevy raw though for some weird principle reason
@jeffg4686
@jeffg4686 Жыл бұрын
I've been thinking of using Unity lately, though I don't know if I can know both. I learned the "original" Unity back when. It was good, but just too many parts and pieces or something. But with AR, it looks like Unity is the way to go at the moment. Unity or Unreal. I wonder how much went into that integration, and what's possible using libraries today in Bevy regarding VR and AR (using various libraries). I'm especially interested in AR. That market is HUGE. So, I might be off to Unity for now. I don't want to, but I think it could be a while for Bevy to have VR/AR integration. I don't know if that's even on the plate, and is likely a BIG project. There's always some reason to use this one, or to use that one. I went went Godot at first. I think Unity is likely the best option for a real game at the moment. Unreal never interested me - didn't draw me in. Bevy drew me in, and has me sold, but it's just still early... Godot was fine. It drew me in. Had no real issues other than 3.2 was still early, but wanted 100% rust environment. Bevy is moving at lightning speed, but there's a lot of ground to cover... These Bevy developers are some kind of level beyond myself. I frankly, don't know how they do it... If they ever worked for the corps, I bet the corporate managers didn't know what they had. They usually don't.
@IcyTorment
@IcyTorment 4 ай бұрын
Remember when "roguelike" wasn't more or less a synonym for "game?"
@purplevincent4454
@purplevincent4454 9 ай бұрын
well you know cause of tribalism people are not going to be able to see to what you are saying here. but unity ecs is definitely convoluted compared to bevy. i saw a comment that said "no that's how it is c#" not understanding that the convention in c# (i have used c#) is to just stick everything into its own file, having used f# it was a breath of fresh air to be able to combine related types in modules and though I just recently started rust it seems to be similar in that regard. In c# every type (object) is in its own file stranded making you dance between a zillion different files like a mad man. i started off with c# and ecs but i think two things 1) c# is just a pretty verbose language compared to languages like f#, and 2) the ecs system is a garbled mess combining unity game objects and its actual ecs implementation. don't get me wrong unity has a lot more things going for it (minus the recent nonsense that occurred) but its ecs is nowhere near as clean and compact as in bevy. btw, as far as ui is concerned, i took a look at a library called bevy_iced which is similar to f#'s elmish, which is another plus for me. bevy just seems like all out win for me, but again. someone who is full in on c#/unity and are hardheaded refusing to step out of their echo chamber will never get to see the benefit that other languages/engines have to offer. one thing i will say that surprised me about bevy however was that the performance is not that good as i thought. maybe i had unrealistic expectations? but the idea of low-level (fast) combined with ecs (fast) made me think bevy would be super fast compared to unity.
@sacredgeometry
@sacredgeometry Жыл бұрын
2:40 Err no you could write your whole application in a single file in C# we just dont because its awful.
@purplevincent4454
@purplevincent4454 9 ай бұрын
well. that's because it's a convention in c#. take a look at languages like f#. c# convention is to have file for everything resulting in 5 line files. maybe branch out a little bit to explore different language philosophies, you may enjoy it (as said by someone who used c# now uses f# and delving into rust).
@christophernoneya4635
@christophernoneya4635 Жыл бұрын
Bevy ECS does have its issues, what really killed me is the fact you cannot store a circular reference between components (I cant have 2 objects that both point to each other), plus you can only have 1 of each component on an entity leading to the need for many custom components that all hold the same type of value and serve the same purposes, and stuff along those lines but even with these quirks I feel bevy has plenty of advantages and things that make it really great to work with
@logicprojects
@logicprojects Жыл бұрын
You can do a circular reference if you store the entity values instead of references to components. The rust borrow checker is aggressive. For the 1 component problem I think that's fundamental to most ECS solutions including unities and it just requires a different way of thinking about designs. But yeah bevy isn't for everyone and isn't the perfect final engine
@christophernoneya4635
@christophernoneya4635 Жыл бұрын
@@logicprojects from my understanding entity values are arbitrary and therefore are great for some uses but not others, I ended up use a custom index system where every entity was assigned it's own ID that I set beforehand.
@jdigi78
@jdigi78 Жыл бұрын
Having only 1 of a component on an entity is a core principle of pretty much any ECS implementation. If you find yourself needing to add a copy of the same component that seems like a code smell to me
@spicybaguette7706
@spicybaguette7706 Жыл бұрын
3:56 EndSimulationEntityCommandBufferSystem versus..... Commands😂
@nomadshiba
@nomadshiba 10 ай бұрын
its more like Commands vs EntityCommandBuffer. its not CommandBuffer only because CommandBuffer is already used for sending/getting data to/from GPU. EndSimulationEntityCommandBufferSystem, is a built in system that runs command buffers its not the only one, there are many others. This way you have some common systems that runs command buffers in order. So when i install a rendering package like "Hybrid Renderer" it's systems schedules commands to run in rendering related command buffer systems after the similation systems. so my systems that updates transforms doesnt accidently run after rendering systems. you also have BeginSimulationEntityCommandBufferSystem, that run at the begining of the frame, so you can schedule a command to run next frame after rendering.
@theman3282
@theman3282 Жыл бұрын
bevy is code based approach, there are really2 heavy discrepancy.
@Bloodlinedev
@Bloodlinedev Жыл бұрын
Coming from an actual programmer who has worked with Rust ecs (not Bevy), Unity and Unity with DOTS: Do yourself a favor and try DOTS once. It's the difference between a toy engine and an actual workhorse. Baking/authoring is a basic requirement when composing high level elements in an editor and building a big game. Yes, dots is less suited to prototyping compared to what Bevy or old Unity were but that's like saying "dynamic type languages are better because you have to type less".
@logicprojects
@logicprojects Жыл бұрын
I have actually used unity dots but not for a few versions. I'm sure Unity is great for some projects but Bevy is rapidly approaching the main stream engine level (especially once it gets an editor) and I have high hopes for its future. Don't let my video fool you, rust and bevy aren't just built for rapid prototyping, if anything Rust is known for the opposite and the tools being built are engineered to create modern games. It just takes time.
@yokunjon
@yokunjon 10 ай бұрын
What do you mean by actual programmer?
@Bloodlinedev
@Bloodlinedev 10 ай бұрын
actual programmer = earning the big bucks writing software after working a long time in a field your tastes in tools change
@yokunjon
@yokunjon 10 ай бұрын
@@Bloodlinedev But why did you need to state that explicitly? I suppose you are not thinking you are the only one capable of earning money through their job; so it doesn't add up. What's the point of stating it?
@TheGreatVV
@TheGreatVV Жыл бұрын
Lol, bevy code has so many problems. All these magic constansts and hardcoded values. Rust itself create a lot of visual noise from syntax - it is so harder to read. Dots has a lot of boilerplate code but it is much easy for team development because you have a lot of best practices majority of unity developers follow and bevy is not there yet.
@logicprojects
@logicprojects Жыл бұрын
Normal bevy code doesn't have as many hard coded values. Some places you need them because there's not an inspector (but arguably that would be just as ""hardcoded""). This was a game jam so a lot of it was just rapidly getting something together in a weekend. As for readability I don't see how unity could even compare to bevy. Maybe if you've never seen it before but after a quick pass it all should be clear. If anything I think bevy is better for teams and works better with version control than when I've tried the same with unity.
Networking in Bevy/Rust: Bevy Renet Showcase
13:24
Logic Projects
Рет қаралды 15 М.
Unity DOTS vs Assembly Benchmark - Which is fastest?
30:34
Lingon Studios
Рет қаралды 80 М.
你们会选择哪一辆呢#short #angel #clown
00:20
Super Beauty team
Рет қаралды 25 МЛН
NERF WAR HEAVY: Drone Battle!
00:30
MacDannyGun
Рет қаралды 51 МЛН
3M❤️ #thankyou #shorts
00:16
ウエスP -Mr Uekusa- Wes-P
Рет қаралды 13 МЛН
Bevy 0.8's New Material System
10:33
Logic Projects
Рет қаралды 6 М.
Will Rust Beat JavaScript in 2023?
23:48
ThePrimeTime
Рет қаралды 109 М.
Switching Game Engines... Twice? - Devlog #7
10:55
TIMBER
Рет қаралды 80 М.
Learn Bevy 0.11 By Making a Game! (part 1)
13:01
Logic Projects
Рет қаралды 42 М.
Dear Game Developers, Stop Messing This Up!
22:19
Jonas Tyroller
Рет қаралды 690 М.
How To Render 2 Million Objects At 120 FPS
14:57
Tarodev
Рет қаралды 138 М.
Bevy 0.13 -- Rust Powered Game Engine
12:33
Gamefromscratch
Рет қаралды 27 М.
The top 10 games from Bevy Game Jam 2
26:24
chris biscardi
Рет қаралды 29 М.
Should You Use DOTS in 2024? (plus what is Unity ECS)
30:15
Turbo Makes Games
Рет қаралды 37 М.