I've been playing around with DOTS here and there since its inception, and it's a treat to finally "get it" enough to create gameplay! I'd like to write some tutorials for it as I learn new things, but there's a LOT of basics I still need to figure out first. God, I wish the documentation was better!
Awesome, glad to hear you've hit your stride with DOTS development! Hope you do get to post some tutorials, the more the merrier! And out of curiosity, is there any particular part(s) of the documentation that are lacking for one reason or another?
@@TurboMakesGames The issue I have is a lack of examples. Like SystemAPI is one of the most useful tools in simplifying a system, but NONE of its methods have examples showing how you would use them. It took me a few days just to find out how GetComponentLookup was supposed to be implemented with parallel jobs.
Congrats on starting development on your game, and glad to hear the DOTS videos have been helpful! Feel free to share progress on your game in our Discord community! tmg.dev/Discord
I LOVE these kinds of videos! I'm finishing my IT thesis and doing an object vs. data-oriented design comparison in Unity. These videos help set everything for the general public, who may need to be more knowledgeable of data orientation, helping prepare my thesis defense much more accessible. Thanks a lot for the work!
Now that DOTS is fully supported for production, I want to start learning it. So will you be making an updated tutorial on it or has nothing significant changed from your last full DOTS tutorial?
+1 from me. I want to start learn the latest DOTS. I dont want to stuck with deprecated methods etc that is not used anymore. Since DOTS was on development, i am pretty sure there are significant changes
I certainly plan on making some more full tutorials, but those do take a long time. For now, the Zombies one is a great starting point and I've been keeping a blog post updated (linked in that video's description) that goes over any of the changes from that video to the most recent version of DOTS. Thankfully most of the changes are just minor API changes.
Many thanks, Johnny. Very good introduction to the new DOTS in Unity. While having a bit of experience with C# but not much with Unity, I think I will use the opportunity to get started learning it with DOTS in mind. I like the idea of data driven design. Looking forward to learn more from your fantastic content. Thank you for doing this.
Oh that sounds sweet! Hope it works out for you! Feel free to share your tool in our Discord community or ask any questions if you need help - tmg.dev/Discord
What a great video. I have one CAD model with many complex submodels. Like up to 13 000. Would it be recomended to just transition that CAD model to DOTS or will it be a nightmare when interacting with it using the standard VR interaction system with grabbing and such. I can't move the entire project to DOTS as we have built a lot and now need to optimize for performance. Right now we are looking in to complex mesh baking and LODs.
I haven't seen it affect build size in any significant way. Build size mostly comes from assets (i.e. meshes, textures, audio clips, etc.) rather than entity data.
Excellent Vid! Easy to understand for the somewhat hard of hearing. Question: It sounds like ECS would be ideal for larger, open world, multiplayer games...would I be correct in assuming this?
Thank you so much! ECS certainly benefits the game types you discussed, but that is far from an exhaustive list. ECS can also work very well for smaller games with dynamic entity structures
According to the DOTS roadmap - unity.com/roadmap/unity-platform/dots - ECS animation is currently in development and ECS based navigation is under consideration for development. Though there are a bunch of 3rd party options for implementing animations in ECS projects - forum.unity.com/threads/dots-animation-options-wiki.1339196/ There are other assets for DOTS pathfinding as well, here is my favorite - assetstore.unity.com/packages/tools/ai/agents-navigation-239233?aid=1101l9vRP
I'm creating a PONG-styled competitive game, and I really don't know what to choose, Netcode for Game Objects or Netcode for entities, what's better for this type of game?
Great tutorial! So to be clear, ECS helps if you have a lot of objects that want to run logic, but if you just have a lot of objects with a lot of vertices ECS or DOTS is not the tool to increase performance?
Really depends on what you are doing with things in the different scenarios you mentioned. But to generalize, ECS gives you optimizations for memory access and CPU processing, the DOD architecture does give you _some_ performance benefits when it comes to rendering, but not as significant of gains that you'll see on the CPU side. That being said, if you want to simulate all those vertices for say your own soft-body physics system, then DOTS/ECS will be great!
Question: are most existing AssetStore assets compatible with ECS? I.e. can an asset made with conventional GameObjects be imported seamlessly into an ECS project?
Unfortunately no, most code included in asset store products is monobehaviour. You would need to make a script bridging between the two worlds and there is no guarantee future updates won’t break your bridge script. I would probably try to make a custom minimum viable product of what you want in dots at this point.
I lost interest when I found out animation wouldn't work with DOTS. Has that been changed? There were dozens of reasons that it interested me, but that one issue was enough to make me forget about it for a couple of years.
There isn't yet a "Native ECS-Based" animation solution, however there are a ton of options to get animations working with DOTS. Here is a comprehensive list: forum.unity.com/threads/dots-animation-options-wiki.1339196/
Your old tutorials are great but they are also kind of outdated, it's a pain to try and figure out differences between versions. Especially now that DOTS is fully released. Do you plan on making new small project tutorials on DOTS? Not complaining, just wondering.
Also yes, this, not at him or the tutorials but rather at the instability of the resources, I'm dumb so following along is not going to work off the bat, I need to practice a lot. But then you find that TransformAspect is gone replaced with I believe it was LocalTransform and the so on, meh. My saving grace is on OOD I was getting into making my own stack data and learned how there were properties for that as well so understanding what DOTS was doing became easier.
@@TurboMakesGames I'd personally prefer you to take an existing game Vampires Survivor (that you made recently on GameJam) or diplomacy is not an option or starcraft etc and made a series of "DevLogs" where you actually show and teach how step by step from start to finish make the game using ECS approach (if it would be somehow multiplayer that would be awesome. I am sure Unitechs would like that as well):)
@@TurboMakesGames I'd also jump on the "completed project" train. Though, I suppose, it doesn't really have to be an actual completed project, I'm more so worried about the large void between "I can use ECS" and "I can actually make a fully polished game". With Unity rolling out actual documentation recently, getting to that first statement is no longer too daunting. But going to the second statement... How does one do animations and pathfinding or, the less talked about, particles and audio and UI and all the other things that a game needs but ECS doesn't really have an answer for. And how does one do that without just canceling out the whole ECS thing? Doesn't make much sense to just throw a particle system on all your entities, after all, because then you just do double the work and gain nothing. That's where I, personally, am at right now. I can make something resembling a game, but I can't make something worthy of steam. (Already wrote a better comment yesterday ,which appears to either be gone or never made it. Hmmm... Must've just pressed enter, rather than clicking save :
Is DOTS Physics mainly for when you have multiple physics objects running or is it also for making one physics object run and look better? Does it help much with improving perfomance even if it's just for one character or vehicle? Can DOTS be used to optimize the terrain? Since, I notice unity's terrain has a performance issue.
It really depends on what you are doing with that one entity for the amount of performance increase you will see. If you aren't really doing anything too complex, then you probably won't see much of a performance benefit. However if you are constantly doing a bunch of raycasts, collider casts, or other physics checks then you'd probably see a more significant performance gain. What kinds of performance issues have you been having with terrain? Terrain in ECS works basically the same as it is just a large mesh. If you're running into issues because your terrain is too big, it might be worth it to break your terrain into smaller sections and load them in as needed. Or check out the Unity Asset Store, I know there are a lot of good high performance options for terrain there
- I think every Dev should learn about multithread in general, not just DOTS specific. - imagine you build an RTS game with 400 units running around. Multi-thread will boost the fps like drug.
As I understand, it might be easier to think of an 'Entity' as a 'Composition' instead; a composition of data components. Systems are merely responsible for manipulating the data components of these compositions.
Is your DOTS 1.0 prerelease tutorial (zombie brain game) still applicable to current release version? I'd love to take a nose dive into DOD as someone whose pretty much only ever done OOP.
Yep! It is still a great place to start. There have been some minor API changes, but I've been keeping a blog post updated (linked in the comments/description of that video) detailing the changes. All the best!!
I'll be honest, it feels hacky. Putting the RW and RO stuff aside it's very much like the wild wild west when it comes to declaration usage. With that said it's verging on being its own language so in a way a person using DOTS couldn't directly translate that to any other engine. The overall DOD is similar but the definitions of things are uniquely Unity. At least that's my take away.
Totally agree on that learning DOTS is akin to learning a new language. And yes, everything is VERRRY Unity specific, but at least for me, I don't think I'd ever put myself in a situation where I'd want to port a project over to a new engine without doing a ground up rebuild anyhow.
I love that you make these videos and are pretty much carrying DOTS solo. I will not use it for the foreseeable future. Unity's success is that it's easy to use, and that it's C# OOP. Which means any C#, Java, Python or JS developer can jump in and fairly quickly get the hang of it. I wish they would spend more time improving what they already have instead of coming out with new products which are usually worse than the original (UI Toolkit, New Input System). If they focused on OOP they could support inspector Interfaces and actually give Dependency Injection a proper go (they continually use 3rd party DI frameworks in official unity apps). Unity Dots is never going to be as fast as Rust so I don't know why they're putting all this effort to have a convoluted new language (HPC) with new syntax that is only applicable to this one very specific application. Just a really bad business move from Unity over all.
Appreciate the perspective! Though I don't necessarily agree that working on DOTS is taking away focus or resources from regular OOP Unity as there are dedicated teams for DOTS and many of those people were hired due to their knowledge of data-oriented design. Sure there are still plenty things in regular Unity that need to be improved, but those teams are still intact as well. I think Unity DOTS has been great and there isn't really anything else in the market like it that gives you both high-performance and a full suite of development tools. Most if not all of the developers I've talked to who use it said their idea simply would not be possible without DOTS.
From a pragmatic perspective, Unity still has a lot to offer -when considering pros/cons - benefits/trade-offs with other options. If your game/app release timeline is short, you are less at risk of Unity dropping the ball. My gut: very low risk. I'f you're developing a large AAA game, and/or, say, a 3+ year project, then you'd be considering a different higher risk factor. Just one way to think of it. DOTS+ECS is pretty substantial, and considering if you already have unity expertise, you are at a significant advantage.
Really excellent video! So much knowledge in 30 mins, awesome!
Thank you so much Hugo, I really appreciate that! Hope all is going well with your game 😀
Yes , HE is a fine teacher !
What are you talking about?? No? This doesn't work in a multiplayer game. Theres literally no support for it (yet).
I've been playing around with DOTS here and there since its inception, and it's a treat to finally "get it" enough to create gameplay! I'd like to write some tutorials for it as I learn new things, but there's a LOT of basics I still need to figure out first. God, I wish the documentation was better!
Awesome, glad to hear you've hit your stride with DOTS development! Hope you do get to post some tutorials, the more the merrier!
And out of curiosity, is there any particular part(s) of the documentation that are lacking for one reason or another?
@@TurboMakesGames The issue I have is a lack of examples. Like SystemAPI is one of the most useful tools in simplifying a system, but NONE of its methods have examples showing how you would use them. It took me a few days just to find out how GetComponentLookup was supposed to be implemented with parallel jobs.
I've started a new game this year and I'm taking as a chance to learn DOTS.
Your videos are helping a lot! Thanks a bunch! :D
Congrats on starting development on your game, and glad to hear the DOTS videos have been helpful!
Feel free to share progress on your game in our Discord community! tmg.dev/Discord
I LOVE these kinds of videos!
I'm finishing my IT thesis and doing an object vs. data-oriented design comparison in Unity.
These videos help set everything for the general public, who may need to be more knowledgeable of data orientation, helping prepare my thesis defense much more accessible. Thanks a lot for the work!
So glad to hear this!! All the best with your thesis 😀
Good luck man!!
Another great video! Was cool seeing you on the LTS stream!! Can't wait for you to dig into the weeds of projects made with DOTS!!
Thanks! This was what I was looking for to understand what is DOTS. Amazing job!
So glad to hear it, all the best 😀
You are the best and only who making videos about DOTS and ECS. We needed this thank you so much...
Glad you've been enjoying them 😀
@@TurboMakesGames Actually DOTS ECS are very hard i am not getting "enjoy"... hahah but anyway thanks again
Now that DOTS is fully supported for production, I want to start learning it. So will you be making an updated tutorial on it or has nothing significant changed from your last full DOTS tutorial?
+1 from me. I want to start learn the latest DOTS. I dont want to stuck with deprecated methods etc that is not used anymore. Since DOTS was on development, i am pretty sure there are significant changes
I certainly plan on making some more full tutorials, but those do take a long time. For now, the Zombies one is a great starting point and I've been keeping a blog post updated (linked in that video's description) that goes over any of the changes from that video to the most recent version of DOTS. Thankfully most of the changes are just minor API changes.
@@TurboMakesGames Then its certainly worth watching 1.0 version of it? I will go through and learn it, appreciated your effort!
Many thanks, Johnny. Very good introduction to the new DOTS in Unity. While having a bit of experience with C# but not much with Unity, I think I will use the opportunity to get started learning it with DOTS in mind. I like the idea of data driven design. Looking forward to learn more from your fantastic content. Thank you for doing this.
I got a node tool I been working on for few days for procedural generation. I hope to let nodes use jobs system to speed things up.
Oh that sounds sweet! Hope it works out for you!
Feel free to share your tool in our Discord community or ask any questions if you need help - tmg.dev/Discord
Superb tutorial..!! Thanks..!!
You're welcome, glad it helped!
Thank you, Johnny.
Absolutely, thanks for watching!!
What a great video. I have one CAD model with many complex submodels. Like up to 13 000. Would it be recomended to just transition that CAD model to DOTS or will it be a nightmare when interacting with it using the standard VR interaction system with grabbing and such. I can't move the entire project to DOTS as we have built a lot and now need to optimize for performance. Right now we are looking in to complex mesh baking and LODs.
Does DOTS/ECS affect Build size ? Fewer components should reduce the size of entities, but do you think its substantial enough to consider a switch ?
I haven't seen it affect build size in any significant way. Build size mostly comes from assets (i.e. meshes, textures, audio clips, etc.) rather than entity data.
Excellent Vid! Easy to understand for the somewhat hard of hearing. Question: It sounds like ECS would be ideal for larger, open world, multiplayer games...would I be correct in assuming this?
Thank you so much! ECS certainly benefits the game types you discussed, but that is far from an exhaustive list. ECS can also work very well for smaller games with dynamic entity structures
Any update about dots pathfinding and animation?
According to the DOTS roadmap - unity.com/roadmap/unity-platform/dots - ECS animation is currently in development and ECS based navigation is under consideration for development.
Though there are a bunch of 3rd party options for implementing animations in ECS projects - forum.unity.com/threads/dots-animation-options-wiki.1339196/
There are other assets for DOTS pathfinding as well, here is my favorite - assetstore.unity.com/packages/tools/ai/agents-navigation-239233?aid=1101l9vRP
I'm creating a PONG-styled competitive game, and I really don't know what to choose, Netcode for Game Objects or Netcode for entities, what's better for this type of game?
Great tutorial! So to be clear, ECS helps if you have a lot of objects that want to run logic, but if you just have a lot of objects with a lot of vertices ECS or DOTS is not the tool to increase performance?
Really depends on what you are doing with things in the different scenarios you mentioned. But to generalize, ECS gives you optimizations for memory access and CPU processing, the DOD architecture does give you _some_ performance benefits when it comes to rendering, but not as significant of gains that you'll see on the CPU side. That being said, if you want to simulate all those vertices for say your own soft-body physics system, then DOTS/ECS will be great!
Thack you. Great Video!
Glad you thought so 😊
Really good job!
Thank you so much 😀
LOOOOL the opening comment cracked me up. Good one 😆
😆😆😆
Hope you're doing well Ciro!!
@@TurboMakesGames I am! Will I see you at GDC perhaps?
@@CiroContinisio Yes I will be there!!
Excellent summary!! Looking forward to June 30 Q&A. Don't forget about Hostile Mars being a badass game built on DOTS.
Thanks, it's gonna be a fun time 😀
Tuuue - any word on a release date!?!?
@@TurboMakesGames Probably not for a year or two. But it's currently on steam and people have testing and playing it a lot.
Question: are most existing AssetStore assets compatible with ECS? I.e. can an asset made with conventional GameObjects be imported seamlessly into an ECS project?
Unfortunately no, most code included in asset store products is monobehaviour. You would need to make a script bridging between the two worlds and there is no guarantee future updates won’t break your bridge script. I would probably try to make a custom minimum viable product of what you want in dots at this point.
I lost interest when I found out animation wouldn't work with DOTS. Has that been changed? There were dozens of reasons that it interested me, but that one issue was enough to make me forget about it for a couple of years.
There isn't yet a "Native ECS-Based" animation solution, however there are a ton of options to get animations working with DOTS. Here is a comprehensive list: forum.unity.com/threads/dots-animation-options-wiki.1339196/
Your old tutorials are great but they are also kind of outdated, it's a pain to try and figure out differences between versions. Especially now that DOTS is fully released.
Do you plan on making new small project tutorials on DOTS?
Not complaining, just wondering.
Yes absolutely! Is there anything specific you'd like to learn or have updated? or just want to see complete projects?
Also yes, this, not at him or the tutorials but rather at the instability of the resources, I'm dumb so following along is not going to work off the bat, I need to practice a lot. But then you find that TransformAspect is gone replaced with I believe it was LocalTransform and the so on, meh.
My saving grace is on OOD I was getting into making my own stack data and learned how there were properties for that as well so understanding what DOTS was doing became easier.
@@TurboMakesGames I want to see complete projects man.
@@TurboMakesGames I'd personally prefer you to take an existing game Vampires Survivor (that you made recently on GameJam) or diplomacy is not an option or starcraft etc and made a series of "DevLogs" where you actually show and teach how step by step from start to finish make the game using ECS approach (if it would be somehow multiplayer that would be awesome. I am sure Unitechs would like that as well):)
@@TurboMakesGames I'd also jump on the "completed project" train. Though, I suppose, it doesn't really have to be an actual completed project, I'm more so worried about the large void between "I can use ECS" and "I can actually make a fully polished game". With Unity rolling out actual documentation recently, getting to that first statement is no longer too daunting. But going to the second statement... How does one do animations and pathfinding or, the less talked about, particles and audio and UI and all the other things that a game needs but ECS doesn't really have an answer for. And how does one do that without just canceling out the whole ECS thing? Doesn't make much sense to just throw a particle system on all your entities, after all, because then you just do double the work and gain nothing. That's where I, personally, am at right now. I can make something resembling a game, but I can't make something worthy of steam. (Already wrote a better comment yesterday ,which appears to either be gone or never made it. Hmmm... Must've just pressed enter, rather than clicking save :
Great Vedio!
Very cool video
Awesome, glad you thought so!!
Is DOTS Physics mainly for when you have multiple physics objects running or is it also for making one physics object run and look better? Does it help much with improving perfomance even if it's just for one character or vehicle? Can DOTS be used to optimize the terrain? Since, I notice unity's terrain has a performance issue.
It really depends on what you are doing with that one entity for the amount of performance increase you will see. If you aren't really doing anything too complex, then you probably won't see much of a performance benefit. However if you are constantly doing a bunch of raycasts, collider casts, or other physics checks then you'd probably see a more significant performance gain.
What kinds of performance issues have you been having with terrain? Terrain in ECS works basically the same as it is just a large mesh. If you're running into issues because your terrain is too big, it might be worth it to break your terrain into smaller sections and load them in as needed. Or check out the Unity Asset Store, I know there are a lot of good high performance options for terrain there
Informative video, no wonder why you are known as the DOTS man.
- I think every Dev should learn about multithread in general, not just DOTS specific.
- imagine you build an RTS game with 400 units running around. Multi-thread will boost the fps like drug.
As I understand, it might be easier to think of an 'Entity' as a 'Composition' instead; a composition of data components. Systems are merely responsible for manipulating the data components of these compositions.
That's a good way to look at it!
In any cases that you guys fail to use DOTS on Unity, move to Rust/Bevy for free multi-threaded model.
Rust/Bevy is a great option, I've heard lots of good things!
Are you gonna make other example games with ECS course?
Yep! The complete projects take a ton of time, but I'll be in a position where I can start working on the next one soon!
Should have called the video "DOTS and DON'TS"
Sad.
Gah! I'll have to save that one for DOTS 2.0 😉
@@TurboMakesGames great shame to miss such an opportunity.
God help you! 😅
Is your DOTS 1.0 prerelease tutorial (zombie brain game) still applicable to current release version? I'd love to take a nose dive into DOD as someone whose pretty much only ever done OOP.
Yep! It is still a great place to start. There have been some minor API changes, but I've been keeping a blog post updated (linked in the comments/description of that video) detailing the changes. All the best!!
I'll be honest, it feels hacky. Putting the RW and RO stuff aside it's very much like the wild wild west when it comes to declaration usage. With that said it's verging on being its own language so in a way a person using DOTS couldn't directly translate that to any other engine. The overall DOD is similar but the definitions of things are uniquely Unity.
At least that's my take away.
Totally agree on that learning DOTS is akin to learning a new language. And yes, everything is VERRRY Unity specific, but at least for me, I don't think I'd ever put myself in a situation where I'd want to port a project over to a new engine without doing a ground up rebuild anyhow.
I love that you make these videos and are pretty much carrying DOTS solo. I will not use it for the foreseeable future. Unity's success is that it's easy to use, and that it's C# OOP. Which means any C#, Java, Python or JS developer can jump in and fairly quickly get the hang of it. I wish they would spend more time improving what they already have instead of coming out with new products which are usually worse than the original (UI Toolkit, New Input System). If they focused on OOP they could support inspector Interfaces and actually give Dependency Injection a proper go (they continually use 3rd party DI frameworks in official unity apps). Unity Dots is never going to be as fast as Rust so I don't know why they're putting all this effort to have a convoluted new language (HPC) with new syntax that is only applicable to this one very specific application. Just a really bad business move from Unity over all.
Appreciate the perspective! Though I don't necessarily agree that working on DOTS is taking away focus or resources from regular OOP Unity as there are dedicated teams for DOTS and many of those people were hired due to their knowledge of data-oriented design. Sure there are still plenty things in regular Unity that need to be improved, but those teams are still intact as well.
I think Unity DOTS has been great and there isn't really anything else in the market like it that gives you both high-performance and a full suite of development tools. Most if not all of the developers I've talked to who use it said their idea simply would not be possible without DOTS.
...and 50 cent bulletproof.
LMAO
A truly groundbreaking game in its own right.
Should you use Unity Dots? Sponsored by Unity...I wonder what the conclusion is going to be
What was the conclusion?
50 CENT BULLETPROOF MENTIONED LETS GOOOO
Nowadays, the question (unfortunately) is if you should even use Unity at all.
From a pragmatic perspective, Unity still has a lot to offer -when considering pros/cons - benefits/trade-offs with other options.
If your game/app release timeline is short, you are less at risk of Unity dropping the ball. My gut: very low risk. I'f you're developing a large AAA game, and/or, say, a 3+ year project, then you'd be considering a different higher risk factor. Just one way to think of it. DOTS+ECS is pretty substantial, and considering if you already have unity expertise, you are at a significant advantage.
You couldnt use this in any kind of multiplayer game. So dont watch it
Answer is no because you shouldn't use Unity at all.