1. My Time at Sandrock
  2. News
  3. OPTIMIZATION: What Are Our Team's Efforts?

OPTIMIZATION: What Are Our Team's Efforts?

[h3]Howdy Builders,[/h3]

It has been over a year since the Early Access launch, and as we approach the final release of Sandrock, we have received valuable feedback regarding performance throughout the year, specifically related to loading times and frame drops within the town. Today, we would like to provide you with a comprehensive overview of the challenges we have encountered in these areas and share the proactive measures we have taken to address them. By reading this, you will gain insight into how design considerations can impact performance and learn about our ongoing efforts towards the 1.0 release version. If you have any further questions after reading, we encourage you to join the discussion in the comments section.

[h2]Table of Content[/h2]
1. Causes and Challenges of Performance Issues in Sandrock
2. Our Solutions
3. New problems and solutions
4. Our goal for the full version

[h3]Causes and Challenges of Performance Issues in Sandrock[/h3]
One of the main concerns raised by some Builders revolves around the loading times and laggy/unstable frame rates experienced within the town. Let's address this topic first.
When launching the game from the main menu or loading your saves, various game assets such as scene visuals and code need to be loaded to ensure smooth gameplay. The amount of resources that require loading directly impacts the duration of the loading process. Due to its complexity, we have encountered new challenges that we never encountered in Portia. To put things into perspective, let's compare Sandrock to its predecessor, My Time at Portia. In terms of building assets alone, Sandrock utilizes five times more resources than Portia. As a result, Builders may notice a significant increase in loading times when starting the game.
Similarly, whenever players enter or exit a building or dungeon, the game's backend process involves unloading the outdoor scene and loading the corresponding indoor scene (dungeon scene). Consequently, during the early stages of the Early Access release, some players experienced longer loading times when transitioning between buildings or dungeons.

Firgure 1: A detailed comparison of the material quantity in the start scenes of Sandrock and Portia

Besides, The game design philosophy of the My Time series has always aimed to create an immersive experience, ensuring that Builders never feel lonely in the game world despite in its single-player mode. We strive to make the game world feel vibrant and alive, with NPCs contributing to a sense of liveliness. This approach allows players to look back on their time in the game with fond memories. Therefore, NPCs in the game have their own daily routines and activities. You will observe them going to work, taking breaks, engaging in conversations, and interacting with each other, much like real individuals. Even if players can't currently see these NPCs, the system continuously tracks their positions, determines their routes, and assesses their ongoing actions. Consequently, loading NPC AI also requires a substantial amount of time.

For exmaple, in Sandrock, the median number (middle number in the list of all numbers ) of behavior tree nodes for a single NPC AI reaches approximately 800, which is nearly ten times more than in Portia. The loading process for several dozen NPC AIs naturally incurs a significant amount of time. To mitigate initial loading time, we implemented a strategy of loading only the behavior trajectories initially, without loading the character models. This means that NPCs remain active in the background as soon as the game is launched, and their models are loaded only when they come into the player's field of view within the current frame. This approach effectively reduces the initial loading time. However, it can introduce sudden frame rate drops and stuttering when character models are loaded in that frame.

And frame rate instability can be influenced by various factors. For instance, performance during nighttime scenes is affected due to the addition of dozens of new light sources, each contributing numerous additional shadows, resulting in lower frame rates at night. Furthermore, the absence of a well-planned Level of Detail (LOD) system from the beginning has also contributed to reduced and unstable frame rates in the overall scene. LOD involves utilizing different models for objects based on their distance, displaying low-polygon models for objects in the distance to optimize performance.

Figure 2: Night light sources dramatically increased the Shadows amount

[h3]Our Solutions[/h3]
Now that we have identified the causes and challenges of the performance issues, the next step is to find ways to resolve them.
Optimization of Loading time
Regarding the issue of loading times, our solution involves caching the main scene resources in the computer's memory, eliminating the need to unload and reload them every time a player enters or exits a door, as was done previously. Since implementing this approach in the 'Logan Strikes Back!' update last year, the loading times for entering and exiting doors have significantly decreased for the majority of Builders. However, it doesn't work well for players with lower memory capacities, such as 8GB, may still experience suboptimal loading times as certain resources need to be unloaded. We highly recommend using 16GB of memory for an improved gaming experience.
However, it's important to understand that this method doesn't solve everything. Some Players may still encounter longer loading times when entering and exiting mining and combat dungeons. These dungeons contain a substantial amount of resources, comparable to those in the main scene. For instance, the Northern Spaceship dungeon features a similar number of models as the main scene. Moreover, mining dungeons utilize Voxels (description), resulting in significantly larger data volumes. As a result, when entering mining dungeons, the system needs to unload a portion of the main scene resources from memory to ensure the stability and smoothness of the dungeon experience.
Furthermore, we have introduced a different approach to loading NPC AI behavior trees. Previously, all NPC AI behavior trees were combined into a single tree. However, we have now divided each NPC's behavior tree into separate trees based on their usage environment, such as the main scene, rooms, dungeons, and quest scenarios. This simplifies the individual behavior trees and reduces loading time.

Figure 3: Here is a part of Arvio's behavior tree nodes (This reflects the current version, and we will continue to further optimize the behavior trees of NPCs in the future.)

[h3]Optimization of the Frame rates[/h3]
To address the issue of frequent frame drops caused by loading NPC models, we have implemented optimizations to improve the loading process. Previously, all NPC models were loaded within a single frame. However, we have now adopted a different approach by dividing NPCs into multiple components and loading them gradually over the course of 3-4 frames. This loading process takes place in the background, ensuring that players won't notice any visual differences in the appearance of the NPCs themselves. However, from a gameplay perspective, this approach significantly reduces the occurrence of frame drops. The image below provides a visual representation of this distributed loading concept.

