You are currently viewing My Small Experience in DOTS Unity

My Small Experience in DOTS Unity

 91 total views

by Rushidan Islam Nirjhor

I’ve been working with DOTS in Unity for the last month or so and my journey so far has been a mixed bag of sumptuous victory and agonizing sessions of hair pulling as I grind my way through the wonderful yet cumbersome world of Data Oriented Design. Heck, even setting up a project with the required packages was quite a chore in itself. Then when I started learning about how things work in DOTS and ECS, it felt like I was learning Unity all over again. Especially since good resources related to DOTS, be it Unity’s own documentation or third-party tutorials, are seemingly sparse and at times difficult to comprehend. And DOTS still being in its early stage of development, lacks simple to use implementations of some very common features like skinned mesh animations and various other useful Unity components. Also, the difficulty with coding in Data Oriented Design only got worse as I tried to attempt more complex mechanics in my games.

But all those hours of mind wringing, trying to wrap my head around this unconventional way of coding, was made worth while when I got to witness the power that Unity DOTS beholds. My two-year old mobile phone was able to run over ten thousand physics driven entities on screen at the same time without a hitch which was quite unthinkable before. And as I scratched my head trying to figure out ways to implement different game mechanics with DOTS, I realized that while it is indeed more difficult to do so compared to tradition OOP, it is pretty doable. It just requires a different way of thinking about the design and a lot of work arounds at times.

So, even though doing the most basic of tasks in the old OOP fashion out of habit constantly greeted me with pesky errors, working my way around them allowed me to learn about this completely different way of structuring game logic which was an amazing learning experience. And what I learnt was that even though DOTS ensured performance by default, getting to that “Default” can be quite the challenge. But the performance gains I got through this challenge was enough to get me coming back for more.