John Carmack champions emulation for Linux games

Valve’s upcoming Steam box has fueled a lot of chatter about Linux as a gaming platform. John Carmack has an interesting take on the topic, and he’s posted his thoughts on Reddit. Rather than developing native Linux ports, the id Software programming guru believes emulation is the best approach given the current climate.

I truly do feel that emulation of some sort is a proper technical direction for gaming on Linux. It is obviously pragmatic in the range of possible support, but it shouldn’t have the technical stigma that it does. There really isn’t much of anything special that a native port does – we still make OpenGL calls, winsock is just BSD sockets, windows threads become pthreads, and the translation of input and audio interfaces don’t make much difference (XInput and Xaudio2 are good APIs!). A good shim layer should have far less impact on performance than the variability in driver quality.
Translating from D3D to OpenGL would involve more inefficiencies, but figuring out exactly what the difficulties are and making some form of “D3D interop” extension for OpenGL to smooth it out is a lot easier than making dozens of completely refactored, high performance native ports.

Carmack goes on to say that emulation could allow developers to support Linux with "little more effort" than what would be required to get their games working with Windows XP. He does concede that Linux ports could be "up and running in a week or two," but he also points out that a lot more work is required to create an officially supported binary.

Id Software has some experience in this realm, having released Linux versions of Quake Live and Quake III Arena. In both cases, the conventional wisdom that "native Linux games are not a good market" proved true, Carmack says.

One could argue that Valve getting into the Linux gaming business could dramatically increase the size of the market, making native ports more viable. Carmack is supportive of Steam on Linux, and he actually sees it as part of the path forward for emulated games. I wonder if that means the upcoming Doom 4 will come to Linux—and Steam—in emulated form. Thanks to Phoronix for the tip.

