Search Unity

Games Focus: Expanded scale for ambitious games

November 23, 2022 in Technology | 15 min. read
Games Focus: Expanded scale for ambitious games | Hero image
Games Focus: Expanded scale for ambitious games | Hero image

This is the ninth blog in our Games Focus series, which highlights key product development initiatives for the year ahead and beyond. In this installment, we cover the status, upcoming release plans, and future vision for enabling you to build more ambitious games with Unity.

Hey there! I’m Isaac Seah, product manager with the DOTS team at Unity, where I help drive the ECS for Unity (Entity Component System) product strategy.

The team has been working to bring you better tools to deliver incredible games to your players. Before joining Unity, my experience with Unity was as a creator – poring through documentation and videos, spending hours learning how to master the engine to create wonderful games and experiences.

As a creator, I can’t express how excited I am about the upcoming release of ECS for Unity in Unity 2022.2 Tech Stream. I think it’s going to be a game-changing time for many of us (pun intended).

In this edition of the Games Focus series, we’ll talk about the benefits seasoned Unity creators can get with ECS for Unity, how early adopters have used it, and what’s planned for 2023 and beyond.

Powering ambitious games

Power ambitious games

Our mission with ECS for Unity is to enable you to build more ambitious games with Unity. We do this by providing more predictable processing and control over data layout in memory, as well as by helping you to achieve efficient parallelism easily, even when you’re challenged with an explosion of gameplay requirements.

In 2021, Unity powered over 50% of games on the market, and users continue to build great games without ECS. ECS for Unity brings value to seasoned Unity creators who have the experience of shipping Unity titles, understand the limits of the GameObject and the MonoBehavior architecture, and are actively looking for more control and determinism. ECS for Unity enables experienced developers to manage memory more precisely, get full control over the game code processing of gameplay frames, and ultimately fit more complex gameplay into challenging device constraints.

What’s ready for you today

Megacity, a sample available starting with Unity 2022.2 Tech Stream, showcases how users can achieve large-scale streaming and rendering of thousands of entities at a stable frame rate.
Megacity, a sample available starting with Unity 2022.2 Tech Stream, showcases how users can achieve large-scale streaming and rendering of thousands of entities at a stable frame rate.

Starting with Unity 2022.2 Tech Stream, ECS for Unity comes with the following packages:

  • Entities: A foundational package that enables ECS in Unity
  • Unity Physics and Havok Physics for Unity: ECS-compatible physics engines that enable deterministic large-scale simulations
  • Netcode for Entities: A netcode package that supports the creation of ambitious multiplayer games
  • Entities Graphics: A graphics package which enables batching large amounts of ECS data to Unity’s Scriptable Render Pipelines (SRP), including Universal Render Pipeline (URP) and High Definition Render Pipeline (HDRP)

Along with ECS for Unity, you can also continue to take advantage of the production-ready Burst compiler and the C# Job System to address your job scheduling and script compilation needs. Most importantly, with Unity 2022.2 Tech Stream, ECS for Unity is fully supported for production, so you can easily get access to support channels and success plans to get even more out of ECS.

An optional framework compatible with the GameObject ecosystem

ECS for Unity enables you to easily interoperate between GameObject data and ECS data through familiar authoring components.
ECS for Unity enables you to easily interoperate between GameObject data and ECS data through familiar authoring components.

To improve the experience of working with ECS for Unity, we’ve made many features of the familiar Unity authoring experience available in ECS for Unity.

ECS for Unity is an optional framework that’s compatible with the GameObject ecosystem. Here, we’ve introduced authoring workflows that are fully integrated into the Unity Editor with tools such as the component data, archetypes and entities view, a fresh journaling window, entity debugger, profiling tools, and data modes – providing the ability to navigate between authoring and runtime data easily.

Leveraging ECS in production for control and determinism

Electric Square leveraged many aspects of ECS for Unity to build their fast-paced Apple Arcade racing game, Detonation Racing.
Electric Square leveraged many aspects of ECS for Unity to build their fast-paced Apple Arcade racing game, Detonation Racing.

In Electric Square’s Detonation Racing, the team used ECS for Unity to achieve a fast-paced iOS racing game with large-scale streaming. When building the game, the deterministic qualities of ECS were actively used in quality assurance and gameplay design processes. Electric Square was able to leverage the determinism of ECS for Unity to accurately recreate scenarios for game designers so they could find the perfect explosion effect for Detonation Racing. Here, game code based on ECS provided control and determinism, creating optimization opportunities at scale and new game code possibilities.

Jonas from Electric Square walks us through how deterministic behavior from ECS allowed them to recreate scenarios that retain the same gameplay behavior each time.
Jonas from Electric Square walks us through how deterministic behavior from ECS allowed them to recreate scenarios that retain the same gameplay behavior each time.

ECS for Unity also allows adaptation to major gameplay changes by enforcing a clear separation of data and game logic. For Electric Square, the strong componentization of game code helped them efficiently isolate gameplay features and systems. This enabled developers to jump into gameplay code to make code and data changes easily when solving gameplay challenges.

When used with the Burst compiler and C# Job System, ECS for Unity enables efficient parallelism and helps game code to behave in predictable ways for both execution and memory allocations and deallocations. With robust control over device memory, Electric Studio was able to fit complex gameplay to challenging device requirements and optimize caching strategies.

Spikeless streaming and memory-efficient large-scale rendering

