Years ago, Microsoft decided that Windows would be the gaming platform. Currently if you own a gaming PC, it’s probably running Windows. There’s a lot of historical and technological discussion to be held over this fact that has held in the PC gaming community for countless years.
Really you could say it all began with Microsoft having a jealousy of the old timer consoles like Sega Genesis. They were running all sorts of neat games in the day. DOS did have games as well of course, but there was a fundamental difference. Look at today, if you make a game for the X-box 360, you know it’s going to run on X-box 360 hardware. If you write a game for PC however, there’s all sorts different types of hardware you could encounter. Nowadays encountering different types of hardware isn’t as problematic. In many languages such as Java, a programmer really has to think little of it. Even someone who writes their games in a lower lever language like C++ can for the most part avoid trouble with today’s fancy development libraries and engines. Back during the times of DOS though, developers had to do more of their own work ensuring that their games ran on different machines.
I mentioned libraries minimizing this issue, and a library was exactly what Microsoft created. DirectX was born at this time to give game developers a way to write games that could be built for Windows and be distributed. DirectX was especially important for Windows because it was an OS that enforced more rules than DOS, using resources to keep a more cooperative system. DirectX was designed so that game developers could still eek that performance they wanted.
How this ties in with this article though, is the fact that DirectX was unsurprisingly only made for Windows. To this day it only runs on Windows, and not on Linux or Mac. There is a noble counterpart however (sort of).
OpenGL is a cross-platform rendering library, it in short runs on anything provided you use it compliantly. It doesn’t make sense to compare it directly to DirectX, as OpenGL is soley a graphics library, while DirectX encompasses things needed for a game in general. You’re better off comparing OpenGL and Direct3D.
You can make OpenGL today run on Windows, Linux, iOS, Android. Hell you could write OpenGL code for the Dreamcast still. The only catch being you have to interface it properly with the platform in question. There are however plenty of libraries nowadays that run with OpenGL and handle these kind of details for you.
The thing is, OpenGL and Direct3D have been competing for years, and there hasn’t been a victor. I say we should want OpenGL to come out on top, but it hasn’t. There’s already a lot of games and game engines written with Direct3D. It won’t just step out of the picture suddenly.
There is plenty you can learn about the long standing conflict between OpenGL and Direct3D, but I feel it’d be out of the scope of this article to go too far in depth. So I’ll summarize below.
Many games are written specifically for Windows (use DirectX) and cannot be simply ported to Linux (Don’t use OpenGL or know how to communicate with hardware on Linux). This means that either the game just doesn’t work, or you have to have software such as Wine to use it. Wine is always getting better, but in the end it’s a work around to an application not being able to run native to Linux.
With the past somewhat explained, let’s talk about now and the future, and the implications of Linux becoming a key player in the gaming world.
First of all, there’s nothing about Linux itself that makes it a poor platform for games. As a matter of fact, there are a few really nice pros with Linux, some obvious, some not so obvious.
One that’s great and not known to all, is the fact that Linux distributions tend to be lightweight, some more so than others. The minimum amount of RAM you might need for a game could very well be lower on Ubuntu than on Windows 7.
Secondly, and obviously, Linux is totally free. This is a no brainer, but I really must point this out. It’s an entire OS for free, Windows can cost a lot depending on which version you’re getting. So maybe in the future you could spend that money not on Windows, but for more RAM, or a better GPU, etc.
Third point, games do have potential to run better within Linux. Now, I don’t want to get misleading here. Some games today run better on Linux, while some better on Windows. There can be all sorts of reasoning behind this. All in all though, because of the lesser overhead with Linux, there is potential for greater performance. We’ve seen examples with some of Valve’s AAA titles running superbly on Ubuntu, even better than Windows. The catch is some video cards don’t have the best driver support in comparison to Windows, and the games that do run well on Linux are very likely to be running on OpenGL, not Direct3D.
Now, I just mentioned Valve, let’s talk about Valve. It’s no secret Gabe Newell decided Linux needed some love. It’s also no secret that Valve has actually created their own distro of Linux, creatively titled Steam OS. Valve promised to make their own games run on Linux, and they were serious about it. I was very happy when I switched out of Windows to (you guessed it) and found that I could still play Dota 2 just fine. Some of my favorite titles such as Mount and Blade: Warband also still worked. There are games being released with builds for Linux on Steam, and the number of these games are increasing. Valve is playing a huge role in Linux gaming, what I really believe is the needed push to make Linux gaming dreams come true.