Witcher 2: Porting Gone Wrong
pandoralive.info
pandoralive.info
Obviously this port was botched, and the article is right to be annoyed at such a low effort port. I'm here to say that it is a really hard problem, even for experienced porters like ourselves. Proprietary software, especially games, on an open source operating system is hard. You've got libraries changing underneath you in incompatible ways, so you've got to support both versions of the library, or even ship your own build of the library. You've got any number of different desktop environments, which makes integration with the native environment hard. You've got about the same number of different window managers, each of which handles window messaging, stacking, etc in different ways. Each operating system, and often even each operating system version, has different package names, making dependency resolution a special hell.
Shipping proprietary software on Linux is a Hard Problem. You can target specific distros, but you'll still have unhappy users who (rightly) want their distro supported. It's a very long tail.
This port was botched, but I bet they're trying to get in on the SteamOS wave. It's hard to blame them for wanting some nominal support for Linux, and thus SteamOS, but they clearly chose the wrong contractor to provide the service.
All that said, I do have one issue with this article:
> They did not communicate the fact that it was not a proper native version, but simply a wrapped Windows version. It was fully advertised as “now available for SteamOS”, giving the false impression it was recompiled for it. Not a very good idea to hide stuff like that.
We get this complaint a lot. When your application is built using DirectX and other Windows APIs, doing a native port to another platform's API can be very expensive. It's not as easy as switching the Linux switch and running make.
Properly done ports are nearly indistinguishable from a game built natively on Unix APIs. In a kind of perverse way, you can actually get better forwards compatibility with a non-native port like this. As the old binaries rot and fall out of compatibility with modern desktops, you can just pull out the Windows executables and run them in a modern version of Wine.
Think of Wine (or this Eon thing, if it were done properly) not as a wrapper, but as a library that the authors decided to target their application for. You can then upgrade your library and still run the application that targeted it.
> We get this complaint a lot. When your application is built using DirectX and other Windows APIs, doing a native port to another platform's API can be very expensive. It's not as easy as switching the Linux switch and running make.
Yup, but the point I mentioned in the article is that Witcher 2 now runs almost perfectly under Wine and it would have been a much better port if they just used Wine instead of Eon, and the cost would have virtually be free (of course, testing would cost money).
Yes, exactly the same redistributable MSVC and Direct3D libs most games ship with. What's wrong with that?
I thought steam provided a runtime with libraries so that this isn't a problem?
> Shipping proprietary software on Linux is a Hard Problem.
I would think this is a hard problem for everyone except Steam, which happens to also be a digital distribution method.
Nope. Steam provides some libraries to hook into their platform code, stuff like friends lists and multiplayer. But it's mostly just a delivery platform. The applications are just applications and can do whatever any other application can do, including rely on system libraries.
I thought Steam was dealing with this by doing symlinking of libraries instead of relying on system ones ?
The problem with Witcher 2 (an excellent game btw) is that it didn't run well even in Ubuntu's default wm, or in openbox, or on Linux at all.
I've certainly played a lot of games on Wine over the years, and it's frequently been an excellent experience.
> We are looking into the performance issues as a serious task, as obviously this will affect any other Linux games we do as well as Witcher 2. Despite various claims made, we want to get the best performance we can!
We will confirm support for AMD's fglrx driver when they have shipped a non-beta release that allows the game to run correctly, though it does seem that the 14.4 rev2 driver largely addresses this. On my personal machine with a Radeon HD 7750, I get an ASIC hang with this driver after playing for roughly half an hour - so I am currently hesitant to "officially recommend" it.
On my machine, using PlayOnLinux, Witcher 2 performance is worse than our port is. However, with the CSMT patch, it does appear to be much better. We are looking into why this is, and suspect that the issue comes down to poor multithreading in GL currently, which is exactly what CSMT avoids by making all GL operations occur on a single thread.
Witcher 2 is making use of multi threaded Direct3D 9 support, and we are implementing this in eON by using shared GL contexts, one for each thread. The context share resources such as textures and vertex buffers. We are investigating whether this turns out to be a big performance hit or not.
I'm sure SOMEBODY does, and anyway that's a bit of a strawman -- if Linux triples its marketshare it's still under 5% of the PC gaming market, which itself is often not given the same amount of attention as the primary two consoles. And if the bulk of big AAA game ports to Linux are badly-wrapped Windows games, or even well-wrapped Windows games, then it seems hard to see what will motivate more than a small portion of gamers to leave Windows.
EDIT: And Valve can throw as many resources as it wants at Linux gaming, the general problem of making Linux into a desktop OS capable of competing alongside Windows and OS X has had a lot more resources thrown at it in the past, and unless and until that effort finally pans out, having Linux gaming as a functional subset of Windows gaming is not going to induce people to switch en masse.
There are many ways to develop games nowadays for multiplatforms. If you use C++/SDL it will run on all systems in the very same way and you don't need to spend time porting. If you use Unity3D you can export for all formats including Linux (x86). If you use Unreal Engine, CryEngine you can now export to Linux as well.
Seeing the massive amount of support for Linux in the middleware/engine area, I'd be very surprised if most future Linux versions are not Linux native ones. Of course Witcher 2 was developed way before this current state of things so it could not benefit from the same tools and it was anyway built for Windows in mind in the first place.
And using third-party engines doesn't directly address a lot of the other questions about Linux gaming (drivers, fragmentation, back-catalog games), it doesn't help out with the large number of AAA games that are made on first-party engines (Square Enix uses a lot of Crystal Engine, Ubisoft has a handful of its own engines, EA games use their own engines for the most part), and it doesn't help turn Linux into a more compelling general-purpose desktop OS. Generally in order to convert people, you need to be able to offer something better than what they currently have (for THEIR definition of better, not yours), not close-to parity on a subset of what they currently have.
EDIT: And third-party engines make it easier to port, so long as you're using them as-is. If you have a source code license and you're modifying the engine, then you're right back to supporting another platform in code. And even if you're shipping the stock engine with your game, you still have an increased testing and support burden when you ship a game for Linux.
Wow, a lot of points made in a very few words. Here's my take on your comments:
* Drivers: massively improved for nVidia cards, probably very close to Windows performance nowadays. For ATI, I guess the state of it is "meh", but it's getting a bit better progressively. For now gaming on Linux should be with nVidia (and Intel).
* Fragmentation: this problem is a myth and has been debunked so many times already, I don't want to discuss it here.
* Back catalog games: a lot of it can be handled with WINE with no additional modification needed.
* AAA games engines: Square Enix is a Japanese publisher, focused on Consoles first, then PC, and when they mean PC they only have the image of Windows because Linux is non-existent in Japan (mostly). So I would not be surprised if they were the very last ones to jump on the bandwagon. UbiSoft has become a "console first" publisher as well, so I don't hope much from their side as well.
* compelling desktop OS: Linux in some of its best distros IS already very compelling, much more than Windows 8 where you have to relearn everything from scratch again. It's faster, you have repositories for updates, Firefox runs like a dream on it (on the same hardware I always find the Windows version running way more slowly), and you have great Free Software for most of the uses you need, without viruses, ads and stuff like that. It's VERY functional. Of course some people will bitch about not having Adobe products, or X or Y software, but you can always keep a double boot or a virtual machine if you really need something. Distros get updates automatically, instead of the ancient way of doing updates on Windows with service packs and the like. Since I've switched to Linux years ago I have never looked back, except for games and video editing. And I know I'm not the only one, and I see Linux distros improving release after release.
In terms of drivers... "very close" is not the same as "as good as," much less "better." Which is again the problem here -- in order to supplant a dominant market leader you actually have to do something better. If your drivers are VERY CLOSE to the quality of Windows, for a a subset of the leading manufacturers, and you can get MOST of the big AAA publishers to do ports, and a LOT of the back catalog can run under WINE... do you see what I'm saying? It's playing catch-up, and it's not quite getting to parity, and even parity is unlikely to get significant market share.
As for desktop Linux -- that's a whole other kettle of fish, but I think you'll find that most of the people who are ready to switch to Linux on the desktop already have, and as you say are dual-booting for games. Unless something happens there to convince more people that Linux on the desktop is a compelling alternative, then Linux's overall desktop market penetration is probably a pretty good guide to what Linux's share of the gaming PC market could be unless Valve or somebody is able to provide a compelling "better than Windows" experience in at least ONE aspect.
Coldpie's answers about Steam suggest he does not really know how Valve adresses these concerns, however. In a matter of days, the Steam client, originally only made to run on Ubuntu, was running on all other major distros and games ran without issues as far as I know. I don't use Ubuntu and I have had zero problem so far with running Steam Linux games.
> Which is again the problem here -- in order to supplant a dominant market leader you actually have to do something better
You don't have to supplant a dominant leader to exist. Macs exist just fine without being leaders on the market. Even for gaming I'd prefer run the SAME game on Linux if it were available just because my OS is faster to boot, and uses less resources than Windows and therefore my game can benefit from additional RAM and less overhead.
> It's playing catch-up, and it's not quite getting to parity, and even parity is unlikely to get significant market share.
It does not matter. These are additional consumers you are leaving off the table if you don't provide games for them. If your game sell millions, 1-2% is in the order of several dozens of thousands of paying customers. You may consider it to be negligible, but that's literally a couple of millions USD of revenues you don't get, and if you planned your game to be multiplatform in the first place, there's no reason not to service them.
> but I think you'll find that most of the people who are ready to switch to Linux on the desktop already have,
I believe Linux can grow much, much further than where it is now. Currently its awareness in the general population is close to nil. Only people like us know about Linux, and we're a super small minority. Even among gamers Linux awareness is very limited, so there's a lot that can be done in that field before saying the "Linux market is capped".
> unless Valve or somebody is able to provide a compelling "better than Windows" experience in at least ONE aspect.
Steam Machines will(should) be better than consoles (power wise) and Windows (direct boot into gaming system, OS stripped to the bare essential) and could drive further adoption of Linux, and there will be quite a number of games available for them when they launch.
I'm hopeful. But it will take time. Windows gaming will not go away in a single day.
Valve is also making considerable investment in abstracting away all that fragmentation and drivers worries through the Steam Runtime (linked to in another comment).
You'll probably have to explain to me how having more games being developed and released for the platform is going to attract LESS gamers in the future. It can only go up, and more so when the Steam Machines are out. Maybe it will go to 2% only, maybe 10%, who knows, but betting on it stagnating is not very credible.
* Unofficial community bugtracker for the Witcher 2: https://github.com/KillaW0lf04/The-Witcher-2-Issues
* Witcher wiki - howtos and workarounds (Linux version): http://witcher.gamepedia.com/The_Witcher_2_howtos_and_workar...
* Linux issues and user solutions: http://forums.cdprojektred.com/threads/29958-Linux-issues-an...
http://steamcommunity.com/app/20920/discussions/0/5227281809...
"Hopefully other publishers and developers take note of this, and see the excellent work done by 4k Games on Metro Last Light as an example of what should be done instead"
Except the Linux version of Metro LL is inferior (not by much though) to the Windows version.
Yeah, but the framerate is excellent and the game is very close to the Windows version apart from some missing effects. There are videos on youtube comparing both and it's clearly what I call a "good port", even if not exactly as good as the Windows version.
- http://store.steampowered.com/app/286690/ - http://store.steampowered.com/app/287390/
These will also have linux ports, it'll be interesting to see how the Metro LL port fares this time around. I can't get my wireless Xbox controller to work right on LL so I might as well wait for the Redux versions.