Trending
Opinion: How will Project 2025 impact game developers?
The Heritage Foundation's manifesto for the possible next administration could do great harm to many, including large portions of the game development community.
'Extra computations are an unaffordable luxury.'
April 16, 2024
Game Developer Deep Dives are an ongoing series with the goal of shedding light on specific design, art, or technical features within a video game in order to show how seemingly simple, fundamental design decisions aren’t really that simple at all.
Earlier installments cover topics such as how Mimimi games crafted the save scum-friendly save system in Shadow Gambit: The Cursed Crew, and the technical work and creative nuances behind Slime Rancher 2's new weather system and the experiential impact that developers Monomi Park designed for players, and the marketing strategy that helped Timberborn's popularity soar with only two years in early access with Mechanistry comms manager Michal Amielanczyk.
In this edition, we are joined by Zhanna Goranskaya, head of Business Development Eastern Europe & CIS at Saber Interactive, who tells us about the process behind porting Kingdom Come: Deliverance to the Nintendo Switch.
Hi, I'm Zhanna Goranskaya, head of Business Development Eastern Europe & CIS at Saber Interactive. Recently, Saber Interactive completed one of our most ambitious porting projects: bringing Kingdom Come: Deliverance to Nintendo Switch.
Kingdom Come: Deliverance is a legendary project from the Czech studio Warhorse, originally released for PC, PlayStation 4, and Xbox One in 2018. It is a large, open-world RPG created using CryEngine, meticulously reproducing the clothing, weaponry, and daily life of medieval Bohemia.
We had many discussions about whether or not such a vast and complex game could be successfully ported to a portable console, but given our track record and achievement in porting The Witcher 3: Wild Hunt, we knew we could do it.
Two teams within Saber were responsible for the port: work began at Saber Sweden, where they took on most of the tasks related to work in the game engine. Then, the project was handed over to our colleagues at Saber Core, who brought it to completion.
We used two versions of Kingdom Come: Deliverance as the basis of the port: art assets from the Xbox One version and code and game settings from the PC version. Our first step was to assess all the assets in the game, analyze all the technologies used, and devise a plan of action. Next, we ported the game to Switch so we could validate it was able to run, and that the character could be moved. This went relatively smoothly, as compressing the data and processing the assets allowed CryEngine to run the game on Switch. Unfortunately, this revealed performance issues, artifacts, and quite a number of bugs. After just a few minutes of gameplay, for instance, memory would completely run out, and the game would crash.
From the summer of 2022 to late 2023, the team meticulously and systematically analyzed and fixed all the problematic areas with the port. This was a painstaking manual process, starting with an analysis of the problem areas. QA specialists went through the game piece-by-piece, noting where the FPS dropped, for example. Then, engineers would check each of these areas and establish what could be neatly trimmed so as not to ruin the scene. In another round, we shifted calculations for elements like grass swaying in the wild, facial expressions, and the movement of clothing from the CPU to the GPU for better load balance.
Another major task was optimizing for occlusion. Imagine your character is standing on a city street next to a stone wall. If they face the wall, you won't see anything beyond it. But, the graphics processor will continue to render what's behind the wall, processing buildings, other characters, and objects. This is a significant problem for all platforms, from PC to major consoles, but we want to pay special attention to this with Switch ports. Extra computations are an unaffordable luxury. So, all non-visible components were culled to relieve the GPU.
Images via Nintendo.
One of the most telling examples is how we were able to handle sheep within Kingdom Come: Deliverance’s very high-quality physics simulation. For instance, when you see a sheep running through the grass, the game performs many computations in order to accurately simulate the movement of the grass under each hoof. Each sheep's leg requires 5,000 computational operations. Multiply that by four legs, and you quickly come to 20,000 grass-related operations per sheep. Now, imagine your hero encountering a flock of sheep grazing in a field...
To boost performance in this area, we first reduced the number of operations—instead of 5,000, we left just one. Initially, it seemed like little had changed, but suddenly, it turned out that the animals’ legs would start sinking into the terrain. We had to manually go in and fix this by examining each scene separately to determine where we could change the number of operations and where we couldn't.
Images via Nintendo.
Another significant challenge was properly rendering clothing and armor. The game features an impressive armor system, staying close to historical realities. Shirts, gambesons, chainmail, metal vambraces, and greaves all have their own geometry and are calculated separately to be displayed correctly. These calculations are processed in real-time because armor can be removed from a defeated enemy, stolen, or worn at any time. Of course, we could simplify the geometry, but that would break the system of calculating the physics during movement, making the armor appear rubbery and unrealistic. Ultimately, our solution came from carefully trimming areas that would not affect geometry in order to perform faster calculations overall.
Of course, sometimes we have to resort to tricks. For example, all cutscenes in the game are pre-scripted—meaning we know how everything will go. This means we can slightly adjust the quality settings, such as trimming the draw distance to the point where it will not be noticeable to the player.
Through this meticulous process, we managed to achieve good performance throughout almost the entire game. The most challenging task was handling mass scenes: battles, tournaments, and any event involving more than five characters on the screen. The idea of reducing the number of characters was dismissed immediately, as it would compromise the spectacle. We tried to optimize them as best as possible, but such scenes remained a bottleneck for FPS. Fortunately, the game's pace is relatively slow, so the gameplay isn't affected by this.
We are truly satisfied with how stable the game turned out. From the beginning of our work, the team optimized memory to ensure that the game wouldn't crash for at least two and a half hours (the standard battery life for Switch). In internal tests, we even managed to achieve a continuous 20-hour session. When the console ran out of battery, it was recharged without closing the process, and the game continued.
We believe we achieved as much as was technically possible with this Switch port, and we are excited to see a new group of players diving into Kingdom Come: Deliverance on Nintendo Switch.
You May Also Like