Fusing worlds in thrilling multiplayer Histera | Unity
Discover how DOTS performance gains help StickyLock transport players through space and time in this fresh take on a multiplayer FPS
How does a small team of developers bring an innovative game mechanic into fast-paced first-person shooter action? The team at StickyLock knew that they’d need a fresh take to win in the crowded FPS market. What began as portals between different time periods evolved into the Glitch – a game mechanic that transports players to a different era in time, complete with a new map. But building this bold vision required amazing performance, rock-solid multiplayer infrastructure, innovative graphics components, and a strong partner to help bring it all together.
This content is hosted by a third party provider that does not allow video views without acceptance of Targeting Cookies. Please set your cookie preferences for Targeting Cookies to yes if you wish to view videos from these providers.
Blasting the FPS genre into new dimensions
Technical artist- and programmer-turned-producer Jamel Ziaty knew he had an ambitious project on his hands when he and the StickyLock team started working on what became Histera. This high-octane 8x8 first-person shooter transports players across overlapping maps and timelines in real-time – without sacrificing performance.
As a seasoned Unity developer, Jamel knew that they needed scalable processing and backend features that could handle swapping out map and character components on the fly. To do it, the team opted into Unity’s Data-Oriented Technology Stack (DOTS) and the Entities Component System (ECS) for performance gains while tapping Unity Gaming Services (UGS) to handle the multiplayer backend infrastructure.
The results:
• An efficient and performant backend framework that can handle hundreds of thousands entities and components (with over 230K in one level alone
• Hundreds to thousands of dev hours saved using UGS
Transporting players to parallel eras with the Glitch
Histera’s signature feature is the Glitch gameplay mechanic, where a section within a level transitions to a completely different era with its own playing field, behaviors, and weapon sets. This sudden flip of settings fuels a lot of excitement in the game, but it also created challenges for the StickyLock team.
This content is hosted by a third party provider that does not allow video views without acceptance of Targeting Cookies. Please set your cookie preferences for Targeting Cookies to yes if you wish to view videos from these providers.
The Glitch unfolds in three distinct phases. The first stage, anticipation, serves both as a visual signal to players that a Glitch is imminent and, behind the scenes, it’s preparing to manage asset transitions. Next comes a deconstruction phase, where the current era’s visuals begin to make way for the next set of graphics. During this changeover, the original era’s collisions are removed as the new one’s terrain begins to take shape.
As the game flips into the new era, it gives players a peek at the new visuals and collision zones, employing a unique texture map to delineate navigable areas and imminent collision zones that guides players away from hazardous spots. Should players find themselves in these areas, the game encourages movement by inflicting damage, escalating to lethal damage if players remain there post-transition. This culminates in a dramatic shockwave effect that solidifies the new era’s visuals and collisions, completing the Glitch sequence.
Building the Glitch demanded advanced systems for transitions, player movement, and collision management. Unity’s flexibility allowed the team to develop custom tools and scripts that automated these, ensuring smooth gameplay even as the entire map shifts during play. “It’s a unique battlefield,” explains Jamel, “and we were really focused on getting it right.”
Streamlining workflows with subscenes
The Glitch was a huge challenge, both in its technical implementation and because to work, it had to blend in a level without disrupting visual coherence or gameplay flow. The team struck this balance using Unity’s SubScene component.
A subscene is a GameObject MonoBehaviour that references another scene. It’s converted into an entity representation, known as an EntityScene. Subscenes can exist in different states: open, closed, or unloaded, and this state impacts memory and visibility load. Open subscenes allow for GameObjects to be modified and converted in real-time, while closed subscenes load entity representations into memory. This setup helps to manage complex scenes and optimize performance by handling entity data efficiently.
“It’s a seemingly small detail that makes a big difference,” Jamel shares. “It allows us to handle multiple map sections within a single scene. This approach not only simplifies the workflow for our artists, by enabling them to focus on individual subscene without overlap, but also minimizes conflicts. It provides a clear overview of which subscenes are active at any given time.”
Tackling lag and optimizing for higher tick rates
“Providing a global multiplayer experience is definitely the biggest challenge UGS helps us tackle,” says Jamel. “It takes care of the worries of setting up and managing fleets while also ensuring you can provide proper quality of service to many different regions around the world.”
The StickyLock team worked hard to balance the experience for players with different ping levels. High-ping players benefit from lag compensation because the game allows for a fairer hit registration by accounting for their delay. However, this can negatively impact low-ping players, since they might get hit behind cover due to the server “rewinding.” The placement and performance insights from the Multiplay Hosting dashboard, and out-of-the-box prediction, rollback, and lag compensation features in the Netcode for Entities package were key to ensuring a smoother and more fair multiplayer experience for all players.
Jamel highlights that a lot of work went into tuning servers to operate at higher tick rates without increasing costs. The Unity team’s experience enabled them to identify optimization opportunities, while the servers could be configured to enable the team to make live adjustments quickly. Finally, Unity’s rules-based Matchmaking let the StickyLock team balance the game design with wait time and latency.
“Gaining insights into server RAM and CPU usage, maintaining high-quality service across different regions, and managing server features along with the flexibility in matchmaking rules are all essential to us,” says Jamel. “We are always looking for ways to be more performant so we can avoid unfavorable tradeoffs between improving gameplay and managing costs.”
Raising the performance ceiling with DOTS
Gameplay that crisscrosses through time adds challenges far beyond smooth transitions – creating overlapping parallel worlds in a multiplayer framework means hitting incredibly high performance marks. To get there, the StickyLock team turned to Unity’s data-oriented technology stack (DOTS), composed of the Entities Component System (ECS) package, Physics, C# Job System, and Burst compiler.
Embracing DOTS and ECS in early 2020 came with some risks – they were early adopters of the tech, and the team would have to invest in upskilling and adapt to new workflows on the fly, but after diving into the samples, Jamel and team decided that the rewards outweigh the risks so they jumped in.
“Burst and ECS’s higher performance ceiling is crucial for us,” says Jamel, “especially facing the challenge of managing five distinct eras. This leads to more broken batches since we can’t reuse meshes or materials across different styles. With ECS, we gain the necessary performance to maintain high-quality visuals despite these constraints.”
The C# Job System allowed for efficient parallel processing of tasks while Burst compiles C# code into highly optimized native machine code, bypassing the overhead of the traditional .NET runtime. This native code is specifically tailored for the target platform, resulting in better performance. Reflecting on the benefits that DOTS has unlocked for his team, Jamel shares that, “If we would have spent a lot of the performance budget on systems, we wouldn’t have been able to render five different eras to the quality that we have now.”
Buying time with UGS
Beyond connectivity, Jamel needed to buy his team time to upskill by finding other ways to shave off development hours. He turned to UGS to keep devs focused on gameplay, a move that he estimates “would put it in the ballpark of hundreds to thousands of dev hours saved.”
The team used Multiplay Hosting, Matchmaker, Authentication, and Cloud Content Delivery (CCD). The benefits of using multiple first-party services were clear to StickyLock from the outset. “A first-party service would be easier to integrate and maintain,” says Jamel, “and UGS services are cross-platform for when we want to port to console down the road.”
Multiplay Hosting is designed to scale up quickly in the event of overnight success. “It’s more common nowadays that a game can just become popular overnight. Having a service that has the experience of launching many successful titles gives us a sense of ease,” says Jamel. Additionally, Authentication’s cross-platform capabilities set up Histera for multiplatform expansion when the time is right, while CCD will make it easy for the team to manage their content and release pipeline so they can serve the right content and features to keep players engaged as the game grows.
With robust and scalable multiplayer backend infrastructure and multiplatform-ready authentication and player comms, Jamel is headed into launch with confidence knowing that the Multiplay and UGS teams have his back.