Figure 4: Backend Loading (This diagram serves as an illustrative representation of the loading process.)

In addition, we have also implemented more detailed plans for Level of Detail (LOD). As mentioned earlier, Sandrock boasts a rich variety of scene resources, including numerous visually stunning buildings in the town, each consisting of a significant number of vertices and polys. When players are in close proximity to these buildings, they appear highly detailed and visually impressive.
However, as players move further away from the buildings while still being able to see them, the game continues to render the buildings with the same level of detail as when they were up close. This means that the system is still processing and rendering a large number of vertices and polygons, even though the buildings appear smaller and less detailed in the distance. LOD addresses this issue by dynamically adjusting the LOD based on the player's distance from the objects.
By utilising LOD, we lowered the polygon models for distant objects which dynamically reduce the computational burden on the system, improving performance and optimizing resource utilization. Our team is actively working on further refining this aspect to achieve a better state for the final release version.

New problems and solutions
Many Builders may have a question: After experiencing noticeable improvements in loading times and frame rates following the optimizations implemented in the 'Logan Strikes Back!' update last year, why does it seem that the performance has went worse with subsequent updates?
To address this concern, we need to consider the new changes that have been introduced to the town in these updates. Firstly, in our efforts to present a more visually appealing Sandrock and reflect the evolving atmosphere of the storyline, we have added additional small details throughout the town. These include small pottery jars near Amirah's Shop, an upgraded Catori's Game Center, and a telescope on top of the Research Center, among others. Individually, these small decorations may not consume significant resources. However, when combined, they contribute to an accumulated performance overhead.

Figure 5: Recent updates have added many details to the Sandrock world

The images from figure 5 depict a comparison of the town scene details before and after the updates. Can you spot the differences?
Furthermore, as the storyline progresses, rain begins to fall in Sandrock. Optimizing the particle effects and physical collisions of raindrops (to prevent rain from passing through buildings) has presented significant challenges. Currently, we are working on reducing the particle effects of rain in the distance to alleviate some of the performance impact.
In the design of Sandrock, our goal is to allow players to see as many detailed models as possible at a glance. For instance, when standing at a high point in the town, you can observe distant areas with intricate visuals, and many of these areas are exploitable. Unlike other game designs that employ simplified models to occlude most scenes, this approach inherently incurs more performance demands for the town scenes in Sandrock. As you can see, with each version update, Sandrock becomes more vibrant and visually appealing, but it also places increased demands on performance. Our focus remains on optimizing performance while ensuring an enjoyable gaming experience.

Figure 6: Cliff buildings are in progress.

For example, we are currently exploring ways to reduce the number of moving colliders to mitigate the performance impact caused by physics. Specifically, we have disabled unnecessary collisions associated with the rotation of gears on workshop machinery, and we have replaced certain programmatically controlled scene object movements with lower-consumed Tweener animations ( a technique used to create smooth transitions between different keyframes in animations). Although these changes may not be visually apparent, they effectively reduce performance overhead, particularly for lower-end machine configurations.
It is worth mentioning that previously, each character in Sandrock had multiple colliders serving different functions, such as attack detection, hit detection, and interaction with surrounding objects. We have now consolidated these colliders into a single one, further reducing performance demands. These examples only scratch the surface of our ongoing optimization efforts. Game optimization encompasses various aspects, and we are diligently working to address these issues, ensuring that players can experience a well-rounded and optimized final version.

Figure 7: Key optimization tasks assigned in our team

[h3]Our goal for the full version[/h3]
In conclusion, we would like to share our optimization goals for the official release of Sandrock. Our aim is to ensure smooth gameplay performance for Builders with mid to high-end systems, allowing them to enjoy the game at a consistent 50-60 frames per second (FPS). For those with lower-end configurations, we are committed to maintaining a stable frame rate of around 45fps with minimal laggy.

Figure 8: Here are the optimization goals we are currently trying to achieve for the full version

During the Early access of Sandrock, we have introduced multiple updates such as "Logan Strikes Back," "Builder Bonds" "Hey! Old Pal" , "The secret behind the Mask", and the "Knives Out" . These updates have shared the story of the planned ACT 2, and throughout this period, we have never ceased our efforts to optimize the game, aiming to deliver a better gaming experience for every Builder. However, there were something we could done better but didn't. As a result, some builders may still encounter varying degrees of performance issues during their Sandrock journey. But we are trying our best to address issues and continuously optimizing the game to ensure a better and smoother gaming experience for all Builders. These issues are what we plan to address step by step in the full version release and even post release.

Don't forget Sandrock will be out of early access on Sep. 26, available on Steam, Epic, Nintendo Switch, Sony PlayStation 5 and Xbox one/Series S/X上. All Sandrock main stories and romanceable NPCs side quests will come to a conclusion at that time! All Early Access player will free update to the 1.0 full release version.
https://store.steampowered.com/news/app/1084600/view/3695813264931598464

P.S. Regarding the PlayStation 4 version, we have encountered technical issues related to the engine, which means it will be released later than other platforms. We will provide updates on its progress, so please stay tuned for further information.
P.P.S. The multiplayer feature will be fully released on PC alongside the full launch, and prior to that, we will conduct an open Beta test where you can participate and your progress will carry over to the full version. However, the release of multiplayer on console platforms may be delayed due to the porting process. We will keep you informed about the timeline for console multiplayer availability.

Catch us for more information:
Subscribe to Youtube Join our Discord Sandrock Instagram Sandrock Twitter Sandrock Facebook Sandrock Official Website