Comments closed
    • HunterZ
    • 6 years ago

    I don’t understand Carmack’s insistence on clinging to D3D. OpenGL seems to (eventually) get all of D3D’s major rendering features, and has support on Windows, Mac, Linux and mobile devices (in the form of OpenGL ES).

    Developers like Carmack should instead be using their clout to pressure the OpenGL, video hardware and OS makers into keeping everything on-par with D3D so that it is a viable API for cross-platform hardware-accelerated 3D rendering.

    Looking for ways to cling to proprietary APIs is always a bad idea, especially when one of their main purposes in the first place is to create vendor lock-in. I don’t know why any developer in their right mind would even entertain the notion of wasting time on proprietary things D3D (or PhysX, EAX, Glide, CUDA, etc.) if targeting multiple platforms is being seriously considered at all.

      • axeman
      • 6 years ago

      wut? Carmack is one of the most stalwart supporters of OpenGL. I think he was speaking about other developers porting their D3D stuff to Linux… idTech 5 is still an OpenGL engine AFAIK.

    • jonjonjon
    • 6 years ago

    Who in their right mind spends $300+ on a video card and then uses Linux with their garbage drivers? Just cause valve is to cheap to license windows for their garbage steambox don’t think Linux will ever get games. Do all the open source tools even install games considering they aren’t open source? If you think pirating is bad on windows just wait until the open source freeloaders get a chance. Seriously who cares about Linux and gaming? If your a game dev and you want a surf ire way to lose money make a Linux port?

      • Flying Fox
      • 6 years ago

      Open source is not necessarily the “free as in beer” kind. It shows ignorance or some sort of brainwashed opinion by the other side.

      You can install proprietary stuff on [i<]your[/i<] system, whether that stuff is open source or not. Also, if Linux is for freeloaders, then why do people pay for apps on Android? Equating open source with pirating makes no sense.

    • kamikaziechameleon
    • 6 years ago

    As windows draws closer to the closed platform of OSx we will see more and more Linux. Ubuntu already crushed most of the fundamental issues with the platform. If major third parties get behind it and promote it. Google, valve, etc. it’s only a matter of time until its king of the hill again.

    • ronch
    • 6 years ago

    I can see several roadblocks:

    1. Linux distros need to ‘just work’, not ‘either work or not’.
    2. Graphics drivers need to be more robust for Linux.
    3. Linux distros need to get their act together in providing a common ground for Linux games. Android is one such distro (it is based on Linux) that got their act together and today provide a good gaming platform. This means games will work just as well and just as easily on any Linux distro, be it Ubuntu, Fedora, etc. Unfortunately, different distros have different development teams so someone needs to step forward and talk to these teams and establish a common ground. If not, I don’t see Linux gaming taking off in general and each distro will be on its own.

    Just pitching my 2 cents.

      • kamikaziechameleon
      • 6 years ago

      While I think Linux works really well assuming you have compatible hardware (something that is a hardware developers fault not so much a Linux distro thing) I agree that there should be a more uniform out of the box feeling to stock Linux distros. Not to say they can’t have all the customization we love, just that out of the gate A new user shouldn’t get so disoriented between distros.

        • TheBob!
        • 6 years ago

        While I can agree that different install systems can seem confusing, but overall installation and maintaining of a Linux system is much easier than Windows. Also it has been a long time since I have installed Linux (Currently use Linux Mint) and not had everything work out of the box. Heck if it is older hardware is sometimes works better in Linux than Windows.

    • Bensam123
    • 6 years ago

    YES! This is what I said years ago. If you want things to happen on nix, you have to make Windows applications compatible with it. That means an actual emulator that works. Game companies aren’t going to go out of their way to develop for nix because the userbase simply isn’t there. Even if games are available for nix, people still wont be using it because they don’t want to leave their other windows applications behind.

    Wine is not something that can be used mainstream so don’t even try to work that angle.

    Too bad Valve doesn’t through it’s millions at developing something useful like what Carmack is talking about… instead of certifying someone elses hardware as a ‘steambox’ and trying to push all the PC users onto it.

    • Mopar63
    • 6 years ago

    The problem with the Steam Box being Linux is that there HAS to be a solid emulation system in play. The strength of a Steam Box is the access to the vast library Steam has. If they do not have a nearly 100% effective emulator they in essence cut out 95% of their library and thus give people little reason to buy their box.

    • eloj
    • 6 years ago

    We already have “emulation”, and have had for years. I don’t understand why it’d be a “proper technical direction for gaming on linux” at this point. Now it’s about taking the next step, not keeping the status quo.

    Currently, Valve are the only ones who can do it. They’re building a library of high-quality free to play games, including DOTA2, which could be available to everyone sans the MS or Apple taxes on steam on linux.

    Personally I feel deeply that developing portable software Is The Right Thing To Do, for many reasons beyond “can I make a buck”, such as professional pride and overall software quality (because different systems will expose different bugs).

    If you’re portable, you win in the long run. As markets and technology change, being able to quickly adapt to and leverage new CPU architectures, operating systems, screen size and input protocols makes you more competitive. Of course, this requires taking a slightly longer outlook than just the next quarterly.

    • Xenolith
    • 6 years ago

    Do a proof of concept then. If you can make the game with reasonable frame rates and acceptable input lag with a high-end game, go for it. But until I see a proof of concept, I’ll remain skeptical.

    • Forge
    • 6 years ago

    This is stupid and contralogical. Granted, I’m a long-term Wine supporter (via Codeweavers proper, not Transgaming or those other joke methods), and I like WIne, but it’s always been PLAN B. If you can’t get native binaries no matter what, then you can try using Wine, usually just before rebooting to the Other OS.

    Encouraging software makers to target Wine just makes native installs less likely. Native installs are the endgame. Android is helping make that happen. Let’s not all backtrack now.

    • faramir
    • 6 years ago

    John who ?

    This man should go back to 1990s, he’s been out of touch with reality for well over a decade now.

      • Deanjo
      • 6 years ago

      Na he’s not out of touch, he has just become a corporate front man now that he has sold his software company. He could be Dave for Wendys.

    • Deanjo
    • 6 years ago

    I love how he completely ignores the fact that MS has specifically singled out WINE as a target for future patent infringement action. (Read the novell/ms agreement) The reason WINE is relatively been free of hassle is that it doesn’t currently cut into MS’s software monopolies, if linux and wine start cutting into that expect lawyers to come a knocking at which point the WINE project would probably die.

      • BiggieShady
      • 6 years ago

      That’s why I see this only happening using OpenGL with game engines supporting both DirectX and OpenGL renderers. With games made in Unreal engine providing setting to change renderers (like in the original unreal games), at least GPU problems with WINE should be minimal.

      • TheBob!
      • 6 years ago

      I think the hope is at some point in popularity developers start making most things native and we would not need Wine.

    • StashTheVampede
    • 6 years ago

    Carmack has had enough real world business use with linux clients to know that the market isn’t (currently) very viable native linux titles. There is definitely a lot of work to keep a game as “API” neutral as possible (DX vs. OpenGL) and spending that sort of time is a bit of a waste when the linux desktop user base is still too small.

    To get developers onto linux will require a leap of faith from company that puts a lot of support behind their SDK. If Valve puts Windows/OSX/Linux on the same “footing” of support for both Source and Steam, then we may start seeing more indie titles to appear on more platforms. AAA titles (Battlefield3, Crysis, etc) won’t easily come to linux/OSX because of the tools they use to build their game, but that can also change as the attitude towards linux/OSX grow more favorable.

    It’s really the chicken and egg situation — someone (with deep pockets and a drive to succeed) simply has to step first.

    • fr500
    • 6 years ago

    Wine Is Not an Emulator, wine mostly translates Windows API calls into POSIX calls and is generally way faster than an emulator.

      • bthylafh
      • 6 years ago

      When it works. The full Win32 API is poorly documented so the Wine guys have had to do a from-scratch implementation that doesn’t give 100% bug-for-bug compatibility, although that is a goal.

      • Vulk
      • 6 years ago

      Thanks for the tautology, and I know that’s the name of WINE. However what he is talking about isn’t just firing up a game on WINE. He is correct, there will be some emmulation, some WINE like operations… His solution is basically the holy grail of interop. Which should clue you in on how difficult it will actually be to write. Then again they have a great team of very smart engineers with lots of experience doing just that. So I have faith that this isn’t just hot air.

      • jeffcutsinger
      • 6 years ago

      Right, but Wine actually _is_ an emulator. It emulates Windows APIs on other platforms. This is the sense that John Carmack is using.

        • fr500
        • 6 years ago

        It doesn’t emulate, it translates, it’s not the same

          • Goofus Maximus
          • 6 years ago

          It is the same. It emulates the Windows API on Linux, and the method it uses is translation of Windows API calls to POSIX calls, and translating POSIX calls and replies to Windows API calls and replies, so that the Windows application thinks it’s talking to and receiving answers from Windows rather than Linux. Translation is merely the means by which the emulation is done.

          In a sense, we’re just arguing Apples and Fruit that grows on Apple Trees here. 😉

        • Deanjo
        • 6 years ago

        Not really, it isn’t anymore emulation then say for example an operating system that can read fat32 disks but isn’t dos or windows. That isn’t emulation, that is native support.

          • Goofus Maximus
          • 6 years ago

          Except in this case, what is read is not a file system format, but an entire application programming interface. Windows programs think they are running on windows, thanks to WINE, which translates and mediates between the Linux OS and the Windows application. That is what emulation is.

          I think you’re getting emulation confused with virtual machines, where it is the hardware itself that is being emulated.

            • Laykun
            • 6 years ago

            [url<]http://en.wikipedia.org/wiki/Wine_(software)[/url<] Read the god damn wiki article. " And Windows API calls and services also are not emulated, but rather substituted with Linux equivalents that are compiled for x86 and run at full, native speed."

            • Goofus Maximus
            • 6 years ago

            The calls themselves are not being emulated, but Windows is being emulated by the simple translation of those calls. The translater is the emulator. The windows executables have no clue how to operate outside a windows environment, and the translator is more than a translator; it is a mechanism by which Linux is made to look like Windows to the Windows executable, and the Windows executable is made to look like a Linux executable.

            Of course the API calls are not being emulated, but WINDOWS is being emulated by the simple translation of those calls. To say WINE is not an emulator because the calls are not being emulated, is like saying our brain is not intelligent because an isolated brain cell cannot pass an IQ test. You are confusing just what is being emulated. The “WINE is not an emulator” stuff is pure marketing drivel, based on the fact that it isn’t emulating CPU instructions, which of course isn’t needed in an X86 hardware environment. What IS being emulated is, and has always been, the Windows OS environment.

            As to the argument over what emulation means: [url<]http://www.thefreedictionary.com/emulation[/url<] so getting a Linux machine to have the same results (running a windows application) as a Windows machine, falls quite well into this definition. The argument here seems to be over narrowing the definition of emulation to specific subsets of emulation in electronics. Here it is the software environment rather than the hardware components that are being emulated.

            • Deanjo
            • 6 years ago

            [quote<]As to the argument over what emulation means: [url<]http://www.thefreedictionary.com/emulation[/url<] so getting a Linux machine to have the same results (running a windows application) as a Windows machine, falls quite well into this definition. [/quote<] No it doesn't as it is not imitating. It is actually executing that code.

            • Goofus Maximus
            • 6 years ago

            We’re just arguing over definitions, as I realize now we have been doing from the start. I could go on about the emulation being of an OS system rather than CPU code, since linux and windows on X86 share the same CPU instruction set, but I concede that we won’t come to any agreement on this.

            It has been an enlightening and entertaining debate, that brought in some interesting differences in what people mean by the word “emulation.”

            • Deanjo
            • 6 years ago

            [quote<]I think you're getting emulation confused with virtual machines, where it is the hardware itself that is being emulated.[/quote<] I'm not confusing the issue at all. Emulators are such as Bochs which emulates on at the hardware level. CPU, memory subsystem and devices are emulated. WINE does none of that.

      • bjm
      • 6 years ago

      Yeah, yeah, yeah… and Y2K wasn’t the millennium. Shaddup Geek!

      Seriously though, the term “emulation” is one that has evolved over time. Despite the original term of emulation meaning that of an actual electronic device being “emulated” on another platform, the term has since been expanded to mean running applications on platforms at which it was never intended.

      Take “modems,” for example. Prior to the advent of broadband, modems maintained the definition of being devices used to modulate an analog signal into a digital one. To the general public, “modems” were just the boxes that allowed internet access. And with that, DSL “transceivers” were called “modems”. Yet, they never modulate anything analog to digital. “DSL” is a “Digital” Subscriber Line, after all.

      Similarly, most gamers associate “emulators” with those bits of software that allow you to run games not originally intended for your platform. What does WINE do? You got it, allow you to run software not intended for Linux. So while it yes, it is not an emulator in the original sense, that does not necessarily mean it is not an emulator in today’s terms.

        • fr500
        • 6 years ago

        There is modulation in DSL.
        You’re right lots of people use terms incorrectly. It doesn’t change the fact that they’re doing it wrong.

    • designerfx
    • 6 years ago

    wasn’t this the same person who also said porting games is not viable like a month ago? Oh right, it was.

    [url<]http://www.theinquirer.net/inquirer/news/2242288/john-carmack-claims-porting-games-to-linux-is-not-commercially-viable[/url<]

      • sweatshopking
      • 6 years ago

      He is still talking about that. it’s even in the story. he’s still saying that, but he’s saying emulation MIGHT be worth it, since it’s so much easier and faster.

    • TREE
    • 6 years ago

    I don’t know why he’s advocating this as a solution. Games should not be programmed to use proprietary API’s such as Winsock. If for some reason there is no alternative then code that utilises platform dependent functionality should be abstracted away from engine and game logic code. Porting code should not be an issue if a code base is designed properly.

    • HisDivineOrder
    • 6 years ago

    This would be no different than when old console titles from Sega (for example) bundle the emulator with the files necessary to run the game via Steam on Windows. It’ll just be the emulator tailor fit for the game in question bundled with the game to make it run under Linux.

    It won’t be as great as a native port, but it’ll run and I imagine over time they’d manage to work out a lot of the kinks. If Steambox Linux were to take off, I imagine a lot of energy would go into this process to make it better and perhaps an official way to get listing on Linux Steam. I also suspect native ports would start to take on more urgency once there were more people out there trying to do it.

    It’s the chicken and the egg. The emulation layer bundling would lead to more people wanting to game on Linux, which would lead to less using the emulation and more going native port instead. Still, it wouldn’t surprise me if Steam didn’t come up with their own solution to this problem that bypassed or enhanced current methods in a big way. Something that might require SOME assistance from the publishers, like a standard or some such.

    • Srsly_Bro
    • 6 years ago

    Linux nerds, we need you to do the important work while us Windows people waste our time gaming. Without you, nothing important would be accomplished in a timely manner.

      • Chun¢
      • 6 years ago

      Too late, I just got CS:S working 😛

    • chuckula
    • 6 years ago

    As a longtime wine user, it’s actually pretty surprising how well you can play a lot of games (new releases included) under Wine. It’s definitely not 100% and definitely not as easy as Windows though.

    Having said that: I’m about a million times more excited at the prospect of games that are natively ported to Linux than I am about having to use Wine or any other emulator. Considering that games are often ported to Windows/Xbox/PS3/Mac (maybe) anyway, I don’t see how Linux is necessarily worse from a technical perspective than other platforms on the market for porting. Considering that IOS/Android are becoming two huge platforms for more casual games, and considering that they and Linux are all using OpenGL, I think that porting to Linux could be a bigger priority in the future.

      • derFunkenstein
      • 6 years ago

      I would expect Steam Linux releases that use Wine to come pre-packaged, kind of like Mac ports that use Cider. More exciting than configuring Wine, less exciting than native binaries. Probably good enough for everyone with a reasonable system. The Steam “better” box that they plan to sell for $300 will probably suffer, though.

      • wierdo
      • 6 years ago

      The way I interpreted Carmack’s comment was the obvious time and cost issue, something that’s been an obstacle since God knows how long.

      Lets say porting a game takes ten times more time and budget, that means the odds of the game making it to steam go down significantly, less games on Linux means less installed gamer base, less installed gamer base meas less games on Linux. Chicken and egg.

      So with that dilemma in mind one could argue they might as well bring those games in the most practical form, cost-wise, until the platform grows large enough to make porting a feasible proposition for some development houses one day.

      That’s how Carmack’s argument translated in my mind.

        • chuckula
        • 6 years ago

        I agree and disagree with Carmack, and here’s why:

        1. I fully agree that if you want to make a AAA title that is commercially targeted at the Linux desktop then you will not be looking at a money maker.

        2. However: Valve’s approach is targeting the traditional Linux desktop users as advanced beta testers & power users while leveraging the same code to reach a much much larger audience through the Valve box consoles and eventually even IOS/Android (even though they are not Linux, they share many features with Linux). So by themselves, those Linux geeks are not making Valve a big profit. However, they are providing valuable services to Valve and getting the benefit of playing and testing the games, which then get released to much larger audiences who don’t have to care about the underlying OS.

          • dmjifn
          • 6 years ago

          Valve is targeting traditional Linux neckbeards?
          When I read their press releases, it seems to me they’re wanting one possible outcome to be making a PC-game-capable console and having it boot “straight into” steam without the human having to power-use anything.

            • chuckula
            • 6 years ago

            Yeah, in order to get to the level of “I turn it on and it works” in a Valve console, somebody needs to actually test the software in an environment where debugging is easier than on a console.

            • dmjifn
            • 6 years ago

            I probably misunderstood the point of your comment, sorry. I thought you were saying that Valve’s linux stuff couldn’t be profitable because it’d only appeal to and be used by linux power users. On just the point of Valve utilizing power users to getting free beta testing, and it being of some value for them to do so – I agree.

          • kc77
          • 6 years ago

          I would disagree with your point number 1. This is why. Carmack himself showcased a working Rage on iOS within weeks of it’s launch. He himself stated that porting it to iOS was/is trivial. Why? Because of OpenGL ES. He stated this before; porting OpenGL games between systems was relatively easy.

          So why in the world would you have everyone not worry about OpenGL and use Direct X instead only to face huge issues later when it comes time to port to OpenGL? This isn’t about porting to “Linux” as it were. Linux itself isn’t an high level API. It’s an OS.

          What all of this shenanigans is about is API’s. Microsoft would prefer if everyone used Direct X. With Metro that not only means Direct X, but C# which only exists in bastardized form in Wine and Mono. Microsoft knows this and so does Carmack.

          It’s far worse to keep Wine consistency matched with a Linux desktop. Sure you might see some relevance on beefy desktop machines, but do you really think Ouya is going to be able to run Wine + Mono on ARM in any speed greater than a sloth crossing a road? I don’t think so. How about a Samsung Nexus Phone? Doubtful. So all of the developers are going to shoot their feet off when it comes time to port to mobile and lose all of that revenue? Sorry but that makes no sense. If you do the game in OpenGL to begin with you get Windows XP, 7 and 8 (desktop versions only) plus iOS, Android and Blackberry with minimal changes to the executable and changes to the graphical assets which would happen anyway.

        • nanoflower
        • 6 years ago

        That’s always been the issue. The question is who will take the time to build the needed components to do the emulation? It doesn’t seem like Wine is good enough or we would see more companies looking into using it as a basis for providing their games to Linux users. That means someone will have to do the hard work of providing the Windows emulation layer and then make that available to other companies to use (otherwise the situation hasn’t really improved.)

        That’s a lot of work to put in for a likely limited return so it seems unlikely that someone will step forward at this time. You really need some company that has plenty of money in the bank to step up and fund the work knowing that they won’t get a good ROI. Most likely they will lose money on the project but they help move Linux forward by making it a better gaming platform (and possibly enabling other Windows apps to easily run on Linux.)

      • bjm
      • 6 years ago

      By supporting the emulated platform instead, you relieve yourself of the burden of supporting multiple APIs as well as the API churn that occurs over time. The difference with native Mac, Xbox, Windows, and PS3 ports is that they are each their own single binary. Putting “Linux” in that list means more than just a single binary.

      Carmack’s proposal side step’s that entire issue. For example, picture a developer creating a game-specific Wine profile installer that can be used for that specific game. It won’t have to be as broad as a Wine release since all that would matter would be that specific game’s compatibility. Google’s Picasa for Linux was actually a good example of this.

      • Narishma
      • 6 years ago

      The OpenGL that’s used in iOS and Android is different from and incompatible with desktop OpenGL.

        • chuckula
        • 6 years ago

        OpenGL ES (which is used on Android/IOS) is actually a subset of standard OpenGL and some desktop compositors like Kwin in KDE actually use OpenGL ES. I would not say they are “incompatible” any more than saying than different revisions and subsets of Direct 3D are incompatible with each other.

Pin It on Pinterest

Share This