I am competent in c++ and am ready to apply my programming skill to start making games. I started using the DarkGDK library, which I found to be quite easy and intuitive. Within a week I had made clones of pong and breakout. I then decided to take a look into DirectX, which I know is the backbone of basically the entire game industry. I find the Win32 code to be foreign and difficult to digest. I grew frustrated after writing 200 lines of code just to be able to load a bitmap to the screen.
So I pose this question to the forums: Is it worth it to continue studying DirectX, or should I master one of the more abstracted libraries (such as DarkGDK or Allegro). If you think DirectX is worth it, perhaps you could point me towards some helpful resources to get me started.
When I first went to tackle DirectX, I had no knowledge of Win32 and it killed me. It was beyond frustrating. But then a few months later and learned the basics of Win32, and then went back to DirectX and it all made much more sense. So I'd recommend at least learning the very basics of Win32 and how it handles messages before going for DirectX.
And yes, solid DirectX knowledge will look great on your resume if you're applying for jobs in the gaming industry.
Is there a reason the industry prefers DirectX? Is it just way more powerful or is it just a matter of preference? I'm not looking to land a job in the industry; game development and programming is just a hobby for me.
There are a few different ideas on why - apparently, at the dawn of Vista, Microsoft led a Direct3D campaign and smeared its fecal matter (read: shit) all over OpenGL. As you can imagine, it wasn't pretty.
A more technical reason is regarding the verbosity of Direct3D, in which apparently you get more control over all of the tiny details of the internals. For games with AAA-quality graphics this is necessary to squeeze performance out of whatever hardware is available. Yes, I'm aware that Valve does pretty well with OpenGL, but I don't think you can compare the graphics in its games to that of others made with Direct3D. Granted, this is just one company. Granted, OpenGL and Direct3D do offer many similar features. Granted, I don't have much experience with Direct3D (I can't stand its verbosity), and most of what you've read here is just hearsay.
I don't really know what I was going for towards the end, but that's the information that I've picked up after prowling the internet and taking part in a few "discussions" on comparison videos on YouTube.
Just to point out, you only have the two choices as far as 3d libraries go, OpenGL and DirectX. Both libraries need a context window, ResidentBiscuit used Win32 as a context for DirectX, but it would have been possible to use OpenGL. Similarly, DirectX can be used in a window that SFML/SDL/many others create.
I'm not doing anything particularly interesting with graphics, but I said to myself "Do you want to make something proprietary?". The answer was no, so I did an SFML/OpenGL combination.
I can't stand either of them, DirectX uses mixed capitalization for functions and not in a nice way either, it just looks so ugly, and OpenGL seems to capitalize everything with underscores, probably the second worst combination out there.
I just can't force myself to code using such disgusting naming conventions, and the same can be said for SDL. SFML is the only library out there which I have seen that I can use although I haven't checked Allegro.
Regarding verbosity, I went back to some sample code I was referring to and found that it was hardly verbose at all - my lack of experience at the time made it look verbose. My bad.
As for control over "tinier" details, I can't necessarily cite sources on that either. I suggest asking someone who's more familiar with the two APIs about that.
When it comes to a particular API automagically making things prettier, I never meant to come off as saying that. Like I've said before, I can't state the differences between the two systems, and I can only speculate, based on example, that DirectX offers certain flexibility or features that permit developers to create more spectacular effects. There's something to be said when Crytek can make Crysis back in 2007, when many of the technologies of today weren't available, and id Software makes RAGE in 2011 and can hardly compare.
I wonder if the budget has anything to do with it. I can't find out what it was for Rage but for Crysis it was $22 million (actually, I think that's relatively low). My next line of argumentation would be that different game developers are good at different things. For example, the various companies that make CoD games are good at releasing the same game over and over again, Valve are good at not releasing games at all, and Bethesda are good at releasing games that are so buggy as to be almost unplayable. Seriously, though, some game developers focus more on graphics, some on physics, and some on making games that are actually fun (which, judging by my experience of Crysis, is definitely not Crytek).
p.s. the Source engine uses both D3D (Windows & XBox (it's impossible to use OpenGL on the XBox)) and OpenGL (Mac OS and Playstation, and maybe Linux if they end up supporting it).
A game doesn't have to look realistic to look good if it has a good art style. I don't think Crysis 1 looked that great, I mean yah it looked realistic but it still had it's flaws, there were a lot of things that didn't look good.