|In order to run your Windows games we will need the help of several tools: WINE, Dx Wine, Winetricks and LutrisIn this tutorial we will see how to install and configure each of them.|
Table of Contents
Introduction to WINE
As everyone knows, Linux does not support .EXE files. So how the hell can Windows programs run? Well, some geniuses made a program called WINE, which means Wine is not an emulator, which is one of the ways to run a Windows program under Linux.
But, if it is not an emulator, how does it do?
The reason Wine is not an emulator is that emulators tend to duplicate the entire environment a program lives in, including simulating a given microprocessor architecture. Wine, on the other hand, implements what could be called a compatibility layer, which provides alternatives to Windows libraries.
That is good? Yes and No. Let's tell a couple of truths ...
Better use of RAM
Windows (in any of its versions) has a significant number of programs loaded in the RAM memory that in Linux are not usually loaded (read, antivirus, antimalware, etc.). WINE, it doesn't do that. Consequently, it consumes fewer resources than Windows.
Direct X is the most used API in Windows games and is exclusive to this operating system. Linux, for its part, uses OpenGL.
So how does Linux run games that require DirectX if it only uses OpenGL? That's where the magic of Wine comes in: it makes OpenGL emulate DirectX.
The result? Obviously, when emulating, you lose performance.
Do games run better on Windows? I would tell you that it depends on the game. However, the answer is YES, precisely because of the Direct X emulation. It could be said that games based on Direct X 7 work the same on Windows as Linux, but with DX9 onwards things change a lot: approximately 20% less performance.
Games for Windows
It is extremely difficult for Wine to run the games that come with this system. For this reason, to this day, it does not run, for example, games like Street Fighter IV, Resident Evil 5 or Gear of Wars.
A different Windows for each game
One advantage that WINE has is that if you want you can make an old game run on Windows 95, and a new one on Windows 7.
And not only do the options end there, but it also allows the installation of other programs, such as the framework, directx, and everything you can think of.
And that is where WINE makes the most of its functions since, for example, there are games that work well with Windows, with x programs installed, etc.
This also means that if you use a general WINE configuration, there are games that are going to perform better and others that are worse. Therefore, to run games it is convenient to run WINE using a program called PlayOnLinux, which tells WINE to run Windows perfectly configured for that game. How about?
Windows video drivers are better than Linux ones
All tests indicate that when running, for example, Open Arena, both in Windows XP and Linux, in Windows it throws more frames. In other words, in Windows the screen is refreshed faster than in Linux, which means that it takes better advantage of the video card.
This does not happen because the game is not native or because of WINE or another emulator. The tests have been carried out by running the respective native executables for each operating system. So? The answer is that, eliminating all the other factors, it only remains to say that the video card drivers for Windows are better (from a technical point of view) than Linux.
I recommend installing the beta version of Wine, because in many cases it has improvements that are not in the stable versions, and more in the latest version 1.3.28 that works spectacularly and with a lot of improvements. Once finished, you should have Wine and Winetricks installed. You also have the possibility to install Lutris, PlayOnLinux y Vineyard that can be quite useful, but we will leave that for later.
The first thing we have to do is install DirectX.
Dx Wine is the best way to install DirectX.
Download Dx Wine (the wonderful program made by kuboode) that easily installs DirectX 9c in Wine. It's great and it even gives you the option to have Dxdiag.
You have the option to install DX10 and DX11, it all depends on whether the video cards you have support it or not.
|DxDiag, ideal to know if all the hardware is recognized in Wine.|
Visual Basic, .Net, etc
Then, with Winetricks you can install the following programs that, although they are not mandatory, may be necessary to run a game.
- vcrun 2005 (Visual C ++ 2005)
- vcrun 2008 (Visual C ++ 2008)
- vcrun 2010 (Visual C ++ 2010)
- dotnet20 (Framework NET 2.0)
- dotnet30 (Framework NET 3.0)
- dotnet35 (Framework NET 3.5)
- dotnet40 (Framework NET 4). This one does not appear in Winetricks. It can be installed manually.
There are many more things to install. Take a good look at the options that Winetricks gives. What you need depends on your machine and the applications you want to use. However, the above could be said to be the minimum and indispensable.
Configure Wine options
Open Winetricks and select "Select the default wineprefix" and "Change settings". For me the best configuration is this:
- ddr = opengl
- dsoundhw = Emulation
- glsl = disabled
- multisampling = disabled
- mwo = enabled
- npm = repack
- orm = blackbuffer
- psm = enabled
- rtlm = auto
- sound = alsa
- strictdrawordening = disabled
- vd = off
Of these options, there are 2 that improve performance
- OffscreenRenderingMode, when setting the FM (Framebuffer) option, it throws several frames, freezes, and does the same thing over and over again. So any game is unplayable. For this reason, "backbuffer" is recommended.
- Direct Sound: Hardware Acceleration, change Complete for Emulation. This greatly increases performance and compatibility over "full".
Also, to gain performance, you can disable GLSL and MultiSampling, but you lose graphic quality.
If WINE, even after all this, does not detect the video card, do this:
Once you have changed the options, I opened the .wine directory in your user folder, and then I opened a file called “user.reg” (the registry keys created by the user are stored there).
There look for [SoftwareWineDirect3D] and at the end add:
"VideoDescription" = "Enter the video card model with quotes" "VideoDriver" = "nv4_disp.dll" "VideoMemorySize" = "Enter the video card memory"
In my case, it looks like this:
[SoftwareWineDirect3D] 1318967087 "DirectDrawRenderer" = "opengl" "Multisampling" = "disabled" "NonPower2Mode" = "repack" "OffscreenRenderingMode" = "backbuffer" "PixelShaderMode" = "enabled" "RenderTargetLockMode" = "auto" StrictLockMode "=" RenderTargetLockMode " "disabled" "UseGLSL" = "disabled" "VideoDescription" = "GeForce 7025 / nForce 630a / PCI / SSE2 / 3DNOW!" "VideoDriver" = "nv4_disp.dll" "VideoMemorySize" = "512"
Ready! WINE is ready for war!
We already use WIne, Dx Wine and Winetricks. Now we are going to enhance all this with a program called Lutris.
Introduction to Lutris
Lutris with some of my biggest vices ...
Lutris is a program that groups all the games on a single platform, something similar to Steam.
Its characteristic is to support ALMOST EVERYTHING, but look at the list of things that are bank:
- Linux native games.
- Windows native games.
- MAME games.
- Friend 500, 600, 1200.
- Atari 2600, 800, 800XL, 130XE, 5200, ST, STE, TT, Lynx.
- Bandai WonderSwan, WonderSwan Color.
- Online browser games like Quake Live, Minecraft and all flash.
- Commmodore VIC-20, C64, C128, CBM-II, PLUS / 4.
- LucasArt SCUMM (Monkey Island, Maniac Mansion, etc).
- Magnavox Odyssey², Videopac +.
- Mattel Intellivision.
- Microsoft MSX, MS-DOS.
- NEC PC-Engine Turbographx 16, Supergraphx, PC-FX.
- Nintendo NES, SNES, Game Boy, Game Boy Advance, Gamecube and Wii.
- Sega Master Sytem, Game Gear, Genesis, Dreamcast.
- SNK Neo Geo, Neo Geo Pocket.
- Sony Playstation.
But the best of all is that for each game it gives you many options, so it is MORE THAN RECOMMENDED that you use it, since there are many Wine options, which depending on the game you can change, without affecting either Wine or the other games. It's like PlayOnLinux, but Lutris seems better to me, because it not only gives you access to Windows games, but to a huge number of emulators.
In closing, say that there are no substantive improvements in Lubuntu and Xubuntu. One might think that using less RAM memory would impact WINE's performance, but no. Presumably this happens because Wine is handled using mostly CPU and video card.