Selling over 1 million copies in their first week, Stunlock Studios successfully leveraged ECS for Unity to build their hit title, V Rising.
Selling over 1 million copies in their first week, Stunlock Studios successfully leveraged ECS for Unity to build their hit title, V Rising.

Ambitious games often require an efficient data pipeline to enable the streaming and rendering of complex, large-scale game experiences while fitting the memory and processing constraints of low-end to high-end devices.

V Rising data points: 160K in-game interactable objects, 5 square kilometer gameplay map, 350K server-side entities

One example in practice is Stunlock Studios, where they made use of the Entities Graphics package and Subscenes in their gothic, open world, fantasy survival game, V Rising. With these tools, they streamed more than 160,000 interactable objects in the game world, distributed on a five km2 map, for a total of 350,000 entities in a given server.

The Entities Graphics package also enabled Stunlock Studios to take advantage of the performance and scalability boost of ECS to render massive and vibrant scenes while working with the familiar HDRP. The result is a game with an incredible feeling of expansiveness and immersion.

Deterministic large-scale simulations and Havok Physics for Unity

Megacity showcases how Unity Physics enables thousands of active colliders, moving vehicles and physics interactions at scale.
Megacity showcases how Unity Physics enables thousands of active colliders, moving vehicles and physics interactions at scale.

If you are looking to build massive, deterministic, large-scale simulations with hundreds or thousands of physics colliders, ECS for Unity includes the Unity Physics and Havok Physics for Unity packages. Unity Physics, an ECS-compatible deterministic and stateless physics engine, comes with a robust set of physics solver components that includes rigid bodies, joints, collision detection, and other queries that allow you to build performant and deterministic physics worlds.

ECS for Unity also powers Havok Physics for Unity, which provides the industry-leading deterministic physics simulation and collision detection used in some of the world’s best-selling games. With Havok Physics for Unity, you have access to optimized caching that provides enhanced performance and stability for large worlds and complex physics scenes.

With Unity 2022.2 Tech Stream, creators can dive into Megacity, a sample with a wide array of dynamic objects illustrating how thousands of active physics objects interact efficiently at scale.

Supporting the creation of ambitious multiplayer games

ECS Racing, a competitive multiplayer racing sample
ECS Racing, a competitive multiplayer racing sample

ECS for Unity also offers creators many benefits for creating multiplayer games.

The Netcode for Entities package is an optional companion to ECS for Unity that provides an ECS-based server authoritative high-level networking library with optimized serialization performance, physics prediction, remote player prediction, and the ability to switch between prediction and interpolation at runtime. Starting with the Unity 2022.2 Tech Stream, creators will also have access to a competitive multiplayer racing sample that showcases various features like client/server architecture with client-side prediction, interpolation, and lag compensation.

What’s next

A collection of authoring tools provided in ECS for Unity in Unity 2022.2 Tech Stream
A collection of authoring tools provided in ECS for Unity in Unity 2022.2 Tech Stream

With the general availability of ECS for Unity, the Burst compiler, and the C# Job System creators are now equipped with a strong foundation to build more ambitious games with Unity. However, the work doesn’t stop here, and we are currently focused on the following areas.

Consolidation of ECS workflows: With the release of ECS for Unity, we expect to see a wide range of new use cases emerging. Our short-term focus will be observing how you leverage ECS for Unity, and acting on opportunities to further consolidate workflows and provide a better experience. We’ve also heard how many of you would benefit from a good character controller to get started. This is why we acquired a powerful ECS-based character controller, Rival, which has been built for extensibility and performance with networking in mind.

Enabling cross-play multiplayer game creation: Enabling multiplayer games continues to be a big focus for the team, and we’re determined to close any remaining gaps to provide an efficient out-of-the-box support for many genres of multiplayer games. These include working on cross-platform determinism to simplify cross-play development or simply supporting the need for determinism in multiplayer game code.

Enabling open-world game creation: We are also developing more robust open-world support in Unity, specifically around the ability to scale content. This is currently being developed on two main fronts, animation and worldbuilding.

We’re progressing towards a highly performant, customizable 3D animation system that leverages data-oriented technologies. While ECS for Unity offers a very powerful foundation to build larger games, we’re ensuring that the upcoming animation system remains accessible to GameObject gameplay so you can continue to work with whichever workflows you are most comfortable with. In the meantime, we continue to keep a strong focus on Mecanim stability and performance, backporting fixes where possible.

With worldbuilding, we’re launching a new Spline authoring framework in Unity 2022.2 Tech Stream, which will enable developers and technical artists to create tools for drawing geometry like rivers or roads with custom components. The Splines authoring framework will continue to evolve, with improvements to artists workflows for spline objects like branching, merging, extruding, and more. Finally, we’re also working on better artist controls for environment workflows, including overlays for terrain, scattering improvements and managing terrain detail density.

Do check out the latest Spline tool as we continue to add more tooling to make worldbuilding in Unity more accessible.

Resources for getting started with ECS for Unity

ECS for Unity introduces a fresh paradigm for game development with Unity which may be new to many of you. The following guides, documentation and samples can help you get started quickly:

The team is excited to learn about your experiences with ECS for Unity and the games that you’re building. We hope you’ll share your feedback, and we hope to see your questions and comments for this post in our forum or Unity’s official discord channel. You can also visit our public roadmap and give us your feedback and thoughts about our roadmap and features.

Stay tuned for the final post in our Games Focus series, which will discuss takeaways from each of the focus areas we’ve explored over the past few months.

November 23, 2022 in Technology | 15 min. read
Related Posts