Unity Project DOTS
Performance by Default
Flashback to March 2019, the world was normal, and I got the chance to go to the conference that every game developer wants to go to, GDC. Game Developer Conference (GDC) is an annual conference held in the Moscone Center in downtown San Francisco. There were a couple of big announcements out of GDC that year: Google announced Stadia their online gaming platform, Facebook set out to own mobile gaming, and every Marvel Spiderman presentation were impossible to get into without waiting for hours in line. Yet the most interesting talk for me was one given by two Unity engineers on Project DOTS. Going into the presentation, I had no idea what the project was about, but I realized that what the project was trying to accomplish was super ambitious. Three years later, let us see what’s new with the project and see why the project is more relevant now than ever before for game developers.
What is DOTS?
DOTS stands for Data-Oriented Technology Stack and is crafted for performance. Part of the way it accomplishes this is by using the burst compiler to translate jobified C# code into native code. To do this they use LLVM which I have far too much knowledge of from my compiler course during my undergrad. By transitioning from this object-oriented to a data-oriented design it allows for the creator to reuse code as well as others to have an easier time understanding the work. All of this is to game one main advantage: multithreaded processing. But is this paradigm shift in how games are made worth it?
Unity DOTS consists of 3 main pieces:
Tiny Project from Unity utilizes the DOTS framework to create games that are super small in size. Think about ~100kb for an entire game. One of the use cases where the benefit of using these two frameworks is when you think about mobile games, playable ads, and instant social experiences. While these are current examples, if you think about what technology is on the horizon, the attributes that DOTS and Tiny Project play perfectly into technologies like AR and VR. There is so much more data and processing that needs to go on to run games on these platforms that smaller and faster processing is so important. A laggy AR game ruins the experience and breaks the world that you are trying to put your customers in.
Both DOTS and Tiny Projects are still in preview as of writing this March 2021. To keep up on the current status of the projects check here:
- Unity Tiny Project: https://github.com/Unity-Technologies/ProjectTinySamples
- Unity DOTS: https://unity.com/dots
Look at the two links below and see if you can notice any differences in performance.
Notice the loads times. As you can tell, the tiny project loads way faster!
There is always so much going on in the world of game engines that it can be easy to miss really cool projects like this. DOTS and Tiny opens up lots of possibilities for people to be creative. I’m excited to see what people are able to build with these tools.