Saturday, October 06, 2007

Why DirectX is a multi-million dollar mistake

This is a follow-up to a recent post where I copied in contents from a post from the Cedega forums. While I've covered this topic before with a post about an ExtremeTech interview, I think I need to give this topic it's own post.

Okay, the idea is that Microsoft's DirectX is not a viable choice for developers as using DirectX will cost publishers millions of dollars to code around or with DirectX. First, we do need to set some history for what DirectX is, and what DirectX does.

DirectX, as I understand it, is the universal name for Microsoft's interconnection technologies. With Disk Operating System (DOS) items like printers, sound cards, and graphics cards had to be explicitly coded into programs. So if you went out and bought a Voodoo Grpahics card... you could only use applications that specifically had Voodoo Support coded in. If you bought an HP printer, you could only use the printer with applications that supported the printer directly.

Back the DOS days users had to carefully match software and hardware.

To their credit Microsoft was one of the first vendors, if not the first vendor, to try to break the hardware and software matchup. The Direct API was one of the first attempts at creating an underlying bridge between the hardware and the software. Hardware such as printers and graphics cards talked to the Direct Protocols, which in turn talked to the OS. Software talked to the Direct Protocols, which in turn talked to the hardware.

Thus users were freed from having to match specific hardware with specific software. That HP printer not working? Replace it with a Cannon.

As time went on the DirectX graphics portion took a greater emphasis. Currently updates to DirectX generally emphasize graphics support, although running the command dxdiag shows that the Direct protocols have a hand in Networking, Sound, and I/O operations.

The only competitor DirectX has in graphics is the OpenGL standard. OpenGL was originally created by SGI if memory serves, and is the default rendering API used in high level movie studios. Remember the computer generated special effects in Star Wars? That's OpenGL. Seen a Pixar movie? That's OpenGL. Seen a Dreamworks Animation movie? That's OpenGL.

Played DoomIII? That's OpenGL. Played Quake4? That's OpenGL. Played a Playstation3 game? That's OpenGL. Played a Wii game? Chances are it was built with OpenGL shaders. Played Metroid Prime? Yes, that is reported to be OpenGL as well.

So, DirectX is a competent product... and OpenGL is a competent product... why is DirectX development costing developers and publishers millions of dollars... but OpenGL is not?

Answering that question involves having to take a look at the entire graphics market, and forgetting commodity x86 and x86-64 hardware.

Fact is, DirectX graphics only work on Microsoft platforms which are a decided minority outside of x86 and x86-64 commodity hardware. Microsoft has less than 2% of the Cellphone / smartphone market. Microsoft based PDA's have similar low percentages of market penetration. DirectX only works on 2 game consoles.

DirectX 10, which offers Shader Model 4.0 support is only supported on the Microsoft Vista release.

So, if developers or publishers build with DirectX they lock themselves into a very limited number of platforms. This generally is not a problem for specific game developers like Bungie who have little, or no, intention of taking their products to other platforms.

But for major publishers like EA, Activision, and Midway? DirectX is a costly maneuver.

Thing is, OpenGL shaders can be run across all existing major platforms, from Cellphones and PDA's up to massively powerful home consoles like Playstation3 and Xbox 360. As I read existing Kronos's documentation on the OpenGL API, it seems to be a fairly trivial task to convert from Shader Model 2.0 to 3.0 to 4.0.

At first glance this does seem like a fool argument. Unreal Tournament III is not going to on CellPhone/PDA hardware, it needs something with some serious horsepowers. Same thing used to be said about Doom... yet I'm seeing Doom pop up on Cell Phones now. IDSoftware is also examining turning Quake 3 Arena into a browser accessed game.

So... lets pose this question. In 8 or 9 years... what's to say that UT3 will be as UT'99 is today? Can you imagine a version of UT3 ported to a successor of the DS? Without having to re-write the graphics code?

The cost of using DirectX over OpenGL is highlighted even more by the release of Microsoft Vista. Consumers who bought graphics cards with Shader Model 4 support have been continuously told that Shader Model 4 visuals are only available on Microsoft Vista.

Untrue. Software written to Shader Model 4 using OpenGL... will have the same visual presentation on any system that supports OpenGL.

The result is that a developer and publisher only have to write code once, to the OpenGL API, and the OpenGL Compiler written into the graphics driver will take care of the rest.

The added advantage to using OpenGL as the API over DirectX is that publishers are released from Microsoft platform releases only. Hiring developers to port to other platforms like Playstation3 Linux, Wii, x86 / x86-64 Linux, and Apple OSX is no longer a necessity. One code base, one release.

That's where the millions of dollars of savings comes in. One of the major reasons why x86 / x86-64 Linux gaming hasn't taken off is the cost in porting graphics code over. The actual game engine is generally ported over, if not written natively since Linux offers a much better server platform.

But... by using OpenGL... publishers and developers can remove the headaches of supporting Microsoft Vista and Windows Xp... while at the same time opening up a userbase of over 30million desktop users.

So... as I said, DirectX is a multi-million dollar mistake developers and publishers cannot be making.


Now... I will say this. I would not mind in the least Microsoft punching me in the nose by releasing DirectX 9 under GLPv2... which would easily fix the whole multi-platform issue.
Post a Comment