Well, MSDN isn't really a programming library, though it's sometimes maddeningly incomplete. Framebuffer manipulation isn't really something anyone does these days either, as even sprite games generally use texture-mapped polygons in lieu of actual bit twiddling. DirectDraw's been deprecated for a reason.
I haven't seen too many MFC-derived games either, though admittedly most of the commercial game engine code I've seen is Quake-derived. Say what you will about the games, but John Carmack
does know how to write quality cross-platform code.
One big problem is with the current upgrade cycle in graphics cards. NVidia and ATI are so desperate to beat each other to market with the latest features that they don't always test the drivers fully. Compound that with today's emphasis on eye candy forcing developers to throw in every new D3D feature, and the already-stressed QA departments simply can't catch everything. When I got UT2003, saw the "NVidia: The Way It's Meant to be Played" logo, and
then saw the (admittedly README-documented) new-driver-induced visual glitches, I laughed my ass off. The BioRifle models (though not the shots) seemed to have black sludge, the "shiny armor" effect on Malcolm in the intro looked more like a permanent full-body shield belt...
Another huge problem is SecuROM and other "copy prevention" schemes. THEY DON'T WORK. The time between release and GameCopyWorld is practically nil. If you want anti-piracy, authenticate over the Internet. Schemes like SafeDisc don't work technically for three reasons:
- Incompatible CD-ROM drives. These companies never test on the full array of drives available--how could they?--and it shows. Legit copies just won't work on some CD readers, and laptop users especially can't upgrade.
- Buggy loaders. The developers are generally testing the main executable only until the very end. Then, when you encrypt-and-wrap with SecuROM, you're now relying on the memory management behavior of yet another program. In order to defeat the "bait and switch" behavior of passing the CD check and then handing the disc to the guy next door, these things keep themselves in memory and check periodically. Like that's a recipe for stability.
- As I said, the executable is still on the disc somewhere. With a sufficiently powerful debugger and copious spare time, you can fool the loader into bypassing the CD check. Once you break one or two titles using a particular scheme, it's not hard to nail every title using that version. It's an arms race Macrovision and Sony cannot win.
The main problem, though? The only type of cross-platform code devs write themselves is X-Box/WinXP. Seriously. Drop Direct3D, as it's MS-only and still somewhat unstable when doing the advanced stuff. Instead, go with SDL, OpenGL and the standard extensions (perhaps allow the vendor-specific ones,
but make them optional), and then make sure the damn thing works on MacOS or Linux. Good code is almost a prerequisite for portable code, and any memory allocation problems are probably going to blow up immediately on a new architecture. Besides, the reputation boost you get on places like Slashdot is immeasurable and helps when other developers consider licensing your engine.
Oh, and one more thing: provide debugging logs when you crash. It's the only way to know precisely what's going on at the moment of truth and fix it.
Seriously, I've never had more than two crashes on any game with full MacOS or Linux ports. That ranges from shareware titles like Geneforge 2 (and I was in the beta) and Escape Velocity Nova to big-name stuff like WarCraft III, UT2003, and Quake III.