When Optimization Stops Working: Inside the Switch Port of Secret of the Mimic that Required Rewriting the Engine
Devoted Studios breaks down how memory, loading, and engine limitations forced a shift from just optimization to deep architectural changes during the Switch port of Five Nights at Freddy's: Secret of the Mimic.
Five Nights at Freddy's: Secret of the Mimic is an atmospheric horror game built around tension and pacing. Porting it to Nintendo Switch focused less on pushing graphics and more on delivering a stable, responsive experience on constrained hardware.
Devoted Studios handled the Nintendo Switch port, working within strict memory limits, performance constraints, and loading challenges in Unreal Engine.
Devoted Studios is a US-based game development studio specializing in co-development, game porting, and end-to-end art production with 250+ team members across 15+ countries and 90+ clients, including Obsidian Entertainment (Avowed, Outer Worlds 2), Embark Studio (Arc Raiders), and Blizzard (Overwatch 2). Devoted Studios has also worked closely with Steel Wool Studios across the Five Nights at Freddy's franchise, supporting multiple titles through both co-development and porting across several releases in the series.
We spoke with Andrew Benenko, Lead Producer at Devoted—overseeing technical delivery on the Secret of the Mimic Switch port from start to ship—about what broke first, what needed to be rebuilt, and what other studios can learn from shipping on limited hardware.
What Breaks First on Nintendo Switch
On Secret of the Mimic, the biggest challenges had little to do with graphics.
"Memory, performance, and loading speed defined almost every decision we made," Andrew Benenko explains. "Visual quality was never the main issue. The real pressure came from keeping the game stable during level transitions and maintaining acceptable performance."
Early work focused on targeted optimizations. Code improvements. Blueprint cleanup. Removing obvious inefficiencies. These changes helped stabilize the build and recover some performance headroom.
But only up to a point.
When Micro-Optimizations Stop Working
Eventually, the team hit a familiar wall. All the obvious optimizations were done. Code and Blueprints were cleaned up. Small gains were stacked wherever possible. And still, performance was not where it needed to be.
"At a certain point, it became difficult to find any meaningful performance gains," Andrew says.
Navigation mesh calculation was the remaining bottleneck. On Switch, it was running on the main thread and directly impacting gameplay. The fix was obvious in theory: move navmesh updates to async. The problem was Unreal Engine 4.
"UE4 almost doesn't support this at all," Andrew explains.
This is where most teams stop and work around the limitation. Devoted Studios chose a different path and modified the engine itself. It introduced new bugs and risks, but it unlocked performance that optimization alone could not reach.
That was the moment when the port stopped being about tuning and became an engineering problem.
Loading Speed Matters as Much as Frame Rate
Frame rate was only part of the experience. Loading behavior quickly became just as important.
Integrating Unreal's IoStore system significantly improved level loading speed and made the game feel more responsive. However, faster loading did not solve everything. Memory still needed to be tightly controlled to avoid crashes and performance spikes.
On Switch, loading behavior and memory usage are tightly linked. Improving one without addressing the other often just moves the problem elsewhere.
When User Experience Becomes the Solution
One of the more unexpected challenges surfaced in slow mode, which is required for Nintendo lotcheck. In this mode, sublevels did not load quickly enough to keep pace with gameplay, creating a risk for certification and player experience.
Rather than forcing a complex streaming system that risked instability, the team chose a more controlled approach. They added checks to confirm whether the expected sublevel was fully loaded. If it was not, players were shown a loading spinner.
"This solution was acceptable for lotcheck and, more importantly, stable," Andrew said. "Sometimes the right decision is not a perfect technical system, but a controlled experience that works reliably."
The decision reflects a broader lesson in Switch development. Clear and predictable user experience design can sometimes stabilize technical limitations more effectively than additional engineering complexity.
Memory as the Biggest Constraint
Memory proved to be the most serious source of crashes, especially during transitions between levels. To bring memory usage under control, the team applied several targeted strategies:
Hard references were replaced with soft references so assets loaded only when needed instead of staying resident in memory. Memory pools were carefully tuned to reduce waste while avoiding shortages. Asset and material sizes were reduced, improving both memory usage and loading behavior.
One of the most critical issues involved lighting data. During level transitions, large lighting assets from two levels were being kept in memory at the same time. On Nintendo Switch, at least one level must always remain loaded, which makes it impossible to unload the current level before loading the next one.
To solve this, the team introduced a small transition level with a minimal memory footprint. The flow became:
- Load the transition level.
- Unload the old level.
- Load the new level.
This approach freed memory safely and prevented crashes during level transitions.
Lessons from Shipping on Constrained Hardware
Porting Secret of the Mimic to Nintendo Switch reinforced several key lessons for teams working on limited hardware. First, memory often becomes the main constraint before visuals. Teams that focus only on reducing visual quality can miss the real source of instability.
Second, micro-optimizations have a ceiling. When small tweaks stop delivering gains, deeper architectural changes become necessary.
Third, engine-level modifications are sometimes unavoidable. While they carry risk, they can unlock performance that would otherwise be impossible to achieve.
Fourth, loading speed is part of performance. Players feel waiting just as much as frame drops, and both shape the overall experience.
Finally, controlled user experience decisions can be a valid engineering solution. In certification environments, stability and predictability often matter more than technical elegance.
Porting to Switch Meant Rethinking Systems, Not Just Optimizing Assets
Porting Secret of the Mimic to Nintendo Switch was not about cutting features or lowering quality. It required knowing when incremental fixes were no longer enough and when systems needed to change.
For Devoted Studios, that meant moving beyond tuning and making structural decisions around memory, loading, and engine behavior. Some challenges required reworking core systems rather than adjusting content or visuals.
On constrained hardware, deliberate architectural decisions matter more than last-mile polish. Stability and predictability are what turn a port into a shippable product. Studios looking for a porting or co-development partner can learn more at devotedstudios.com.