OpenGL vs DirectX: 1 – 0

Since Valve announced their official support for Steam into Linux platform, everyone is acting crazy. Quite recently, Valve’s boss – Mr.Gabe, said that “Windows 8 will be a catastrophe for PC game makers”. The next day, Blizzard’s vice president – Mr.Newell shared his thoughts via twitter saying that “I think Windows 8 is a catastrophe for everyone in the PC space* – not awesome for Blizzard either”. The questions is …

why top game makers are not happy with Windows 8?

DirectX and Windows domination

Since the beginning of Direct3D, Windows operating system has been dominating the gaming industry for years. For a long time now, hardware manufacturers like AMD and nVIDIA were supporting Microsoft by implementing DirectX into their products. Thus, if you wanted to play Assassin’s Creed I  in best quality, you had to buy a new GPU supporting DirectX10, but in six months later, if you wanted to play Assassin’s Creed II also in best quality, you had to buy (again) a new GPU supporting DirectX11, and so on…

Regardless of GPU, when the first AMD 64bit processors came into play you had to keep up with the Joneses. New games using top graphics are now equal to heavy multi threaded applications. Thus, if you wanted to play Dragon’s Age I, you had to buy a dual core processor, but in six months later when Dragon’s Age II was released, a new quad core CPU was required to avoid the bottleneck. So, hardcore gamers have no other choice but overclocking or buying new hardware once in a while.

Alternatives: PlayStation3, Nintendo Wii and XBox360

Playing PC games became an expensive hobby for the majority of people and especially for enthusiasts. As a result, more and more gamers turned into consoles as a fair alternative and affordable choice; one machine dedicated for gamers and games only – pay once and play forever. Nintendo Wii, Microsoft XBox 360, Sony PlayStation3; are all of them great alternatives for descent gaming experience.

This turn out of events had an impact to the gaming industry and soon enough they start paying more attention to console development rather than the Desktop PC. As a result, the majority of game titles are now released in consoles first and then after some months of delay they are ported into Windows and Mac. Things became ever worse, since all the kick-ass titles are not available for PC. Metal Gear Solid 4, Gears of War 3, God of War, Tekken, Dante’s Inferno, and others… are only consoles’ exclusive titles meaning you have to own a console to play them.

Frankly speaking, current PC games are bad-ports of their console version. So, even if you are willing to pay a fortune buying the latest hardware, still you will be unable to live the best gaming experience. Thus, more and more game makers are no longer interested in PC game development, while Blizzard and Valve are already looking for alternatives to Windows 8 and DirectX. But why now?

Tablets, smartphones and embedded graphics

When things come into performance, recent trends like Android tablets prove that OpenGL technology can easily replace desktop PC for daily tasks, such as browsing, music, movies and games.

We have seen many tablets and smartphones using dual core processors while the latest Samsung Galaxy 3 comes with a Quad core CPU. Using webgl and open technologies all these portable devices are able to play games, like Angry Birds. The majority of Android and iPhone games is based in gameplay success; meaning you can use your hands and your body instead of holding a joystick. After all that’s why they are so popular with hand-held devices.

If you wondering how such a little device can play games like Call of Duty Modern Warface 2, ask yourselves how an old and outdated gaming console like PlayStation3 using Linux can still outperform today’s PC. Did you find the answer? Valve did!

Linux and OpenGL strike back

Today, Valve Linux Team posted a great article called “Faster Zombies“. They are trying to develop a Linux version of LFD2 using OpenGL and Linux kernel instead of Direct3D and Windows. So, they modified the game for OpenGL and Linux kernel and optimized the drivers; the result was shocking. The most part of the code was taken from Mac OS and after some modification the result was quite impressive: 315 FPS

The cause . . .

This experience lead to the question: why does an OpenGL version of our game run faster than Direct3D on Windows 7? It appears that it’s not related to multitasking overhead. We have been doing some fairly close analysis and it comes down to a few additional microseconds overhead per batch in Direct3D which does not affect OpenGL on Windows. Now that we know the hardware is capable of more performance, we will go back and figure out how to mitigate this effect under Direct3D.

. . . and effect:

After this work, Left 4 Dead 2 is running at 315 FPS on Linux. That the Linux version runs faster than the Windows version (270.6) seems a little counter-intuitive, given the greater amount of time we have spent on the Windows version. However, it does speak to the underlying efficiency of the kernel and OpenGL.

Laptops/Netbooks and embedded graphics

Right now, any laptop using embedded graphics is unable of playing games in normal/high quality settings. Valve understand that today’s hardware is more than capable of playing their games using OpenGL and Linux instead of running Windows 7 and DirectX. So, using Linux and an Intel Core i3/5/7 processor you will be able to play descent games, only with the help of your integrated GPU. Likewise, all Intel powered netbooks and laptops running Linux will be pretty much able to play Valve games with high framerate.

Answering the very first question

It’s pretty obvious that Windows 8 target into the tablets and smartphones domain, where battery life and quick response are key factors to success. So, it’s not surprising that Windows 8 is more lightweight than Windows 7. Although, games are power-hungry applications that use many resources. In such manner, we expect more powerful tablets to be shipped with Windows 8 launch. However changing the hardware and implementing a more powerful integrated GPU, there will be consequences into wattage power, thus limiting battery’s life. Even though, using OpenGL instead of DirectX, Windows platform will never outperform Android and iPad gaming experience. See what happened with PC Games and consoles.

It’s new and untested market, where top companies like Valve and Blizzard are not sure whether it’s worth to spent time and money implementing games for Windows 8. Instead, open technologies are much more attractive. Linux is open source, runs everywhere and its lightweight.

So, trying to answer the very first question of the article, let me tell you this: Windows 8 will not be a catastrophe for Desktop PC, but they will have dramatic influence for all the other portable devices.

As a Linux user I couldn’t be happier! Valve is going into Linux for good. Linux users are very excited for that turn of events and now Linux will have everything it needed, games and drivers, to be accepted by more users.