Fabledom

Porting the city-building simulator Fabledom
from the PC platform to all main modern consoles
and during an active development phase 

Contract duration: 7 months + contract extension to develop Xbox version + post-launch support.

business context

City-building simulators are a very specific genre. While they feel great on PC, the same cannot always be said for console versions. Only a few building simulators have successfully transitioned to consoles, and those that did were usually designed with these platforms in mind right from the start.

We received a request from Plug In Digital/Dear Villagers for such a job: porting the city-building simulator Fabledom (PC version), with hundreds of inhabitants, fairy-tale creatures, and hundreds of working buildings (all in one screen) to PlayStation 5 and Nintendo Switch. Additionally, the version for the Xbox Series X|S was also requested. AVIA PROPERTY MANAGEMENT LTD was responsible for all console versions of the game, with an unusual complexity as Fabledom was still in Early Access on Steam and still in development.

project’s summary

Despite the challenges, Fabledom is now available on all major platforms: PlayStation 5, Xbox Series, and Nintendo Switch. We successfully adapted the game’s architecture, memory usage, and UI to each console. Allow us to share our journey to this point.

game reviews

Of all the games like this I’ve played over the last few months, this is already one of the best. – Kotaku

Finger Guns
Fabledom is a charming cosy city builder with oodles of fairytale goodness.
read full review
01
/

what do gamers saywhat do gamers say

On PS5, Fabledom runs smoothly. The game offers no graphics modes, but the standard visuals do keep up as the town gets more complicated
read full review
01
/

challenge

Challenge 1:

Porting while the game is still in development (Early Access)

 

Porting a game still in development presents significant challenges, including merging original updates with ours, dealing with bugs and handling file conflicts.

Solution:

We set up a dynamic feedback system with weekly calls and detailed reports to make sure everyone stayed on the same page throughout the development process. Our past experience with multi-platform certification helped us organize the certification process early on, keeping all the platform requirements in mind.

Although our communication with Plug In Digital/Dear Villagers was infrequent, it was always very productive. We received tasks in real-time, and it was up to us to tackle them quickly. Managing merging requests was another hurdle, and we constantly switched between fixing code issues and optimizing new content. The scope of work was always shifting, and we had to hit strict, deadline-driven milestones.

Challenge 2:

Adapting the game to gamepad controls

The game’s original version was created with the idea of PC as the only platform and keyboard/mouse controls only. One of the biggest challenges was that on PC, players could open and close multiple windows at once, quickly switching between them with clicks and doing this as often as needed. On top of that, the number of elements in these windows could be overwhelming, making the task even more complex. 

Solution:

We developed gamepad controls for each platform from scratch. Implementing every control scheme required extensive refactoring of the original code, which also caused many time-consuming bugs. 

We divided the necessary UI panels into vertical elements, with navigation via keys inside, to implement the multiple window controls without using the mouse. We always left some room for possible new panels, as the game was still in development.  All this purely technical part was backed up by regular gameplay tests with the QA team, game designer, and UI-UX artist to choose the most optimal solutions.

For greater optimization, we also significantly redesigned the following:

  • the world map. We needed to involve as many gamepad controls as possible 
  • drop-down windows appearing and closing

Although there were few references for effective gamepad control schemes in this genre, we conducted thorough research, implemented some suitable features, and developed a significant portion of the solutions from scratch.

While working on each solution, we always remembered that a PC player can click anywhere, at any time, and we have to bring the console player closer to this game flow.

Challenge 3:

Game performance optimization

Since the game’s architecture was initially designed only for PC, console performances were not fully considered. A unique challenge with building sims is that they drastically increase memory usage, often to the point where porting these games to consoles is avoided altogether.

In Fabledom, memory and CPU resource demands were exceptionally high, causing the game to crash not just on the Switch but even on the Xbox. This forced us to rewrite much of the game’s logic to optimize resource usage for each platform individually.

Solution:

The first step was simply getting the game to run on consoles, as it initially struggled with memory constraints, resulting in frequent crashes.

Memory Optimization and Shader Rewrites

We faced severe memory issues early on, especially with resource-heavy shaders. The first breakthrough came when we rewrote the math patterns used in the shaders, reducing their memory usage from approximately 800MB to under 100MB. This involved combining optimization techniques, such as simplifying the shader processing mathematics and even rewriting some shaders from scratch. By doing so, we maintained the same visual quality as the original PC version but with a much lower memory footprint.

Additionally, we optimized particle effects and reduced the use of in-game physics, further alleviating memory and CPU load. By decreasing the number of rendering calls – using techniques to limit the number of objects on screen at any given time – we minimized the amount of data sent to the GPU, leading to fewer CPU bottlenecks.

