Why you should use OpenGL and not DirectX : article

Moderator
Posts: 3,571
Joined: 2003.06
Post: #1
Thought you guys might be interested in reading it. I haven't seen him around here in years. I hope all is going well with wolfire. Smile
Quote this message in a reply
Member
Posts: 749
Joined: 2003.01
Post: #2
I wrote my last game using OpenGL, using the fixed pipeline. It wasn't too bad.

But when you want to start using shaders (just for the standard stuff, per pixel light, normal maps, light mapping...), shadows, support a variety of graphics cards, support Windows and DirectX, you need a very specific knowledge and experience in graphics programming to write efficient shaders etc, and a LOT of time to build and test your engine.

So the graphics engine becomes 90% of your game and wastes>90% of your time.

That's the point when I say -screw you guys, I'm going home-, I'm going to use Unity.

I like game programming more than graphics programming and when I'm done at least I'll have a good game to sell, not a graphics engine that no matter how hard I try will still be poor/incomplete.

©h€ck øut µy stuƒƒ åt ragdollsoft.com
New game in development Rubber Ninjas - Mac Games Downloads
Quote this message in a reply
Moderator
Posts: 3,571
Joined: 2003.06
Post: #3
Well, the article wasn't about game engines, but rather graphics APIs, but I'm with you on the Unity thing. The only serious drawback to Unity is that it's 3D only. The overall trend in amateur game development, as well as commercial game development, has been more and more pointing toward using middle-ware and existing engines rather than working off the lower level stuff like the graphics APIs themselves. With Unity and Unreal both now offering high-end stuff to independent developers for free, it gets pretty hard to justify spending thousands of hours learning the finer points of OpenGL and/or Direct3D for 3D development if all you wanna do is make a game.
Quote this message in a reply
Member
Posts: 567
Joined: 2004.07
Post: #4
I'm gonna go ahead and disagree with David on this point, though the point is moot since both APIs have platforms which are API specific. Let my preface this by saying that I love OpenGL as much as the next Mac or Linux developer, but I think that DirectX is the better API for developing high-end games right now. On the low-end, there's really no difference between the two apis (though DirectX has a better learning curve, if only because of the massive amounts of resources available out there dedicated to it).


Now, why I think that DirectX is the better api option (objectively) heading forward:

First, Microsoft has been pushing API development for years, much more so than ARB (and now Khronos) did. The only reason OpenGL got AMD_vertex_shader_tessellator before DirectX was because tessellation was meant for DirectX 10, not 11. ATI (AMD, I guess) built the hardware early and then went ahead and released the drivers for it early; because the tessellation was delayed until DX11, the hardware needed changed and, thus, the OpenGL extension is only a subset of the DX11 feature.

Second, note that, while extensions are combined, OpenGL has roughly the same (or more!) capabilities as DirectX, handling extensions are a pain in the ass. They pretty much necessitate the use of GLEW and really a really awkward software rendering pipeline. This is not fun in any sense of the word. The great thing about DirectX is that most of the features are unified across cards; this is certainly true with DirectX 10+, but who knows when that API will become a relevant one, considering that it's only available for Vista and W7.

Lastly, I'd like to make the point that if you're releasing a cross-platform game, you shouldn't be using a graphics API at all, you should be using abstractions. If windows hasn't screwed over OpenGL in this version, they will next version. Frankly, the api's methods of handling rendering is not that different; Just wrap it up in a nice engine, and you're ready to port to consoles and the strange collection of APIs they have.

It's not magic, it's Ruby.
Quote this message in a reply
⌘-R in Chief
Posts: 1,248
Joined: 2002.05
Post: #5
Quote:Lastly, I'd like to make the point that if you're releasing a cross-platform game, you shouldn't be using a graphics API at all, you should be using abstractions.

Which David made a point of.


Quote:Frankly, the api's methods of handling rendering is not that different; Just wrap it up in a nice engine, and you're ready to port to consoles and the strange collection of APIs they have.

(David also made the point: ) Except that you have to write twice as much code if you're going to use both DX and OpenGL.

-

The main point I get out of the article is that game developers should want to use OpenGL because it's a cross platform library that works on mobile devices and can make the latest and greatest games like id shows us. Certainly it isn't perfect, and certainly it might not be tit-for-tat exactly capable of what is (what two competing products ever are?), but if more people didn't buy into the notion that DX is way way better, then the feedback loops David discussed would break and OpenGL would improve everywhere which would make DX completely pointless, nobody would be locked into a platform-specific API, cross-platform games would require less code, reduce cost, and expand to more users.
Quote this message in a reply
Moderator
Posts: 3,571
Joined: 2003.06
Post: #6
I can't honestly say I have much experience with Direct3D, but from what I have seen and read, it does indeed seem to be better than OpenGL ... except that it isn't, since I can't use it on anything except Microsoft platforms. I see that as a central point of the article.
Quote this message in a reply
Moderator
Posts: 623
Joined: 2007.09
Post: #7
As a Mac guy, I find it kind of humorous that the blog readers are arguing over whether DirectX is better than OpenGL as though Macs don't exist.
I guess I'm biased, but I would never consider DirectX an option just because I find the idea of developing for Windows only a little outlandish.

