Stray Coughs Up A Hairball On PC As Devs Acknowledge Major Stuttering Issue

stray hero
Video games are all violent, right? They're always about big, burly, buff men stomping around battlefields shooting at bad guys or monsters with ridiculously-oversized guns. Or if they're not about that, then they're about impossibly-proportioned buxom babes flouncing around fantasy fields, firing off fireballs or slicing things up with swords. Right?

Broad stereotypes aside, there are all kinds of video games, but one of the most underserved types of games has to be the "play as a cat" game. There have been a few; the excellent Catlateral Damage comes to mind. (Also surprisingly violent, ironically.) The most recent release in this delightfully feline micro-genre is the game Stray from newbie developers BlueTwelve Studio.

stray 3

In the game, you play as a stray cat in a cyberpunk city that strongly resembles the Kowloon Walled City in Hong Kong. You're lost and separated from your family, so you have to try and escape the city and find your way back to your loved ones. We haven't played the title for ourselves yet, but reviewers say the game is at once heart-warming, heart-breaking, and rich with environmental storytelling and gorgeous graphics.

Unfortunately, reviewers also say that the PC version suffers from a serious stuttering issue. Sam Machkovech, who reviewed the game for Ars Technica, says that the source of the stutters is shader compilation. Shaders are simply programs that run on the GPU, and like regular CPU code, shaders have to be compiled to machine code before they can be executed.

mackovech tweet 1

Shader compilation isn't a problem on game consoles, because there's a fixed hardware configuration. That means developers can pre-compile the shader code to be loaded by the player's console at run time. For PC games, there are simply too many hardware configurations to support, so shader compilation is done in the graphics driver. Compilation is fast—usually on the order of milliseconds—so historically it's been no problem to simply do it when the shader is needed.

The thing is, as game graphics get more and more complex and shader code becomes more and more involved, shader compilation both happens more frequently and takes longer when it does. This can lead to a stuttery experience that feels terrible to actually play. Note that shader compilation only needs to happen one time; once the shader is compiled, it can be loaded from the cache instantaneously.

stray 2

However, for a linear game like Stray that doesn't re-use a lot of assets, you will sadly be suffering through shader compilation stutter for most of the game. On very fast PCs with quick NVMe I/O and high single-threaded throughput, it's significantly less noticeable, but folks playing on older or slower machines will definitely feel the hit when a new asset gets loaded.

It's entirely possible for a game to pre-compile its shaders before the player enters gameplay, but that does require an extensive "loading" period before the start of the game. Still, it's hard to imagine a one-time shader compilation process of several minutes being a dealbreaker—especially in comparison to playing the game with constant hitching.

This problem isn't exclusive to Stray by any means. Actually, its become rather endemic to PC games based on the Unreal Engine. The problem seems to be that the default settings for Unreal Engine projects configure the engine to exclusively use just-in-time (JIT) compilation, and most developers don't know any better than to configure or offer another option.

mackovech tweet 2

The good news is that the developers of Stray are on top of the problem. They reached out to Mr. Machkovec and say that they hope to have the issue, along with some other problems, resolved in an upcoming patch. Kudos to BlueTwelve for taking the initiative on this problem. Hopefully Epic Games will do the same for the engine itself.