Putting the player experience first
How do developers stay focused on gameplay while responding to market demand by simultaneously launching on PCs, consoles, and Nintendo Switch™? How can they tap into the expertise needed to successfully coordinate different renderers, pipelines, and compilers for so many different hardware options? What if a studio prefers to spend time on the player experience rather than tedious backend challenges?
Launching Two Point Campus on multiple platforms
PC, Mac, PlayStation4®, PlayStation5®, Xbox 1, Xbox X|S, Nintendo Switch
Making not managing
The founders of Two Point Studios are highly experienced game developers who chose making over managing – building their visions of SIM games themselves rather than coordinating big teams.
And as senior engineers, they had worked with a number of commercial and proprietary development engines. For game development at Two Point, they chose Unity. They preferred C# to C++, and, as a startup, they had to show demos, prototypes, and gameplay within months. For cofounder and technical director Ben Hymers, “Unity was the obvious choice for getting things done quickly. Not to mention launching simultaneously on PCs, consoles, and Nintendo Switch.”
Nintendo Switch is a registered trademark of Nintendo.
- Optimized game logic for different hardware environments using Unity’s Data-Oriented Technology Stack (DOTS), including the Burst compiler and Unity’s Entity Component System (ECS) framework
- Managed high-quality rendering on all platforms with one rendering engineer using the Unity Universal Render Pipeline (URP)
- Saved six months and three to four engineers by choosing Unity instead of building an in-house engine
- Used 90% of shader code across all platforms without modification
Keeping it all about the SIMs
“Just the right side of chaos” is how Hymers describes the creative process at Two Point. The founders worked together on SIMs Black & White and Theme Hospital at other studios, and the latter inspired Two Point’s first game, Two Point Hospital, which launched in 2018. It subsequently won the 2020 Webby Best Game Design award.
According to Richard Brooks, a senior engineer at Two Point, choosing their follow-up game’s theme was both logical and practical. “Hospitals and colleges share a lot of the same types of infrastructure and both can believably host the craziest characters,” he explains. The team used a lot of their own “silly University experiences” to build out their most recent release, Two Point Campus.
Orienting entities with ECS
Two Point Campus is a relatively large game with complex game logic driven by a large number of component types. Given the goal of a simultaneous multiplatform launch, the team decided early in development to optimize the game logic and make full use of Unity’s Entity Component System (ECS), the core of the Unity multithreaded Data-Oriented Tech Stack (DOTS).
The ECS system organizes projects in a data-oriented way as opposed to the traditional object-oriented way, thus enabling significantly fewer jumps between memory addresses. This and the Burst compiler are critical advantages when bringing game code to different hardware platforms.
“We wrote even the smallest game elements to be burstable, and those functions just vanished when we checked them in the Profiler,” says Brooks. “Added up, the performance gains were huge.” The team also “jobified” dynamic mesh creation to enable using the Burst compiler and speed mesh processing.
Getting help from ISS and Backtrace
To help make the most efficient use of DOTS and ensure their simultaneous multiplatform launch, Two Point contracted with Unity Integrated Success Services (ISS). The Partner Relations Manager (PRM) called in DOTS engineers who helped Two Point figure out complex low-level details that they needed to get the best performance out of the system, and their particular use case helped Unity address potential engine enhancements.
Backtrace crash management was another important aid. “I’ve been using Backtrace for years, it’s a one-stop shop for all our crash/error log data, including Nintendo Switch,” says Hymers. The Unity partner’s platform made it easy to filter crash and performance data and link it to different response teams as well as set up custom dashboards.
Scaling multiplatform with URP
In SIMs, ceilings and roofs can be quite challenging both for players and developers. Realistic illumination has to account for no-wall and no-roof views, and “almost every room in Two Point Campus has unique lighting and its own shader,” says Hymers. “And we don’t have any roofs at all.” It’s a lot of work, but the team coped by using the URP for all platform builds.
Building the pipeline and assets, URP helped the team to scale the game across all platforms, including the Nintendo Switch, quickly and efficiently. They also customized URP to achieve the game’s artistic vision, specifically by adapting to different lighting and shadows required across the game environment.
“Nothing was stopping us in URP to achieve what we wanted to achieve,” says Brooks. “There is nothing you cannot do with URP.”
Exploring quickly with Shader Graph
In conjunction with the URP, Two Point used Shader Graph to help solve the lighting and shading obstacles.The Shader Graph UI let Two Point environmental artists quickly explore ideas and then dial in the ones that worked. For example, instead of juggling random number settings, artists could adjust sliders preset with appropriate values. They could evaluate their work in real-time in the Editor, then share the best settings with other shaders – similarly to how developers use the Nested Prefab system. “At least 90% of our shader code worked fine on all platforms without modification,” according to Brooks.
Managing multiplatform-bound memory
Managing memory is typically one of the biggest challenges to multiplatform development. When a Nintendo Switch build first showed memory issues, the Two Point team checked the Unity Memory Profiler. It immediately revealed that some oversized textures and a number of unnecessary assets were loading, things that had slipped into the build by mistake. Brooks says, “The Profiler Analyzer Window is always our first port of call when we’re optimizing different platform builds, it’s essential for quickly finding bottlenecks.”
Another critical feature for keeping memory performance within bounds on different platforms was the Scriptable Render Pipeline (SRP) Batcher. Virtually everything onscreen in Two Point Campus is dynamic and optimizing draw calls is a must. “We tested a Nintendo Switch build without the Batcher, but it added 30ms/frame,” says Brooks. “It’s an essential tool.”
Finding better, burstable ways
The Two Point developers are always finding new ways to improve their production methods and make gameplay more fun. And as veterans, they’ve got valuable advice to share. “It really pays to update Unity whenever it fits your development cycle. Our latest builds post 2018 are half the size, run more reliably, and load in a tenth of the time,” says Hymers.
The team also strongly recommends configuring a comprehensive testing suite that regularly builds all platforms, as well as using the Memory Profiler, particularly with lowest-performing consoles. They suggest planning graphics for scalable performance and considering switches to balance quality and performance, experimenting with Mip Map Streaming for dynamic texture components, and using the Mesh API for dynamic mesh processing. Hymers adds, “And of course, make as many systems as possible work with the Burst compiler.”
Spending more time on gameplay
Two Point enjoys not needing to configure all the different renderers, pipelines, and compilers for all the different possible hardware combinations where their games need to play. But when they do need something special, such as maximizing the potential of the URP, Unity flexibly supports their customizations in the open Editor. “With Unity, it’s almost one-button simplicity. We spend our time on gameplay instead,” says Brooks.
“We wrote even the smallest game elements to be burstable, and those functions just vanished when we checked them in the Profiler. Added up, the performance gains were huge.”
“I’ve been using Backtrace for years, it’s a one-stop shop for all our crash/error log data, including Nintendo Switch.”
“Nothing was stopping us in URP to achieve what we wanted to achieve. There is nothing you cannot do with URP.”
“The Profiler Analyzer Window is always our first port of call when we’re optimizing different platform builds, it’s essential for quickly finding bottlenecks.”
“It really pays to update Unity whenever it fits your development cycle. Our latest builds post 2018 are half the size, run more reliably, and load in a tenth of the time.”