💬 MASSIVE Tutorial! I've been researching this for ages so I really hope this helps you get started with this awesome tech! 🔴 Complete DOTS Course! (Out now!) cmonkey.co/dotscourse 🎮 Play my Steam game! cmonkey.co/dinkyguardians ❤ Watch my FREE Complete Courses ruclips.net/video/oZCbmB6opxY/видео.html 🔴 RELATED VIDEOS 🔴 What are Value Types and Reference Types in C#? (Class vs Struct) ruclips.net/video/KGFAnwkO0Pk/видео.html Why you should NOT make everything PUBLIC! ruclips.net/video/pD27YuJG3L8/видео.html What are Scriptable Objects? (EXTREMELY Useful, Make your games Designer Friendly) ruclips.net/video/7jxS8HIny3Q/видео.html What are Generics? (C# Basics) ruclips.net/video/7VlykMssZzk/видео.html What are Events? (C# Basics) ruclips.net/video/OuZrhykVytg/видео.html
man, dollar value make things real tough to brazilians to buy the course even with discount, I can't afford it right now, I'm sorry edit: actually Real value that is a cr4p rn
Awesome work on this video Hugo! You did a great job pointing out a bunch of the nuances and gotchas that come with the ECS API. I think a tower defense tutorial could be a good way to showcase all the DOTS concepts in a real project, but I'd also love to see what you could do with a factory automation game. Glad you got connected with Dani too - he's a gem!!
You are the reason why I decided to try my hand at ECS myself! ❤ I have learned a lot from you and now I am trying to teach others myself on my channel 😊
Turbo you should absolutly do it! A full tutorial with 2 enemies and 2 towers with a pathfinding System. Just enough to get al the basics covered even with multiple entities like 2 enemies. I would for sure make use of such a tutorial to get into DOTS
Hi, thanks for the DOTS updated tutorial. If you are making a bigger tutorial, let it have multiple units interacting with each other using colliders, triggers, and raycasting. That sort of tutorial is very hard to find on RUclips. :)
this is the same guy that did a multiplayer camera tutorial with a single static camera watching multiple players... i think he doesn't understand enough of the hard concepts so he just doesn't cover them
@@mirabletest You got to be careful with that on RUclips. There's so many tutorials that show nothing but the absolute basics that especially are horrible for architecture.
Always happy to help! Great to see more content on this, and glad to see you highlighting the amazing @TurboMakesGames! Also glad to see so many common fallacies explained in one video, that I've seen so many people wrongly explain over the years! And while I see some people bellow giving small corrections, I'm sure a lot fall into 'you knew, but simplified for newcomers". So, I only have one note left. I personally would love to see a less abstract guide on a hybrid workflow, it sounds like a perfect small video! Though, I'm glad to see two approaches in this one! (Also, if you want any examples on hybrid workflows, do reach out again, after all you know where to find me ;) )
Just bought your DOTS course, glad to finally give back a little. Highly recommend the course to anyone feeling a little lost by this video. Using these principles in practice really helps.
I think the RTS game would be perfect given the number of units involved, the fact that units will all be doing things, lots of things occurring at once, lots of complex interactions, lots of state modifications, basically just a lot of stuff going on all the time. Another option would be an RPG (obviously smaller scale) for many of the same reasons. Tower defense could work but it's a relatively simple example. A bullet hell could be interesting, in marketing materials they showcased dots dealing with thousands of bullets per second so it feels like a natural extension. My personal vote is for the RTS. Basically I feel the best DOTS showcase would be a game that has lots of entities, all doing multipipe complex things at once and interacting frequently and in interesting ways. It would be interesting to for example start with a project using exclusively or almost exclusively GameObjects and then showcasing how switching parts over to Entities, Burst compiling, and moving things to jobs impacts the performance.
Data-Oriented programming is very good for, well, games that has a lot of data. Think 4x games like Civilization or Tycoon-type games. You're right on the money with RTS, at least to handle flocking movement, AI decisions, etc. it would be an appropriate spot to use DOTS. For RPGs tho, I would definitely stick to Object-Oriented, for the biggest part of it, this ain't really a genre that would benefit much, plus it would be way less intuitive to develop.
Greate video! Lots of insight into some of the caveats. One details about the ISystem vs SystemBase, at around 1h14 you mention that SystemBase are for managed component and ISystem for Unmanaged component. That's not exactly right, you CAN use Managed Component in ISystem, but you won't be able to burst the methods that uses the managed component. Howervey, you are right, what you CAN NOT do is add a managed field to you ISystem, so the event can't be added as a field in an ISystem. If you plan on making a complete DOTS course, I'd like to mention that I'm myself currently working on one using a Tower Defense game as topic with complete documented source code (code's complete, I need to record/edit it now 🥵). @TurboMakesGames made a RTS a some time ago, but I don't remember if he shared the code 🤔, and a vampire survivor type of game for LD53. So maybe try your hand at a factory or FPS game ?
Amazing video, I was looking to learn more about this yesterday and found this video. It dove deep enough into examples to give me some great general insights to get started in a somewhat overwhelming but very cool new way to squeeze out performance of Unity. I'm curious about scenarios where you might want to have separated worlds, since we only referenced the default one. I'd also love to see a more in-depth video about interactions and collisions. 10/10 video! Thanks for the great content
Ive worked with a number of ECSs out there, one of my favourite engines to use is bevy which is basically just an ECS and a gameloop and i must say Unity's is by far the least intuitive so the coverage is really appreciated!
I really appreciate all the work you've done on these tutorials. I've confirmed that ECS/DOTS is just a bit too much for most of my uses. Nice to know I can use Burst without DOTS. I think I'll attempt to use DOTS for just one or two very basic features, but definitely not for a whole project any time soon.
As for further topics/related to your course, what I haven't seen and wish there was more out there related to is how scenes are loaded/unloaded, scriptable objects, and how to use addressable all within ECS. Having a single scene for your entire game just isn't viable for larger games. Being able to load scenes additvietly. Finally all the system groups, what they are for and why you would want to load things in specific groups. All of that is sorely missing in the ECS world of tutorial videos out there. Thanks again for your hard work!
Great tutorial as always! One warning for any DOTS users: when dealing with entity prefabs that hold native containers or unsafe lists, if you don’t create the containers at runtime on a per entity basis and instead create them at bake time, all the prefab instances will share the same memory addresses of the containers, causing unexpected behavior or crashes.
Thanks for the new tutorial! Crazy how much you were able to get done in 2 weeks. My suggestion: an RTS with lots of enemies like They Are Billions where you incorporate more rogue like mechanics
Great video on DOTS. I'd be interested in a city builder with tons of villagers. (Targetting to simulate an X amount) Villagers covers AI behaviour, Animation and Path Finding. Personally I find those the most difficult topics for DOTS
Seconding this, I don't even know where to look for the first steps on learning this topic, eg: if you had dreams of making WoW, someone could at least point you towards a third person controller, a simple RPG, UI, and multiplayer tutorials aimed at beginners, and if you cleared those you could go more in depth.
wow, you really put a lot of work into this one. Can't tell you how amazing it is you are doing such high quality content for free! It's a massive boon until I finally get my finances under control. I'll totally buy your next paid course (most likely, got the other ones too), but will offer you my deepest gratitude for this one. It really makes DOTS a lot more approachable, I've avoided it until now (also because my game didn't require it), but I'm really looking forward to making a TD at some point. Minimal graphics, a bit of a geometry-defense kind of aesthetic, but I want to go ham with the unit count :)
Thank you! I've been waiting for your DOTS tutorial for a long time :) Will you be switching to DOTS entirely for your next games and / or courses ? When it comes to the courses I'd love to see either of the below: 1) Complex management game like Oxygen Not Included 2) Automation game like Factorio 3) City builder
Great tutorial, I really appreciate your work (I've been following you for a good couple of years and I've learned masses), it's good to see that another person is doing tutorials about ECS in Unity (I do too, but I have pretty small channel, maybe one day I raise to be a big one, who knows), because it's definitely a strong point of our engine and the optimization obtained is really attractive! ❤
I've been recently watching your stuff and it's awesome how there are ECS tutorials, but you're taking approach to explain not only what, but also why.
First and only video I ever clicked like on as well as the first time I subscribed to someone (at least on purpose). That is how valuable I found this.
Thanks a lot man! i watch your videos since i was a kid, i learned c# and now hopefully i will learn dots :) edit : yes bullet hell would be awesome subject
So excited about this! It's going to be so much fun to take 4-6months+ of only game dev... soon tm. Having primarily a mathematics, but also CS, background, ECS just seems so much intuitive and just better. So glad UNITY decided to develop it.
Love the tutorial, I always want to switch to DOTS but it seems so different to what I learned in my class, never having bravery to try that until now. Most performant issues I've run into at the start of my unity journey is 1. leveling huge world environment props like open world game, especially with tree, grass 2. large quantity of characters with difference behaves with navmesh 3. simulating datas which is out of distance from the player So i think with these systems instead of what type of game would be perfect for the project: 1. dynamic terrain loading system 2. runtime building system 3. enemys of course those always run in to performant issues
Some thoughts on the genres: Automation Game: Probably a good idea, as it would demonstrate a lot of the concepts that aren't often talked about, such as how to actually wire all these things up. RTS: I think this one is borderline pointless, it's what you'll get with just about every tutorial, since it's pretty much the poster child of ECS. City Builder: Would probably turn out fairly similar to an Automation Game, just with marginally changed focus on certain aspects. But overall, I think either would work well. TD: That's basically no different from an RTS, it was basically invented by old Blizzard games after all, and that's pretty much the reason. If you have an RTS, turning it into a TD is trivial. Hostile Mars Type Game: That might make a decent compromise between complex systems and straight forward raw RTS-esque power. Although I fear that most of it would already be covered by RTS concepts anyway, since a lot of it effectively comes down to casting volumes into entities. Which, again, is something a lot of tutorials are and/or will be covering, I think. Management Game: Not entirely sure how that would realistically differ from a Factory Game, at least from a learning perspective, but sure, why not! Vampire Survive: The upside is that this is fairly straight forward, which makes it a good candidate for a tutorial. Then again, there's a lot in that genre that will be covered by other tutorials. Although, things like wiring up debuff systems and such in an ECS context is probably an interesting topic. Bullet Hell: Meh, that's honestly just boring, it's effectively what everyone will make while learning ECS to begin with. ECS basically begs you to just mindlessly spawn a million simple entities, I doubt there's much need to go over that again. No matter which way you end up going, personally, I think ECS itself is sufficiently covered by resources these days. It comes with the kind of complexity that forces you back to the documentation all the time anyway, so there is limited use for repeating concepts taught everywhere else. As such, I, for one, would appreciate a deeper dive into how one turns all this theory into practice. Sure, I can spawn 500 million spinning cubes and that's cool, but the moment I want to add a particle system to them, I'm lost. This, I think, is the vast black hole of ECS that isn't talked about enough and hinders adoption more than anything else - it simply doesn't seem to integrate into the engine at all. In my mind, that should be the focus on any large tutorials going forward, because the basics are pretty much covered now. How to actually make a whole game with it - that's where info is sparse.
Great intro to DOTS! thanks for making it. For a potential tutorial project in dots, a classic RTS like Red Alert or Age of Empires would be really cool to see!
This is invaluable! Thanks for the upload. For anyone using this to make games with lots and LOTS of entities, keep in mind that this does not optimize all the graphics for you. LOD and material instancing is still on you.
Yup great tip! I was just watching an excellent Unity talk with the devs from IXION and they mentioned how they optimized the rendering of thousands of their units by using just one mesh and then a custom shader that takes a texture and moves the vertices, that way all the mesh drawing is batched into a single draw call
If you wonder like me why you dont see any movement in the scene view regardless of what you code - open the Preferences window (Edit > Preferences…) then on the Entities section, make sure “Scene View Mode” is set to “Runtime Data” not “Authoring Data” - took me a while to see that the entities were working fine in game view :X
Thanks for making, can't wait to follow along! I am glad that DOTS is becoming more mainstream, there's been a lot of hesitation from the community until recently.
38:30 I think that the second approach is more scalable. It is better to be inclusive than exclusive in queries if possible. When you have a lot of systems it is important to know what is modifying which entities.
Wow this tutorial is unbelievably easy to follow. I've been wasting my time on reading the official docs! if you have interest in DOTS/ECS you should watch this video. of course you need the basic knowledge like what's Entity, Component, System to understand this video.
Great tutorial as always! I've already finished the ChickenChaos singleplayer and multiplayer tutorial and now that you've asked for a new game tutorial I WOULD REALLY LOVE A TUTORIAL FOR A THIRD PERSON SHOOTER like hostile mars!! Since I found your channel I haven't stopped watching your tutorials and I've learned a ton of knowledge, THANK YOU SO MUCH!
I really enjoyed this tutorial and I look forward to a bigger dive in. Anything with Multiplayer would be great for me as it's then a case of being able to take that to apply to what I'd like to do. Thanks 🙂
around 14:30 you combine the rotatevalue struct with the authoring class, but isn't the point of ECS to seperate values and objects or did i misunderstood something? it feels counterproductive to let each entity carry around their values , memory wise.
One of the main points of ECS is separating data from systems that work on that data Technically yes the baking system is doing some work on the data, but baking is considered part of the component initialization process Not sure what you mean by "let each entity carry around their values" since that's exactly the goal, each entity should have its own data, that's intentional
Dots sure is looking much better from the first versions we've seen. I still remember getting hyped about it a few years back. :D One thing I dislike about it though, is the whole sharade with authoring and baking components. I know this is mainly to allow you to still use the style you're familiar with, and just sneakily replace them with dots at runtime, but I'd really love an option for a separate dots inspector that actually just handled the dots stuff and allowed you to drag the component. It's great if you use dots as a performance supplement, but I think if I were to make a game with only pure dots, I'd use Bevvy or something similar. The system/query/component code looks basically the same, the only downside is no visual editor built in (although there are plugins), and you don't need the artificial classes. Maybe if at some point they made an attribute you could add that would codegen the monobehaviors somehow (at least for simple cases that just pass fields through), or allowed you to skip the baker/monobehaviour by using a different editor, I'd be very happy, that's my only complaint with the current implementation. Well that and maybe the amount of different files you need to make, but I assume everything that's not a monobehaviour class can be in the same file. Not *everything* of course, but since systems tend to be 5-10 lines long, and components are just data boxes, you could probably group 5 related systems up and not loose readability. Especially since systems are meant to be as single-purpose as you can make them. Or maybe you could make that with aspects, if everything does actually operate on mostly the same data, I'd imagine putting some functions in an aspect and then calling them from separate jobs would do the trick as well. Overall, for intercompatibility with game objects it's 10/10, but for code it's 7-8 at best. I'd definitely make snippets before even thinking about making a component with those authoring scripts.
Hugo, the quality of your content is truly insane! I'm speechless! Still a student so no money for super thanks :( And as for the game, I'd like for it to be a third person shooter like hostile mars.
Thank you very much for the fantastic tutorial 👍 I encountered some difficulties with Unity DOTS in a project, which were mainly due to a lack of knowledge 😅 Thanks to this tutorial, I now have a significantly better knowledge base 💪
Skipped around a bit in the video, but really good job with explaining Unity Dots in a succinct and beginner friendly way :) And a factory game with DOTS would be pretty interesting, as I want to make a factory survival game, like satisfactory x factorio turret defence against biters as my next game some day,
Amazing work and well explained as always dude, I would suggest doing an RTS course creating a game like They are Billions and/or Diplomacy is Not an Option. Lots of fun mechanics in both those games!
Excellent tutorial! Thanks a lot - one thing I didn't see is how a data object can communicate some data to a system . Both event and instance method demonstrations were driven from the system -> monobehaviour. But how can a monobehaviour trigger a dynamic spawn at runtime?
Hi CodeMonkey, thanks for yet another awesome tutorial. I've done your round-based course on Udemy and enjoyed it a lot, so when watching this video I was wondering if maybe pathfinding would be a great (and relatively manageable) area to apply DOTS to? Especially as you mentioned that maybe the A* implementation in your course might not be optimal, performance wise, and suggested using a 3rd party asset for more serious applications? So especially if you're thinking about topics, maybe that would be a small(ish)-scope tutorial to make before delving into a major course on DOTS?
This was an extremely useful video, especially the mixing GemeObjects and Entities stuff. Can't wait for your DOTS full course video. Edit: Automation game for the full course video has my vote.
This man is unstoppable! I'm 4 hours into the unity beginner course so I really shouldn't be here 😂 but I'll leave a comment and a like for the algo lords
@@theebulll DOTS is useful when you want to have thousands of units to save some performance, or not? Game called Diplomacy is not an option is made with Unity DOTS from what I have heard.
@@theebulll well, it's also about querying your data, the flexability of being able to say: 'hey, give me all the soldiers that have bows on them, and shoot' that's something an ECS is highly good at, not just for performance, but also from UX saying stuff like SystemAPI.Query() and just loop over it is much easier than traditional OOP approaches
This video will help a lot! I love your tutorials, they are just so easy to understand and also entertaining to watch. Hope you become the Brackeys v.2.0 (or you are already lol) and lots of success with your games.
Thanks for the Dots tutorial!!! im willing to make a vampire survivors like game, and im triyng to start it using ECS, would be amazing a tutorial about that!
The reason why var is popular is because it makes code more readable and it forces you to use sensible descriptive variable names which also makes code easier to understand. It also reduces redundancy. I mean, which is easier to type and understand at first glance? "var rotateSpeed" or "
Hi, i think the bullet hell would be a really helpful and interesting genre to cover the DOTS system with. I really look forward to the tutorials. Thank you.
Honestly at the moment i have couple of problems with Entities. First Unity change the way how all this language of calling components and do stuff, and I get it since they want to make it more easy to use but create a bit of confusin. Second is the fact that some unity version works some not and in last one using Light settings with Entities and some other assets dont work so for me at the moment for Entities is work in progress and needs another year before something stable. But I like is someone like you that keep us updated for how this work .
I like DOTs especially for a flyweight replacement. It fixes the layer of indirection caused by flyweight. You use a shared component with the data and then process it on everything that uses it.
thanks for this very nice tutorial ! for what i saw i feel that what is missing more documentation and example from ecs ( and what is the most blurry currenlty for me ) are dynamicbuffer components
IComponentData has no way of storing an array of values. So instead, you need to use a special type of component called DynamicBuffer which is a component capable of storing a resizable array of values. It's a bit hard to understand unless you do it. There's lots of tutorials on RUclips
Thank you for this tutorial and all the hard work that went into this. Question for ya: there were many other tools that the Unity Store had like Amplify Imposters, MeshCombine, etc that were used for optimization. And then there was a game called Mile High Taxi that used those tools. Is Entities meant to replace those tools, or do we combine them?
Hi, thanks for this tutorial helped me alot to understand these new systems. i do have a question. I have the exact same code and unity version as in the tutorial but im getting messages in the console about "Leak Detected : Persistent allocates 3 individual allocations". Any ideas what causes this or how to fix it?
Yeah I was getting that as well so it seems to be something on the DOTS code itself and not any of your code. From all the time that I spent with DOTS I didn't notice that causing any issue so you can just ignore that message, assuming that it is indeed thrown by the Entities package itself and not a memory leak that you caused in your own code
💬 MASSIVE Tutorial! I've been researching this for ages so I really hope this helps you get started with this awesome tech!
🔴 Complete DOTS Course! (Out now!) cmonkey.co/dotscourse
🎮 Play my Steam game! cmonkey.co/dinkyguardians
❤ Watch my FREE Complete Courses ruclips.net/video/oZCbmB6opxY/видео.html
🔴 RELATED VIDEOS 🔴
What are Value Types and Reference Types in C#? (Class vs Struct) ruclips.net/video/KGFAnwkO0Pk/видео.html
Why you should NOT make everything PUBLIC! ruclips.net/video/pD27YuJG3L8/видео.html
What are Scriptable Objects? (EXTREMELY Useful, Make your games Designer Friendly) ruclips.net/video/7jxS8HIny3Q/видео.html
What are Generics? (C# Basics) ruclips.net/video/7VlykMssZzk/видео.html
What are Events? (C# Basics) ruclips.net/video/OuZrhykVytg/видео.html
Please do a full dots course please dots are amazing
man, dollar value make things real tough to brazilians to buy the course even with discount, I can't afford it right now, I'm sorry
edit: actually Real value that is a cr4p rn
Awesome work on this video Hugo! You did a great job pointing out a bunch of the nuances and gotchas that come with the ECS API.
I think a tower defense tutorial could be a good way to showcase all the DOTS concepts in a real project, but I'd also love to see what you could do with a factory automation game.
Glad you got connected with Dani too - he's a gem!!
You are the reason why I decided to try my hand at ECS myself! ❤
I have learned a lot from you and now I am trying to teach others myself on my channel 😊
Yes agree, teaching how to build a tower defense game in ecs would be great
Turbo you should absolutly do it! A full tutorial with 2 enemies and 2 towers with a pathfinding System. Just enough to get al the basics covered even with multiple entities like 2 enemies. I would for sure make use of such a tutorial to get into DOTS
Hi, thanks for the DOTS updated tutorial. If you are making a bigger tutorial, let it have multiple units interacting with each other using colliders, triggers, and raycasting. That sort of tutorial is very hard to find on RUclips. :)
this is the same guy that did a multiplayer camera tutorial with a single static camera watching multiple players... i think he doesn't understand enough of the hard concepts so he just doesn't cover them
@@mirabletest the dunning kruger hitting hard here
@@lavatasche2806 yeah, i'm a director of software teams in banking, he's a game developer. the experience difference is abyssal
@@mirabletest You got to be careful with that on RUclips. There's so many tutorials that show nothing but the absolute basics that especially are horrible for architecture.
@@Alexander_Grant that's what i'm saying, teaching that to new generations is dangerous
Always happy to help! Great to see more content on this, and glad to see you highlighting the amazing @TurboMakesGames!
Also glad to see so many common fallacies explained in one video, that I've seen so many people wrongly explain over the years! And while I see some people bellow giving small corrections, I'm sure a lot fall into 'you knew, but simplified for newcomers". So, I only have one note left.
I personally would love to see a less abstract guide on a hybrid workflow, it sounds like a perfect small video! Though, I'm glad to see two approaches in this one! (Also, if you want any examples on hybrid workflows, do reach out again, after all you know where to find me ;) )
Just bought your DOTS course, glad to finally give back a little. Highly recommend the course to anyone feeling a little lost by this video. Using these principles in practice really helps.
I think the RTS game would be perfect given the number of units involved, the fact that units will all be doing things, lots of things occurring at once, lots of complex interactions, lots of state modifications, basically just a lot of stuff going on all the time. Another option would be an RPG (obviously smaller scale) for many of the same reasons. Tower defense could work but it's a relatively simple example. A bullet hell could be interesting, in marketing materials they showcased dots dealing with thousands of bullets per second so it feels like a natural extension. My personal vote is for the RTS.
Basically I feel the best DOTS showcase would be a game that has lots of entities, all doing multipipe complex things at once and interacting frequently and in interesting ways. It would be interesting to for example start with a project using exclusively or almost exclusively GameObjects and then showcasing how switching parts over to Entities, Burst compiling, and moving things to jobs impacts the performance.
Data-Oriented programming is very good for, well, games that has a lot of data. Think 4x games like Civilization or Tycoon-type games. You're right on the money with RTS, at least to handle flocking movement, AI decisions, etc. it would be an appropriate spot to use DOTS.
For RPGs tho, I would definitely stick to Object-Oriented, for the biggest part of it, this ain't really a genre that would benefit much, plus it would be way less intuitive to develop.
Was Hyped for this since the new year Video, thank you for making These big Tutorials free, you are really an important part of the gamedev Community!
Greate video! Lots of insight into some of the caveats.
One details about the ISystem vs SystemBase, at around 1h14 you mention that SystemBase are for managed component and ISystem for Unmanaged component.
That's not exactly right, you CAN use Managed Component in ISystem, but you won't be able to burst the methods that uses the managed component.
Howervey, you are right, what you CAN NOT do is add a managed field to you ISystem, so the event can't be added as a field in an ISystem.
If you plan on making a complete DOTS course, I'd like to mention that I'm myself currently working on one using a Tower Defense game as topic with complete documented source code (code's complete, I need to record/edit it now 🥵).
@TurboMakesGames made a RTS a some time ago, but I don't remember if he shared the code 🤔, and a vampire survivor type of game for LD53.
So maybe try your hand at a factory or FPS game ?
Amazing video, I was looking to learn more about this yesterday and found this video. It dove deep enough into examples to give me some great general insights to get started in a somewhat overwhelming but very cool new way to squeeze out performance of Unity. I'm curious about scenarios where you might want to have separated worlds, since we only referenced the default one. I'd also love to see a more in-depth video about interactions and collisions. 10/10 video! Thanks for the great content
Thanks for the super thanks!
The separated worlds is especially useful in multiplayer so you can have a server world and a client world.
Excellent tutorial as usual, keen to see your Factorio styled DOTS tutorial ;) Thanks again!!
Ive worked with a number of ECSs out there, one of my favourite engines to use is bevy which is basically just an ECS and a gameloop and i must say Unity's is by far the least intuitive so the coverage is really appreciated!
I really appreciate all the work you've done on these tutorials. I've confirmed that ECS/DOTS is just a bit too much for most of my uses. Nice to know I can use Burst without DOTS. I think I'll attempt to use DOTS for just one or two very basic features, but definitely not for a whole project any time soon.
As for further topics/related to your course, what I haven't seen and wish there was more out there related to is how scenes are loaded/unloaded, scriptable objects, and how to use addressable all within ECS. Having a single scene for your entire game just isn't viable for larger games. Being able to load scenes additvietly. Finally all the system groups, what they are for and why you would want to load things in specific groups. All of that is sorely missing in the ECS world of tutorial videos out there. Thanks again for your hard work!
Great tutorial as always! One warning for any DOTS users: when dealing with entity prefabs that hold native containers or unsafe lists, if you don’t create the containers at runtime on a per entity basis and instead create them at bake time, all the prefab instances will share the same memory addresses of the containers, causing unexpected behavior or crashes.
Oh that's good to know!
Another wounderfull tutorial
Thanks for the new tutorial! Crazy how much you were able to get done in 2 weeks.
My suggestion: an RTS with lots of enemies like They Are Billions where you incorporate more rogue like mechanics
That would be a great idea! It would give me an excuse to replay They Are Billions heh
Great video on DOTS.
I'd be interested in a city builder with tons of villagers. (Targetting to simulate an X amount)
Villagers covers AI behaviour, Animation and Path Finding.
Personally I find those the most difficult topics for DOTS
Seconding this, I don't even know where to look for the first steps on learning this topic, eg: if you had dreams of making WoW, someone could at least point you towards a third person controller, a simple RPG, UI, and multiplayer tutorials aimed at beginners, and if you cleared those you could go more in depth.
Absolutely, there are almost no tutorials on how to implement this on ECS. I am struggling to figure it out on my own.
Definitely a super useful Video.
I'm planning on seriously studying DOTS / ECS this year 💯👌🏻
Thank You CM
wow, you really put a lot of work into this one. Can't tell you how amazing it is you are doing such high quality content for free! It's a massive boon until I finally get my finances under control. I'll totally buy your next paid course (most likely, got the other ones too), but will offer you my deepest gratitude for this one. It really makes DOTS a lot more approachable, I've avoided it until now (also because my game didn't require it), but I'm really looking forward to making a TD at some point. Minimal graphics, a bit of a geometry-defense kind of aesthetic, but I want to go ham with the unit count :)
Thanks for the kind words!
I would honestly really like to see you tackle how to find and track leaks from the job system.
Thank you, wish you all the success in the world
Thanks for the super thanks!
Thank you! I've been waiting for your DOTS tutorial for a long time :) Will you be switching to DOTS entirely for your next games and / or courses ?
When it comes to the courses I'd love to see either of the below:
1) Complex management game like Oxygen Not Included
2) Automation game like Factorio
3) City builder
Thank you! Been looking forward to more on this topic from you; would love a full course. Keep being awesome! 😎
Thanks for the super thanks!
Thanks for going into the extra detail for explaining exactly what those checkboxes were for!
Great tutorial, I really appreciate your work (I've been following you for a good couple of years and I've learned masses), it's good to see that another person is doing tutorials about ECS in Unity (I do too, but I have pretty small channel, maybe one day I raise to be a big one, who knows), because it's definitely a strong point of our engine and the optimization obtained is really attractive! ❤
I've been recently watching your stuff and it's awesome how there are ECS tutorials, but you're taking approach to explain not only what, but also why.
@@DeTNTonator Thanks, nice to hear!
I'm trying my best! 🥰
Thanks for the kind words! Yup DOTS is really awesome and I'm really looking forward to seeing what people do with it
Love you man. Thanks for this explanation I will turn my RTS game to ECS, I really was fighting with performance, thanks a lot
First and only video I ever clicked like on as well as the first time I subscribed to someone (at least on purpose). That is how valuable I found this.
That's awesome, I'm glad you found the video helpful! Thanks!
Thanks a lot man! i watch your videos since i was a kid, i learned c# and now hopefully i will learn dots :)
edit : yes bullet hell would be awesome subject
Thanks for the video
So excited about this! It's going to be so much fun to take 4-6months+ of only game dev... soon tm.
Having primarily a mathematics, but also CS, background, ECS just seems so much intuitive and just better. So glad UNITY decided to develop it.
Thanks!
Thanks for the super thanks! I hope the video helped you!
i have been waiiting for this moment. thanks
Love the tutorial, I always want to switch to DOTS but it seems so different to what I learned in my class, never having bravery to try that until now.
Most performant issues I've run into at the start of my unity journey is
1. leveling huge world environment props like open world game, especially with tree, grass
2. large quantity of characters with difference behaves with navmesh
3. simulating datas which is out of distance from the player
So i think with these systems instead of what type of game would be perfect for the project:
1. dynamic terrain loading system
2. runtime building system
3. enemys of course
those always run in to performant issues
Another awesome tutorial by code monkey. Really love diving into DOTS. Amazing system.
Thank you! Always very clear, concise and precise!
Well I am now at the point in my own little game where I need to understand this, and this video is gold dust my friend, thanks so much!
Just Awesome. Thank You So Much. You are adding a lot of a value to the community.
Thank you very much for your teaching. I have watched a lot of outdated videos and I have to find a lot of information to correct them.
Some thoughts on the genres:
Automation Game: Probably a good idea, as it would demonstrate a lot of the concepts that aren't often talked about, such as how to actually wire all these things up.
RTS: I think this one is borderline pointless, it's what you'll get with just about every tutorial, since it's pretty much the poster child of ECS.
City Builder: Would probably turn out fairly similar to an Automation Game, just with marginally changed focus on certain aspects. But overall, I think either would work well.
TD: That's basically no different from an RTS, it was basically invented by old Blizzard games after all, and that's pretty much the reason. If you have an RTS, turning it into a TD is trivial.
Hostile Mars Type Game: That might make a decent compromise between complex systems and straight forward raw RTS-esque power. Although I fear that most of it would already be covered by RTS concepts anyway, since a lot of it effectively comes down to casting volumes into entities. Which, again, is something a lot of tutorials are and/or will be covering, I think.
Management Game: Not entirely sure how that would realistically differ from a Factory Game, at least from a learning perspective, but sure, why not!
Vampire Survive: The upside is that this is fairly straight forward, which makes it a good candidate for a tutorial. Then again, there's a lot in that genre that will be covered by other tutorials. Although, things like wiring up debuff systems and such in an ECS context is probably an interesting topic.
Bullet Hell: Meh, that's honestly just boring, it's effectively what everyone will make while learning ECS to begin with. ECS basically begs you to just mindlessly spawn a million simple entities, I doubt there's much need to go over that again.
No matter which way you end up going, personally, I think ECS itself is sufficiently covered by resources these days. It comes with the kind of complexity that forces you back to the documentation all the time anyway, so there is limited use for repeating concepts taught everywhere else. As such, I, for one, would appreciate a deeper dive into how one turns all this theory into practice. Sure, I can spawn 500 million spinning cubes and that's cool, but the moment I want to add a particle system to them, I'm lost. This, I think, is the vast black hole of ECS that isn't talked about enough and hinders adoption more than anything else - it simply doesn't seem to integrate into the engine at all. In my mind, that should be the focus on any large tutorials going forward, because the basics are pretty much covered now. How to actually make a whole game with it - that's where info is sparse.
Nice one! Just was looking for a good tutorial about this subject!
Great intro to DOTS! thanks for making it. For a potential tutorial project in dots, a classic RTS like Red Alert or Age of Empires would be really cool to see!
This is invaluable! Thanks for the upload.
For anyone using this to make games with lots and LOTS of entities, keep in mind that this does not optimize all the graphics for you.
LOD and material instancing is still on you.
Yup great tip! I was just watching an excellent Unity talk with the devs from IXION and they mentioned how they optimized the rendering of thousands of their units by using just one mesh and then a custom shader that takes a texture and moves the vertices, that way all the mesh drawing is batched into a single draw call
I look forward to getting through this once my days off kick in, in a few days time. Thanks!
Thank you so much for this tutorial, it's a very comprehensive way to get into DOTS and helped me a lot !!!
If you wonder like me why you dont see any movement in the scene view regardless of what you code - open the Preferences window (Edit > Preferences…) then on the Entities section, make sure “Scene View Mode” is set to “Runtime Data” not “Authoring Data” - took me a while to see that the entities were working fine in game view :X
heh yeah it also took me a while to figure out that setting
The API looks quite good ! Very complete video to quickstart someone on DOTS !
Thanks for making, can't wait to follow along! I am glad that DOTS is becoming more mainstream, there's been a lot of hesitation from the community until recently.
and rightly so, they really shot themselves in the foot picking C# for unity.
I might not need this right now, but i do appreciate the work put into this video.
Big thanks for all the research. I haven't touched DOTS in a while, but your video will definitely help with getting back on track
38:30 I think that the second approach is more scalable. It is better to be inclusive than exclusive in queries if possible. When you have a lot of systems it is important to know what is modifying which entities.
Wow this tutorial is unbelievably easy to follow. I've been wasting my time on reading the official docs! if you have interest in DOTS/ECS you should watch this video. of course you need the basic knowledge like what's Entity, Component, System to understand this video.
I'm glad you found the video helpful! Thanks!
Thanks!
Thanks for the super thanks!
Thanks for the tutorial. I'd been considering dots for a while so this was super helpful
Awesome video, if you have not made a decision yet, id definitly like to see you implement a complex management game like ONI, love that game !
Great tutorial as always!
I've already finished the ChickenChaos singleplayer and multiplayer tutorial and now that you've asked for a new game tutorial I WOULD REALLY LOVE A TUTORIAL FOR A THIRD PERSON SHOOTER like hostile mars!!
Since I found your channel I haven't stopped watching your tutorials and I've learned a ton of knowledge, THANK YOU SO MUCH!
Nice! I'm glad the videos have helped you, thanks!
I really enjoyed this tutorial and I look forward to a bigger dive in. Anything with Multiplayer would be great for me as it's then a case of being able to take that to apply to what I'd like to do. Thanks 🙂
Absolutely brilliant introduction to DOTS!
around 14:30 you combine the rotatevalue struct with the authoring class, but isn't the point of ECS to seperate values and objects or did i misunderstood something? it feels counterproductive to let each entity carry around their values , memory wise.
One of the main points of ECS is separating data from systems that work on that data
Technically yes the baking system is doing some work on the data, but baking is considered part of the component initialization process
Not sure what you mean by "let each entity carry around their values" since that's exactly the goal, each entity should have its own data, that's intentional
great video, I was looking forward to your DOTS tutorial. Would love to see a full course on DOTS!
Wow this video was impressive! Thanks again for teaching us the best techs!
Dots sure is looking much better from the first versions we've seen. I still remember getting hyped about it a few years back. :D
One thing I dislike about it though, is the whole sharade with authoring and baking components. I know this is mainly to allow you to still use the style you're familiar with, and just sneakily replace them with dots at runtime, but I'd really love an option for a separate dots inspector that actually just handled the dots stuff and allowed you to drag the component.
It's great if you use dots as a performance supplement, but I think if I were to make a game with only pure dots, I'd use Bevvy or something similar. The system/query/component code looks basically the same, the only downside is no visual editor built in (although there are plugins), and you don't need the artificial classes. Maybe if at some point they made an attribute you could add that would codegen the monobehaviors somehow (at least for simple cases that just pass fields through), or allowed you to skip the baker/monobehaviour by using a different editor, I'd be very happy, that's my only complaint with the current implementation. Well that and maybe the amount of different files you need to make, but I assume everything that's not a monobehaviour class can be in the same file. Not *everything* of course, but since systems tend to be 5-10 lines long, and components are just data boxes, you could probably group 5 related systems up and not loose readability. Especially since systems are meant to be as single-purpose as you can make them. Or maybe you could make that with aspects, if everything does actually operate on mostly the same data, I'd imagine putting some functions in an aspect and then calling them from separate jobs would do the trick as well.
Overall, for intercompatibility with game objects it's 10/10, but for code it's 7-8 at best. I'd definitely make snippets before even thinking about making a component with those authoring scripts.
Would definitely appreciate a complete dots course.
Hugo, the quality of your content is truly insane!
I'm speechless! Still a student so no money for super thanks :(
And as for the game, I'd like for it to be a third person shooter like hostile mars.
Thank you very much for the fantastic tutorial 👍 I encountered some difficulties with Unity DOTS in a project, which were mainly due to a lack of knowledge 😅 Thanks to this tutorial, I now have a significantly better knowledge base 💪
Thank you.
Skipped around a bit in the video, but really good job with explaining Unity Dots in a succinct and beginner friendly way :)
And a factory game with DOTS would be pretty interesting, as I want to make a factory survival game, like satisfactory x factorio turret defence against biters as my next game some day,
Amazing work and well explained as always dude, I would suggest doing an RTS course creating a game like They are Billions and/or Diplomacy is Not an Option. Lots of fun mechanics in both those games!
Amaaaazzzzing tutorial... Btw, Its so satisfying watching your videos without that typing sound...😅
Excellent tutorial! Thanks a lot - one thing I didn't see is how a data object can communicate some data to a system . Both event and instance method demonstrations were driven from the system -> monobehaviour. But how can a monobehaviour trigger a dynamic spawn at runtime?
Hi CodeMonkey, thanks for yet another awesome tutorial. I've done your round-based course on Udemy and enjoyed it a lot, so when watching this video I was wondering if maybe pathfinding would be a great (and relatively manageable) area to apply DOTS to?
Especially as you mentioned that maybe the A* implementation in your course might not be optimal, performance wise, and suggested using a 3rd party asset for more serious applications?
So especially if you're thinking about topics, maybe that would be a small(ish)-scope tutorial to make before delving into a major course on DOTS?
clear and concise explanation
This was an extremely useful video, especially the mixing GemeObjects and Entities stuff. Can't wait for your DOTS full course video. Edit: Automation game for the full course video has my vote.
God Bless You. I have been waiting a long time for this.
excellent overview
This man is unstoppable! I'm 4 hours into the unity beginner course so I really shouldn't be here 😂 but I'll leave a comment and a like for the algo lords
I hope you're learning a lot from the course!
@@CodeMonkeyUnity loads mate can't thank you enough!
Amazing work as usual! I would like to see it applied on an RTS game.
In what ways? I'm working on one and id be interested in know where you think it would be useful.
@@theebulll DOTS is useful when you want to have thousands of units to save some performance, or not? Game called Diplomacy is not an option is made with Unity DOTS from what I have heard.
@@theebulll well, it's also about querying your data, the flexability of being able to say: 'hey, give me all the soldiers that have bows on them, and shoot' that's something an ECS is highly good at, not just for performance, but also from UX saying stuff like SystemAPI.Query() and just loop over it is much easier than traditional OOP approaches
@@theebulll Well, in practically every way. OOP is a tough sell for something as performance intensive as a video game.
There were so many places I didn't understand. I solved it all with this video. Thanks Hugo ❤❤
I'm glad you learned a lot, great job!
Super thanks man. I really needed this 😭. Super super thanks!!!
This video will help a lot! I love your tutorials, they are just so easy to understand and also entertaining to watch. Hope you become the Brackeys v.2.0 (or you are already lol) and lots of success with your games.
HI. In the part of the event you can simply use an Action more easy to do.
Thanks for the Dots tutorial!!! im willing to make a vampire survivors like game, and im triyng to start it using ECS, would be amazing a tutorial about that!
i absolutely love the course on dots
Love you man.. and your content and teaching style.. would love to see a tower defence game video with Dots.
Absolutely interesting in a full series on building a game in ECS!
Yes I would like to see dots course soon :)
The reason why var is popular is because it makes code more readable and it forces you to use sensible descriptive variable names which also makes code easier to understand. It also reduces redundancy. I mean, which is easier to type and understand at first glance? "var rotateSpeed" or "
Hi, i think the bullet hell would be a really helpful and interesting genre to cover the DOTS system with. I really look forward to the tutorials. Thank you.
Honestly at the moment i have couple of problems with Entities. First Unity change the way how all this language of calling components and do stuff, and I get it since they want to make it more easy to use but create a bit of confusin. Second is the fact that some unity version works some not and in last one using Light settings with Entities and some other assets dont work so for me at the moment for Entities is work in progress and needs another year before something stable. But I like is someone like you that keep us updated for how this work .
Great tutorial! Thank you
Been watiting for this!
I like DOTs especially for a flyweight replacement. It fixes the layer of indirection caused by flyweight. You use a shared component with the data and then process it on everything that uses it.
Would like to add that this can be achieved also by using the jobs system instead of ECS itself. But I do like the ECS strict architecture
Thanks for the tutorial, it was good and I would love to see a great RPG platformer with great mechanics
I would be really interested to see a full DOTS course, as well as a multiplayer expansion to it
Brakeys is no longer worthy of being king. We honor you as the king of free Unity tutorials.
thanks for this very nice tutorial ! for what i saw i feel that what is missing more documentation and example from ecs ( and what is the most blurry currenlty for me ) are dynamicbuffer components
IComponentData has no way of storing an array of values. So instead, you need to use a special type of component called DynamicBuffer which is a component capable of storing a resizable array of values. It's a bit hard to understand unless you do it. There's lots of tutorials on RUclips
Thank you for this tutorial and all the hard work that went into this. Question for ya: there were many other tools that the Unity Store had like Amplify Imposters, MeshCombine, etc that were used for optimization. And then there was a game called Mile High Taxi that used those tools. Is Entities meant to replace those tools, or do we combine them?
Vampire Survivor-like keeps it simple and I am interested in how this can help keep performance good with heaps going on all at once.
Great tutorial!
Even though DOTS assets are still few, I hope you will upload recommend video about it in the future.
Hi, thanks for this tutorial helped me alot to understand these new systems. i do have a question. I have the exact same code and unity version as in the tutorial but im getting messages in the console about "Leak Detected : Persistent allocates 3 individual allocations". Any ideas what causes this or how to fix it?
Yeah I was getting that as well so it seems to be something on the DOTS code itself and not any of your code. From all the time that I spent with DOTS I didn't notice that causing any issue so you can just ignore that message, assuming that it is indeed thrown by the Entities package itself and not a memory leak that you caused in your own code
Are you using Allocator.Persistent anywhere in your code?
was waiting for this !BTW Love ur vids