Using Unity DOTS: A 101 of the Technology to Create Highly Performant Immersive Experiences for the Metaverse

Developing a Metaverse Strategy

Poor application performance has been one of the greatest limiting factors to significant consumer adoption of immersive Metaverse experiences. Depending on improvements in hardware alone is insufficient. Rethinking data architecture and using a data-oriented technology stack (DOTS) holds incredible potential for dramatic throughput and performance improvements that can scale to never before seen levels on hardware that exists today.

Launched in 2016, Unity Technology has been developing DOTS as an alternative to object-oriented design (OOD) for some time. While they have continued to develop improvements over the past 6 years, use in production has been slow in great part because of the technical learning curve. For technical teams with the skills, however, using DOTS creates a compelling competitive advantage for early adopters to implement advanced parallel processing without adding risk to core applications. Dimension X has developed expertise thanks to Scott Robertson, co-founder and CEO of Dimension X, who was an early DOTS developer participating as a client leader with strong ties into the Unity DOTS working team.

This post serves as an entry point for companies or developers incorporating this technology into projects to understand its value and take action.

DOTS background

DOTS is a Unity-specific implementation of Data-Oriented Design (DOD) that began in 2016. This stack consists of three core components plus a host of support packages that expand its feature set further:

  • Job System lets you convert functions into highly performant and thread safe ”jobs” that can then be executed across all available threads on the host CPU.
  • Burst Compiler is a compiler that translates from IL/.NET bytecode to highly optimized native code using LLVM. Burst is used in conjunction with Jobs to provide highly optimized vectorized assembly code capable of executing SIMD and MIMD operations across all available threads.
  • Entity Component System (ECS) is the core of the new Unity DOTS workflow that includes 3 sub components:
    • Entities – simple thread safe data structures, comprised primarily of pointers and identifiers, that represent all objects within your application’s “world”,
    • Components – simple thread safe data structures stored in like type arrays that contain all of your entity data in fast native continuous memory blocks and
    • Systems–the logic that transforms the component data from its current state to its next state through Bursted Jobs.

Additional Packages – Unity provides and readily releases new game packages routinely; providing additional functionality like Physics, Rendering. Beta and experimental packages.

The core Unity DOTS team regularly publishes roadmap updates including this Sept 2022 post from Laurent Gibert. We expect to hear more updates at Unity Unite, Nov 1-2, 2022.

Data Oriented Design (DOD) originally saw mass utilization starting in 2000 with the XBOX 360 and the Playstation 3. Born out of the need to dedicate more transistors to GPU over CPU, DOD made it possible to leverage parallel processing efficiently and accomplish complex workloads without increasing CPU costs.

Software programs have relied heavily on the single-core clock speeds of CPUs and often run into the Von Neumann Bottleneck, in which throughput is limited due to the relative ability of processors compared to top rates of data transfer. This bottleneck relates to the speed of memory access. Computer scientists have developed ways to increase the bandwidth of memory in and out of the processor including multi-threading and parallel processing. DOTS is one of these parallel processing strategies.

You can learn more from this Unity DOTS tutorial

DOTS’ relevance to the Metaverse?

The Metaverse is the next evolution of the internet providing additional layers of immersion and interaction across a spectrum of devices and environments from simple to complex including full 3D worlds with hundreds of thousands of real-time interactions between players, objects, and other Non-Playable Characters (NPC). Such environments require massive processing power that overwhelms all but the beefiest of today’s consumer computing devices. Meanwhile, innovators are pushing new boundaries in nanotechnology to create Metaverse devices in ever smaller form factors that unobtrusively fit into the real world. DOTS together with edge computing–placing cloud computational processing nearest to the user via high internet bandwidth speeds–are critical to reduce overall costs and to massive consumer adoption of Metaverse experiences.

Current web 2.0 interactive applications that don’t evolve along with these new technologies will find themselves displaced by others that do.

Important things to know about DOTS

DOTS shrinks the amount of code required to be processed in order to execute a given function and does so in parallel. Smaller instruction sets executed in parallel mean fewer cache misses, fewer CPU cycles required, faster processing times, faster data transfers, greater stability, more headroom for computing, more features, and more complex logic.

Is using DOTS an all-or-nothing gambit? No. It’s entirely possible to leverage DOD without having to commit to it fully. To manage risk, DOD should be implemented where heavy processing happens in every single frame or for multi-frame workloads that process mass quantities of data.

Even though the core technology stack continues to evolve and present some risk, the jobs system and burst compiler are very stable and can be used in production environments. ECS enables complex applications to be run on low-end devices. Also, ECS Entities 1.0 does not replace GameObjects.

In a world of rapidly rising costs and ongoing shortages, DOTS provides a path for more sustainable and efficient applications that can continue to keep pace with growing user demands without growing hardware and energy costs to match.

Applications using DOTS

There is a growing number of applications where DOTS has been employed successfully including these games:

Getting Started Using DOTS

DOTS is a transformational shift in software architecture from objects to data and includes a steep learning curve. A computer science education or equivalent self-learning will likely be necessary.

It’s a fundamental shift in thinking compared to OOD, so expect more veteran developers to have just as much difficulty as newcomers.

There are great educational resources from well established, and reputable sources:

The material in these two books is foundational to understand, plan and deploy a DOTS performance improvement strategy.

Data-Oriented Design by R. Fabian. Buy on Amazon.


Pro .Net Memory Management by Konrad Kokosa. Buy on Amazon.




In addition, these are some of the people we follow who are great Unity DOTS educators:

We’ll try to keep this article current with the latest DOTS technology advances. Send us an email if you know of a resource we should add to this page. Updated as of Oct 28, 2022.

Categories

Other Posts

Scroll to Top