

Witcher 2: Porting Gone Wrong - ekianjo
http://pandoralive.info/?p=3671

======
coldpie
I work for CodeWeavers, a small US-based company that provides porting
services for Windows-based software to Linux and Mac using the Wine project.
Our employees contribute a large chunk of the changes to Wine.

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.

~~~
ekianjo
I know CodeWeavers and if I am not mistaken this is your technnology that was
used for the Linux port of Limbo by the Humble Bundle a couple of years ago.
Thanks for coming here to give your opinion.

> 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).

~~~
coldpie
Sure. Eon seems to have no idea what they're doing or why this problem is so
hard. I heard scuttlebutt that they're shipping Microsoft DLLs. That's a big
no-no in our offices.

~~~
Freaky
> I heard scuttlebutt that they're shipping Microsoft DLLs. That's a big no-no
> in our offices.

Yes, exactly the same redistributable MSVC and Direct3D libs most games ship
with. What's wrong with that?

~~~
asuffield
Do the licenses for those redistributable libraries permit this use? I believe
that historically the answer was "no, the license only permits its use on
Windows", but I don't know what the current status of this is.

------
sho_hn
I think Wine-based ports are a sane choice for the large backlog of older
games that aren't feasible to port natively, and don't suffer from the
performance hit involved.

I've certainly played a lot of games on Wine over the years, and it's
frequently been an excellent experience.

~~~
Shivetya
Oddly on my Mac I have to rely on wine ports or similar to run some games I
used to be able to run until OS X dropped support for the older setup; I think
rosetta did the emulation prior

------
ekianjo
Here is the cached version:
[http://webcache.googleusercontent.com/search?q=cache:http://...](http://webcache.googleusercontent.com/search?q=cache:http://pandoralive.info/%3Fp%3D3671&strip=1)

~~~
pronoiac
Coral cache should also show images:
[http://pandoralive.info.nyud.net/?p=3671](http://pandoralive.info.nyud.net/?p=3671)
(Though it hasn't loaded yet)

------
shmerl
Recent comments from Virtual Programming developers:
[https://github.com/KillaW0lf04/The-
Witcher-2-Issues/issues/1...](https://github.com/KillaW0lf04/The-
Witcher-2-Issues/issues/1#issuecomment-44976583)

 _> 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._

------
cwyers
"People who are commenting in this way completely miss the point. Linux gaming
is a growing opportunity. Nobody expects it to remain at 1% forever."

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.

~~~
ekianjo
> 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.

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.

~~~
cwyers
I know this is kind of a sidelight to the main discussion, but you brought it
up, so... is there a single instance of a AAA game being made with Unity3D?

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.

~~~
ekianjo
> 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.

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.

~~~
cwyers
Coldpie's posts in this thread seem to suggest that fragmentation is more of
an issue than you want to admit here, at least.

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.

~~~
ekianjo
> Coldpie's posts in this thread seem to suggest that fragmentation is more of
> an issue than you want to admit here, at least.

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.

------
shmerl
For the reference:

* Unofficial community bugtracker for the Witcher 2: [https://github.com/KillaW0lf04/The-Witcher-2-Issues](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...](http://witcher.gamepedia.com/The_Witcher_2_howtos_and_workarounds#Linux_version)

* Linux issues and user solutions: [http://forums.cdprojektred.com/threads/29958-Linux-issues-an...](http://forums.cdprojektred.com/threads/29958-Linux-issues-and-user-solutions)

~~~
ekianjo
This Steam discussion thread as well :

[http://steamcommunity.com/app/20920/discussions/0/5227281809...](http://steamcommunity.com/app/20920/discussions/0/522728180993106963/)

------
ekianjo
I really need to fix that server... Sorry it's out again.

------
kkedacic
Port? Windows PE executable running on top of eON is not PORT by definition of
the word.

------
mariusmg
What i found ironic about that article is :

"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.

~~~
ekianjo
> 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.

------
shmerl
The site is down?

~~~
ekianjo
Yes, still. Will be up soon again. See the cached link in the meantime:
[http://webcache.googleusercontent.com/search?q=cache:http://...](http://webcache.googleusercontent.com/search?q=cache:http://pandoralive.info/%3Fp%3D3671&strip=1)

------
FollowSteph3
I believe it's an economics problem at its heart. How do you justify the costs
of porting for maybe a 1-3% increase in sales. I don't think you can. And
that's why most ports are terrible. It's the classic chicken and egg problem.
You see it with console vs pc games and that's a much bigger increase in
sales...

~~~
ekianjo
That's why I mentioned WINE in the article. It costs nothing and would be a
much better port than they attempted with Eon.