LOD System and Object Rendering

To optimize graphics performance on weaker devices, we implemented a Level of Detail (LOD) system. This allowed the game to display hundreds of objects on screen simultaneously without overwhelming the system. Objects changed in complexity based on the camera’s distance, significantly reducing the number of polygons processed by the GPU. For distant objects, we employed a system that captured images of buildings from 16 different angles and stored these as textures. These textures were then assembled into a single image by the shader, ensuring that even at high or distant camera angles, performance remained stable.

Camera and Physics Adjustments

We also reworked the camera’s tilt angle and maximum height. By limiting the field of view (FOV) and reducing the camera’s elevation, we could control how many objects were rendered at once, easing the load on both the GPU and CPU. This adjustment had a significant impact on performance, especially on less powerful platforms like the Nintendo Switch.

Additionally, we addressed several low-level issues related to GPU performance and shader processing. Through various mathematical and technical approaches, we optimized or rewrote shaders to simplify their operations without compromising visual quality.
Our optimization efforts successfully brought Fabledom to a stable 30 FPS on the Nintendo Switch, with smooth performance across all platforms. We passed all necessary certifications, ensuring a crash-free and responsive experience for players. By improving memory management and resource allocation, we delivered a well-optimized game that runs efficiently on even the most resource-constrained consoles.

Challenge 4:

Scale and complexity

The Fabledom is a city-building simulator, which means beating one session of the game takes dozens of hours (and there’s no traditional finale; the game sessions could go on and on). Also, the game has various scenarios for random events and a lot of content. One gaming session scaled the use of the platform’s resources exponentially, which was ok for PC, but not for the consoles with their limitations, especially the Nintendo Switch. The game crashed on consoles, and the weaker the hardware was, the shorter the game session was before the crash.

Solution:

Given that Fabledom was still in Early Access, our priority was addressing Early Access-related issues while optimizing gameplay for consoles. Since console players were less likely to reach the late-game stages, we focused less on optimizing that area early.


Gradual Optimization for Stable Gameplay
One of the key difficulties with Fabledom was the wide variety of gameplay possibilities. Players could arrange their kingdoms unpredictably, build different structures, and follow different storylines. Testing the game required accounting for countless combinations of building layouts and narratives, which was time-consuming. To address these issues, we tested as many combinations of building arrangements and story progression as time allowed. On PCs, players faced virtually no limits to the size of their cities. However, on Switch, the system could only allocate up to 3GB of RAM, a hard limit we couldn’t bypass. To accommodate this, we optimized the game for a maximum population of 300 in-game characters on the Nintendo Switch. Players could reach a logical conclusion with the “marriage” storyline, but gameplay beyond that point could become unstable.

Dropdown Menus for Scalability
An update on the PC version introduced a new unit selection menu for managing armies, located in the top left corner of the screen. While this initially seemed like a good solution, as the number of units grew, the menu began to disrupt the interface, making it difficult to control the hero. To resolve this, we implemented a dropdown menu for unit selection. This allowed for scalable management of many characters without interfering with the game’s original interface. The dropdown adjusted to the number of units while keeping the interface clean and manageable.

Rendering Large Numbers of Buildings
With a city-building game like Fabledom, players often rotate the camera to see dozens, or even hundreds, of buildings on screen simultaneously. This presents a significant challenge for resource optimization on consoles.
To tackle this, we developed a system that dynamically photographed each building from 16 angles-top, bottom, and sides-and stored these images in a texture file. Shaders then assembled the frames into a single texture, allowing smooth transitions between images as the player rotated the camera around buildings. This solution dramatically reduced the number of polygons the GPU had to process, leading to more efficient use of graphical resources and smoother performance on lower-powered platforms like the Switch.

Challenge 5:

Save file size

One significant advantage of working on a PC is the almost limitless availability of disk space, which allows players to create as many save files as they want. However, when developing for consoles such as the Nintendo Switch, we faced substantial limitations as it’s impossible for saves to exceed 60 MB.

Solution:

 To adapt to this restriction, we had to thoroughly analyze all the data the developers were recording and explore how we could compress these saves into a much smaller footprint. The original version of the game employed a highly unoptimized method of formatting the data, which worked well for the PC and was easy to implement but consumed excessive disk space.

We had to rewrite this aspect entirely. This involved employing data compression techniques and identifying opportunities where data could be calculated dynamically instead of being written directly. Through these changes, we managed to optimize the size of the save files by more than tenfold. As a result, we were able to create 10 save slots for players on the Switch while still leaving room for future DLCs or updates.