How benefitial is Unity DOTS for normal games?

2.6k views Asked by At

I know that the big benefits of DOTS and ECS can be seen when the game contains a lot of objects which hold the same data, so that they can be put together in chunks of memory and easily iterated through.

My question is: I'm doing a normal game, that doesn't contain thousands of objects that hold the same data, quite the opposite: there are a lot of objects that contain different data and behaviours. Would it still be benefitial to use DOTS?

I know in terms of memory, it is benefitial, in the sense that only the useful things are broght into play, but in a situation where the big benefits of DOTS (thousands of similar objects) are not present, how should I decide to use it or not?

1

There are 1 answers

0
Ruzihm On BEST ANSWER

Unity's DOTS intro tutorial has this to say about the benefits of using DOTS at this point in time:

Unless you are immediately seeking performance improvements in the short or medium term, it can be hard to determine if or when to move to DOTS.

DOTS is highly likely to provide some level of performance improvement in almost every application. Areas include performance, battery life, iterating, and project scalability. You won’t see any performance degradation by moving to DOTS, but assessing the cost of moving to DOTS is crucial, especially for projects when only small improvements are gained. For all applications, DOTS is suitable for working with large amounts of data, such as open world environments or complex structures that use large amounts of the same materials. DOTS is also suitable for repetitive elements by sharing common data across instances to reduce memory accesses.

It’s important to consider that DOTS is going to help you develop high-quality content in the future that a Unity without DOTS might struggle to deliver. For example, the standard games and Unity projects of today were the AAA games of the past. You will need to adopt DOTS to stay competitive in the future.

For different verticals, DOTS is can be suitable for different solutions:

For AEC applications:

  • DOTS is suitable for working with large data sets and for ensuring scalability of content.

    • DOTS is ideal for large interactive maps and environments with lots of models and repetitive content such as buildings and roads.

    • DOTS is suitable for complex engineering visualisations that emulate real word environments on a large-scale. For example, factory and infrastructure design on a granular scale are ideal for DOTS.

For automotive applications:

  • Simulations and Visualizations for Autonomous Driving

    • DOTS is perfect for large traffic and pedestrian simulations which require thousands of donation agents moving and interacting in realistic ways.

For game indie devs and freelancers:

  • DOTS can help you offload some expensive operations in your game and help improve performance, especially for repetitive processes.

  • Many lightweight games, such as for mobile, do not come close to maximizing hardware performance. Even for those that do, this may not be a primary concern. However, as games continue to evolve and increase the demands of hardware, it is sensible to prepare for using DOTS in the future. Again, Project Tiny provides a solution for developing smaller apps and games using DOTS.

  • In cases where you may not have an immediate need to start working with DOTS, it’s a great idea to get ahead of the curve and upskill yourself in DOTS so that you are ready for when DOTS is standard practice in Unity development.

For games studios:

  • DOTS in its current format can help you start to reach scale and performance you couldn’t achieve before, in Unity or otherwise. In particular, extended battery life time and thermal control alongside the nature of code reusability afforded by DOTS are key benefits. Extended performance in these areas also allows you to develop for more low-end devices, especially outside Western markets, that have otherwise restrictive hardware limitations.

  • Having R&D groups begin to work in DOTS will help you begin to understand the best approaches you can take going forward, and will inform you of the current features and areas that will give the most performance benefits and development impact. DOTS does not aim to replace the role of engine teams, but frees up engineers to innovate in their own areas of expertise, such as shadows or shaders.

So basically, Unity claims these things about adopting DOTS now:

  • You don't have anything to lose performance-wise (although some things may require a more effort to implement in DOTS than others)

  • Even if you aren't controlling "many" objects, DOTS can be more efficient where you are doing duplicate operations, and this can make a meaningful difference when considering low-end hardware or resources such as battery use.

  • On top of the material benefits of adopting DOTS now, it also acts an educational experience for people or organizations to use it on later projects when the material benefits would be greater.