Does the existence of Wine compatibility layer discourages the creation of native Linux games?

  • soulsource@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    16
    ·
    11 days ago

    I’ll give you my point of view as game developer.

    Disclaimer first: I work as a coder, everything I say about publisher interaction is second-hand knowledge.

    We have made one Linux game. It was the first one of our two “indie” titles (quotation marks, because both of them ended up being partially funded by a publisher, so they weren’t really indie in the end), where we had promised a Linux build on Kickstarter, long before a publisher got involved.

    The main reason why we did not do native Linux in our publisher-funded games is quite simple: Our publishers didn’t pay us for it.

    There are actually some publishers who are very keen on getting native Linux versions for their games, but we sadly have not released a game with any of them yet…

    The publishers we released games with did not agree to the buget that we think is needed to do a Linux port of sufficient quality. If we would lower the price for doing a Linux port to the point where our publishers would agree to it, we would take on a lot of financial risk ourselves, so this is sadly not an option.

    If everything worked as it is advertised by engine developers, making a Linux version would be quite cheap: Just click a few buttons and ship it. This is, sadly, not the case in real-life, as there are always platform specific bugs in game-engines. Our one Linux game was made with Unity, and we had quite a few Linux-only bugs that we forwarded to the Unity devs (we didn’t have engine source code access), and had to wait for them to fix… For the engine we mainly use nowadays, Unreal, we have a rule-of-thumb: “Engine features that are used by Fortnite are usually well maintained.” There is no native Linux version of Fortnite… (We did try Unreal’s Vulkan RHI in Unreal 4.26 for Steam Deck support in one of our games. Let me put it this way: The game in question still uses Direct3D on Steam Deck.)

    So, from experience we expect that the chance that we would have to find and fix Linux-specific engine bugs is quite high. Therefore we have to budget for this, what makes offering a native Linux version relatively costly compared to the platform’s market share. Costly enough to make our publishers say “no”.

    This, by the way, also answers the question why publishers are willing to pay for the way more expensive console ports. There are also way more console players, and therefore potential customers out there…

    (I can only guess, but I would expect publishers to be even more reluctant to pay for native Linux, now that WINE works so well that getting a game running on Linux needs typically zero extra work.)

    • There are many reasons.

      • Multiplayer games will only target Windows, officially, and might even ban Linux altogether because of the perception that anti-cheat is more costly, impossible, or just hard under Linux. True Kernel-level anti-cheat is not possible on Linux like it is on Windows but the real reason is risk: anti-cheat is an arms race between cheaters (and, critically, cheat vendors who would sell cheat tools to them) and developers and those developers want to limit the surface area they must cover and the vectors for new attacks.

      • The biggest engines, like Unreal, treat Linux as an after-thought and so developers who use those engines are not supported and have to undertake an overwhelming level of extra work to compensate or just target only Windows. When I was working on a UE5 project, recently, I was the only developer who even tried to work on Linux and we all concluded that Linux support was laughable if it worked at all. (To be fair to Tux the penguin: we also concluded that about 99.9% of UE5 was -if-it-worked-at-all and the other 50% was fancy illumination that nobody owned the hardware to run at 4k/60fps and frequently looked “janky” or a bit “off” in real-world scenarios. The other 50% was only of use to developers who could afford literal armies of riggers and modellers and effects people that we simply couldn’t hire and the final 66% was that pile of blueprints everyone refused to even look at because the guy who cobbled them together had left the team and nobody could make heads or tails of the tangle of blueprinty-flowcharty-state-diagramish lines. Even if the editor didn’t crash just opening them. Or just crash from pure spite.)

      • A very few studios, like Wube, actually have developers who live in Linux and it shows but they are very few and far between. (Factorio is one of the very nicest out-the-box, native Linux experiences one can have.) Even Wube acknowledge that their choice to embrace Linux cost them much effort. Recently, they wrote a technical post in their Friday Factorio Facts series about how certain desktop compositors were messing up their game’s performance. To me: this sort of thing is to be expected because games run in windows and render to a graphics surface that must be composited to some kind of visible rectangle that ends up on screen: after a game submits a buffer to be presented, nearly all of what happens next is outside of the games control and down to the platform to implement properly. Similarly, platform-specific code is unavoidable whenever one needs to do file I/O, input I/O, networking or any number of other, very common things that games need to do within the frame’s time budget – i.e. exceedingly quickly.

      • Projects which are natively developed on Linux benefit from great cross-compilation options to target Windows. This is even more true with the WSL and LLVM: you can build and link from nearly the same toolchain under nearly the same operating system and produce a PE .exe file right there on the host’s NTFS file-system. The turn-around time is minimal so testing is smooth. For a small or indie project or a new project, this is GREAT but this doesn’t apply to many older or bigger projects with legacy build tooling and certainly does not apply as soon as a big engine is involved. (Top tip: the WSL will happily run an extracted Docker image as if it was a WSL distribution so you can actually use your C/I container for this if you know how.)

      • Conversely, cross-compiling from Windows to Linux is a joke. I have never worked on a project that ever does this. Any project that chooses to support Linux ports their build to Linux (sometimes maintain two build mechanisms) if they weren’t building on Linux for C/I or testing, already, anyway. (Note: my knowledge of available Windows tooling is rather out of date – I haven’t worked with a team based on Windows for several years.)

      • Godot supports Linux very nicely in my experience but Godot is still relatively new. I expect that we might see more native Linux support given Godot’s increase in population.

      • What’s that? Unity? I am so very sorry for your loss …

      • If you’re not using a big engine, you have so many problems to handle and all of them come down to this: which library do you choose to link? Sound: Alsa, PulseAudio or Pipewire: even though Pipewire is newer and better, you’ll probably link PulseAudio because it will happily play to a Pipewire audio server. Input: do you just trust windows messages or do you want to get closer to some kind of raw-input mechanism? Oh: and your game window, itself? Who’s setting that up for you, pumping your events and messages and polling for draw? If your window appears on a Wayland desktop, you cannot know its size or position. If it’s on X11 or Win32, you can. I hope you’ve coded around these discrepancies!

      • More libraries: GLFW works. The SDL works. SDL 3 is lovely. In the Rust world, winit is grand. wgpu.rs is fantastic. How much expertise, knowledge and time do you have to delve into all these options and choose one? How many “story points” can you invest to ensure that you don’t let a dependency become too critical and retain options to change your choice and opt for a different library if you hit a wall? (Embracing a library is easy. Keeping your architecture from making that into a blood pact is not.)

      NONE of this is hard. NONE of this is sub-optimal once you’ve wrapped it up tight. It is all just a massive explosion of surface-area. It costs time and money and testing effort and design prowess and who’s going to pay for that?

      Who’s going to pay for it when you could just pick up a Big Engine and get the added bonus of that engine’s name on your slide-deck?

      And, then, you’re right back in the problem zone with the engine: how close to “first-class” is its Linux support because, once you’re on Big Engine, you do not want to be trying to wrangle all of these aspects, yourself, within somebody else’s engine.