Now I suppose that I've been spoiled due to using Unity a lot, but how much of making a 'good looking game' is dependent on the graphics API as opposed to just having a good artist?

- Lincoln Green
http://www.binkworks.com/
Quote this message in a reply
Member
Posts: 567
Joined: 2004.07
Post: #8
Hairball183 Wrote:Now I suppose that I've been spoiled due to using Unity a lot, but how much of making a 'good looking game' is dependent on the graphics API as opposed to just having a good artist?

The actual difference between the two APIs is measured in how much hair you rip out before you get the finished effect, which is exactly the same.

And, whether or not the potential for a mac market exists, it remains a fact that for whatever reason, professional, AAA games are (in effect) not developed for macs. They're barely developed for PCs at this point—consoles are the big moneymakers. Or so the studios believe, anyway.


EDIT: I'd just like to make clear that I'm not arguing for one side or another, I'm arguing against saying one API is better or worse option for writing games. They're both perfectly fine options; the current Unreal engine can use both, Valve's engine uses DirectX, id's uses OpenGL, and each console has picked an API of their own. I'd just like to say that I think David's time would be better spent (rather ironically) saying "Stop writing to APIs and start using game engines that have already been written."

If you can't see, I'm pissed off at both APIs/defining bodies for their flaws.

It's not magic, it's Ruby.
Quote this message in a reply
Member
Posts: 749
Joined: 2003.01
Post: #9
One reason hardcore gaming never picked up on the mac is that to play with a good gfx card on the mac you have to shell out a LOT of money for a mac pro (and even then you're not getting anything near the top of the line). That and now opengl that is a bit niche.

That's why the gfx-obsessed AAA studios have ditched the Mac, but that leaves more market for indie and gameplay oriented (Blizzard) studios.

©h€ck øut µy stuƒƒ åt ragdollsoft.com
New game in development Rubber Ninjas - Mac Games Downloads
Quote this message in a reply
Moderator
Posts: 3,571
Joined: 2003.06
Post: #10
Najdorf Wrote:That's why the gfx-obsessed AAA studios have ditched the Mac, but that leaves more market for indie and gameplay oriented (Blizzard) studios.

Yup, and that's why I game almost exclusively on the Xbox 360. I just played Arkham Asylum a couple weeks ago and wow those graphics are amazing! Price and lack of AAA games are also why I don't bother buying mid or high-end Macs anymore. I might consider an iMac, but that's about it, and it surely wouldn't be for the games.

That said, I completely agree that it leaves open a market for indie devs. A little off the topic on that though: if Apple did something like an App Store for the Mac I think it'd really ruin things. I remember when Ryan Gordon suggested it'd be a good idea, and it was at the time I think, but now after seeing what has happened with the App Store, gulp... I sure hope Apple never does that on the Mac.
Quote this message in a reply
Member
Posts: 446
Joined: 2002.09
Post: #11
AnotherJake Wrote:Yup, and that's why I game almost exclusively on the Xbox 360. I just played Arkham Asylum a couple weeks ago and wow those graphics are amazing! Price and lack of AAA games are also why I don't bother buying mid or high-end Macs anymore. I might consider an iMac, but that's about it, and it surely wouldn't be for the games.
I think what we have now is more a stigma and legacy of poor graphics. A new iMac with the graphics upgrade should be able handle new games no prob - hell my 2008 iMac runs Unreal 3 powered games with the graphics maxed out (Arkham Asylum included). Unfortunately I gotta boot into Windows to play but for an early 2008 all-in-one system it still keeps up pretty well - I just played through Crysis on the "high" setting (though admittedly only at 720p).
Quote this message in a reply
Moderator
Posts: 3,571
Joined: 2003.06
Post: #12
Except that an Xbox 360 has boatloads of AAA games and only costs a mere fraction of the price, plus guaranteed compatibility and uniform user experience, plus community (if you're into that sort of thing). Graphics stigma or not, Mac just ain't my gaming platform of choice. Computing platform? Yes. Gaming? no...

Which brings up another point against Apple's support of gaming: it is totally unreliable and inconsistent. Sometimes the graphics capabilities are adequate for the times and sometimes they are rather poor in relation to industry standards at the time. I'm sure that must drive AAA game developers nuts.
Quote this message in a reply
⌘-R in Chief
Posts: 1,248
Joined: 2002.05
Post: #13
Duane Wrote:I'd just like to say that I think David's time would be better spent (rather ironically) saying "Stop writing to APIs and start using game engines that have already been written."

Except David is talking directly to the people that actually have to write the game engine...



AnotherJake Wrote:Except that an Xbox 360 has boatloads of AAA games and only costs a mere fraction of the price, plus guaranteed compatibility and uniform user experience, plus community (if you're into that sort of thing). Graphics stigma or not, Mac just ain't my gaming platform of choice. Computing platform? Yes. Gaming? no...

Which is all really besides the points David made.
(I really don't like tangents. They get messy and no one has any idea what they're discussing anymore. Wacko )


Quote:Which brings up another point against Apple's support of gaming: it is totally unreliable and inconsistent. Sometimes the graphics capabilities are adequate for the times and sometimes they are rather poor in relation to industry standards at the time. I'm sure that must drive AAA game developers nuts.

What do they care? They're not using OpenGL in the first place so they never make any ports anyway. Besides it'd be easier to pay someone to port the game to OpenGL when using less high-end features. Wink
Quote this message in a reply
Moderator
Posts: 3,571
Joined: 2003.06
Post: #14
FreakSoftware Wrote:Which is all really besides the points David made.
(I really don't like tangents. They get messy and no one has any idea what they're discussing anymore. Wacko )
I *completely* disagree that pointing out what little regard I have for the Mac as a AAA gaming platform, and instead prefer the Xbox 360, is somehow tangential to the discussion. It is in fact dead-on the subject, because it cuts to one of the core arguments that many developers have for choosing DirectX over OpenGL. That *is* part of the discussion. While I agree with all the points David made, OpenGL is marginalized in part because companies like Apple don't stroke the developers like Microsoft does.

FreakSoftware Wrote:What do they care? They're not using OpenGL in the first place so they never make any ports anyway. Besides it'd be easier to pay someone to port the game to OpenGL when using less high-end features. Wink
If Apple actually courted developers by making a better effort to provide a more uniform gaming environment for AAA game developers, software-wise and hardware-wise, it is my contention that we'd have seen a lot more AAA games over the years. But Apple's focus has been driven by what Steve Job's vision has been, which is that he never wanted to focus on games because he didn't want the Mac to be perceived as a toy. IOW, screw games! Microsoft OTOH, made games and game developers one of the core aspects to Windows and generic PC's in general -- DirectX, Xbox and XNA. Apple didn't do anything like that and so this is what we get: I compute on a Mac but only buy low-end hardware because there's no draw for me to get anything better, and I prefer to game on the 360 because it's cheap and it's good.

Now, that said, I can understand why Apple may have decided that it wasn't going to bother compete for game developers, because it is impossible to do with hardware that can't be bought for cheap and customized like your generic PC. But that, I believe, is one of the many reasons so many developers just went all-in on DirectX. Yes, I agree that it is a mistake for so many developers to have so fully adopted DirectX and *only* DirectX, but you have to admit that Microsoft did a good job of capitalizing on the situation. The only reason I don't develop for DirectX myself is that it isn't available on the Mac.
Quote this message in a reply
Member
Posts: 446
Joined: 2002.09
Post: #15
AnotherJake Wrote:Except that an Xbox 360 has boatloads of AAA games and only costs a mere fraction of the price, plus guaranteed compatibility and uniform user experience, plus community (if you're into that sort of thing). Graphics stigma or not, Mac just ain't my gaming platform of choice. Computing platform? Yes. Gaming? no...

Which brings up another point against Apple's support of gaming: it is totally unreliable and inconsistent. Sometimes the graphics capabilities are adequate for the times and sometimes they are rather poor in relation to industry standards at the time. I'm sure that must drive AAA game developers nuts.

Pretty much the only reason I game on my iMac is Windows+Steam - AAA games for $5-$10 a pop on a computer I would've bought anyway make it a no brainer.

It'd be nice not having to dual boot, but if a bunch of Mac developers, on a Mac game developer message board can't aggree that Macs are decent gaming machines then ya, we're pretty much SOL! Wacko
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  No One Cares About Your Game Idea - Article EvolPenguin 2 3,998 Dec 5, 2011 02:05 PM
Last Post: Boaz
  Developer Article: "What have you tried?" kodex 31 14,340 Jul 2, 2009 12:59 PM
Last Post: AlexTheMighty
  Article on Top 100 Independent Games kodex 1 2,951 Jun 27, 2008 06:51 PM
Last Post: Carlos Camacho
  Huge Article on Atari Arcade Games SethWillits 6 4,007 Jun 7, 2008 06:24 PM
Last Post: Duane
  OpenGL 3.0 Article kodex 2 2,905 May 16, 2008 01:06 AM
Last Post: OneSadCookie