I primarily use my pc for gaming, and want to avoid upgrading to Windows 11. Beginning the journey of looking into alternatives.

I am ignorant, trying to be less so. I have a hard time understanding what exactly makes a game not work just because of OS.

  • Nibodhika@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    1 month ago

    There are a lot of moving parts, so let’s start from the ground up. Processors are glorified input-output machines, you put electricity in some pins, and it gives you back electricity in other pins. Some of those pins define which operation you want and others give the input, so for example sending 00000010 to the operation could mean addition, so the output pins will show the result of the addition of your inputs. Each binary number can be interpreted as a decimal or hexadecimal number, but people are bad at remembering numbers, so instead we can have a table of conversion that says for example that ADD means 00000010, so you write a program saying ADD 2 3 and that’s called assembly language.

    Each processor has their own table of which operations it can do, so writing assembly is tedious since you need to know and account for all of that. Instead you can write in a higher level language where a program called a compiler will translate your code into assembly taking all of the considerations for different processors.

    So far, so good, but there is some stuff which is recurrent and requires special care. For example a processor knows nothing of the disks or memory in the system, so you need a program to be running there to manage stuff. We call that program an Operating system.

    Different operating systems do things differently, one might store things in any order on the disk to save on write speed while others might choose to align data where suitable to save on read speed. And they provide different high level APIs for it, e.g. one OS might have the open_file(char* full_path) while other could have open(char* folder, char* file). So if a program tries to call open in an OS that uses open_file the program won’t know what to do.

    Then just like OS sometimes programs try to use libraries that they expect to be installed in your system, such as DirectX on Windows. These libraries also have their own functions that the program tries to call.

    So now we get to a game which is trying to call a function from DirectX which is trying to call something native to Windows. There’s no way Linux knows what to do with that.

    So a few people realized that if they reimplemented the functions from windows but calling the equivalent functions on Linux you could get the programs to run. They also realized that you can reimplement DirectX using OpenGL calls, or more recently Vulkan. Putting those stuff together almost every call a game is likely to make calls one of these reimplementation which in turn calls the Linux kernel, which in turn calls the corresponding set of instructions on the CPU to do stuff the Linux way. The end result is that most things work, however sometimes the game developer tries to be smart and makes assumptions about how the OS will do something, and then face some errors because Linux did something slightly different.

    But the VAST majority of times when a game doesn’t work is because the game developer is actively trying to ensure you’re not doing anything weird, such as running the game on a different OS.

  • unknowing8343@discuss.tchncs.de
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    1 month ago

    Most “normal” programs use some “abstraction” libraries, so the programmer doesn’t need to know which platform it is running on. This “platform” is important because it is the layer that actually talks to things like your SSD, RAM, GPU, etc.

    Videogames, tho, are very very specific programs that really benefit from very optimized code, so some of these “abstraction” libraries simply will be worked on for a specific operative system.

    Thankfully, the people from the WINE project and lots of work from Valve themselves have made it possible to “trick” these libraries into thinking they are talking to Windows. It’s not perfect, tho, so some stuff is still not working, but you’d be surprised how much we’ve got already. Check out the ProtonDB project.

  • Teppichbrand@feddit.org
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    1 month ago

    This is a little offtopic and a Lemmy cliché, but:
    Go and try Linux Mint! I was a Windows fanboy for more than a decade, now I’m all team Linux. It doesn’t run all games (I’m not a huge gamer, so no expert) but most stuff i want to play is no problem at all. I edit videos with Davinci, produce music with Bitwig plus there so much great free open source software. Working in Windows nowadays makes me nervous. It’s so predatory and dishonest. Try to get off while you can, it won’t get any better. And it’s so much fun to explore a new OS with an opened mind and some curiosity.

    • Sturgist@lemmy.ca
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      1 month ago

      Mint is a great general entry point to Linux.
      I’d say Pop!OS or Garuda Gaming edition for traditional style, and Bazzite for “Atomic”(harder to accidentally Bork), are better ootb(out of the box) gaming distros. I.e. less downloading and tweaking to get games running, more things installed from first boot.

  • Guenther_Amanita 🍄@slrpnk.net
    link
    fedilink
    arrow-up
    0
    ·
    1 month ago

    Ususally, like 99% of the time, it’s absolutely the fault of the game developers and by choice.

    Pretty much any game can run on Linux nowadays. Some do even run better than on Windows, but most equally good or a tiny bit worse.

    The main problem is (very invasive kernel level) anti cheat.

    And sometimes, games work fine on Linux, and then the devs actively lock out Linux users for some ludicrous reasons.

    You can visit protondb.com for a very nice overview of which games work and how well they do.

    • navi@lemmy.tespia.org
      link
      fedilink
      arrow-up
      0
      ·
      1 month ago

      That’s putting a lot of blame on devopers.

      Not all games have a ton of contributors on ProtonDB and that’s not the developers fault.