The Joys of Video Card Compatibility

With David taking a quick getaway vacation, and Micah off recovering from not doing anything in academia recently, Daniel and I are quietly holding the fort. By quietly, I mean “stirring up trouble.”

As you may have read, we sent out several builds of Clockwork Empires to various parties recently. Six such parties, in fact. Of these six parties, three of them were able to play the game, and three of them were not. This is what happens when you take code that runs very nicely on your office machine (Windows 7, a Lot Of RAM, a fairly recent video card of Good Quality and Character by NVIDIA, with a Fan Attached To It) and try to run it on somebody else’s machine (Windows XP laptop, 1 gig of RAM, and the video card driver is actually just Bonzai Buddy.)


Output of the game on the Intel HD4000.

This is why, instead of being able to play the game, about half of our six testers got either black screens or just… broken stuff. One machine couldn’t play the game at all; it failed to recognize that it was a Windows application. (This is a new one on me, but it turns out certain builds of Windows XP cannot correctly run applications compiled with large-address aware mode on. Now I know.) The other two machines ended up displaying with black screens, or black screens and the UI elements only. Hooray!

The secret shame of the game industry is that everybody has to go through this, on every project, for various video cards. This is The Cost of Doing Business. It used to be worse back in the day when you had several players (3Dfx, Matrox, ATI, NVIDIA, Intel, SiS, S3, and PowerVR), but now we are basically down to three manufacturers of video card hardware.

The common culprit here is that all of these machines use an integrated graphics card, the Intel HD3000 and Intel HD4000 respectively. Supporting integrated graphics cards is the bane of every rendering programmer’s existence. On paper, these cards support all the features we need to render CE; in practice… not so much. Fortunately, we have an Intel HD4000 in the office, in the form of the laptops that we took to PAX 2012 last year. Unfortunately, we actually need to support this card, as it’s the single most popular card on the Steam Hardware Survey (and also ships standard on a lot of OS X machines, including most Macbook Pros)

Artist's impression of the output of the rendering on the HD4000.

Artist’s impression of the output of the rendering on the HD4000.

The black screen of death was caused by not creating a framebuffer target in the right format. CE created a 32-bit floating point framebuffer for shadow maps using the GL_LUMINANCE32F floating point target. Intel doesn’t support this, but does support the GL_R32F floating point target, which is the same thing except instead of “Luminance” you have “Red.” To figure this out, I played “GL Error Russian Roulette”, where you sprinkle your entire code base with calls to the glGetError() function until you actually figure out which line of code is causing the problem.

Once that was fixed, everything shows up on screen… except for, uh, the terrain. Despite claiming that OpenGL supported the GL_EXT_TEXTURE_ARRAY texturing extension, the GLSL compiler refused to acknowledge its existence. Solution? Don’t use the extension, and instead change the GLSL version from 1.30 to 1.50 so that it could be used without the extension being set. (A tip of the hat goes to Simon Roth, who pointed out that it worked for him.)

There was also an exciting moment when I had to install new video card drivers on the laptop, a process which I couldn’t do because the newest Intel drivers were not signed by Hewlett-Packard. Hewlett-Packard last signed drivers in, uh, 2012. Instead, I needed to unzip the drivers, attempt to manually install them, deal with the fact that Windows 7 insisted that the drivers from 2012 were newer than the drivers from 2013, completely uninstall the drivers from 2012, and then re-manually-install the new drivers.

Anyhow, to make a long story short: the game now runs on an Intel HD4000. As an added bonus, this also fixed most of the problems that we were seeing on the MacBooks in the office (even though I don’t have an official Mac beta out the door yet.) It doesn’t run quickly on this laptop – I get about 10 FPS at 1330×768 (the strange, alien default resolution of this machine), with shadows turned to low and all the bells and whistles turned off. I am reasonably sure this can be made faster, and I am hoping to get it up to 20 FPS on the company laptop. The main culprit here seems to be the terrain texturing, which can be very slow due to having to render up to 16 layers of textures on top of each other in a worst-case scenario (4 biomes touching); turning off the smooth blending helps matters, but not a lot. An additional culprit here is that we perform triplanar texturing, which takes three samples per texel and blends them in order to determine the correct orientation of the texture to use, instead of just one. I will be looking into ways of eliminating this in the near future.

Suffice it to say, though, this isn’t fun, and it prevents me from working on other more important things, like shooting people and getting Joseph’s new “meat cleaver” model integrated into the game. *sigh*

I will be going through the Enormous Pile of Video Cards to try to work out what the minimum spec is for the game before we ship it. In general, if you have a discrete video card that supports DirectX 10 or above, you should be okay. That includes most NVIDIA and AMD cards made in the past 5 years, or since 2008. You may have to turn things off if you don’t have the fill rate or resolution necessary to support all the bangs and whistles, though. I am committed to supporting the Intel HD4000 because some large portion of the Steam user base (4%) actually uses the darned thing, and because it is standard in most MacBook Pros these days. I’m not sure about the Intel HD3000 yet; it may simply be too slow.

For those of you wondering what the minimum spec and recommended specs are for the game: if you have an NVIDIA card which is from about 2009 or later, you should be able to play the game. Ditto if you have an AMD card from the same period. If you have an Intel HD4000 or one of the newer ones (HD5000, Iris, etc.) you should also be okay.

Other notable bugs from our pre-alpha testers include a number of complaints about the configuration screen, the game thinking it crashes on exit on some machines (which is one of those unpleasant “hmm, it looks like didn’t actually clean up a resource somewhere” bugs), people’s heads popping off in the work crews menu, that sort of thing.

Oh, game development! You’re so wacky, I love it! Happy Thanksgiving!

Posted in Clockwork Empires, Programming | Tagged , , , , , , , , ,

44 Responses to “The Joys of Video Card Compatibility”

  1. Alex says:

    How crazy am I when I hope to run CE on a Linux notebook with Mobile Intel 915GM integrated graphic card? Slightly crazy? Or completely deranged?

    { reply }
    • That’s… not gonna happen, sorry. We tried the i965, which is one generation better than the i915, and it was a bit of a trainwreck.

      { reply }
      • Gorbax says:

        only a bit of a trainwreck? You’re saying there’s a chance? Even Bruce Willis survived that one trainwreck that one time :v

        { reply }
        • Kazeto says:

          “A bit of a trainwreck” likely means “it didn’t work properly but at least nothing exploded”, so if you aren’t afraid of explosions and believe in miracles then feel free to try.

          { reply }
  2. wootah says:

    You know, after reading this, there is a certain appreciation for in game bugs (like people’s) heads popping off.

    I am surprised at your dedication to support older video cards. Thanks for the explanation, especially the ‘screenshots’ even if they are faked. They do add a nice presence to the write up that isn’t the same as just telling us that you got black screens of death.

    { reply }
  3. icepick37 says:

    I lol’d pretty hard when I saw the artist’s rendition of the black screen. XD

    { reply }
  4. Mark says:

    HD3000 is too slow? But that’s what I have! Nooooooo

    { reply }
  5. I demand, yes, DEMAND (you heard me!) *fistshake* compatibility for the marvellous Nvidia GTX 260.

    Unlike games from a very specific plumbing-related company, I hope this game doesn’t blackscreen ever so often, and if it does, I demand it to be fixed within a time period of one year(unlike the aforementioned plumbing-related gaming company)!

    [Not to be taken too seriously, I just like calling VALVe a plumbing company.]

    { reply }
  6. Alex says:

    Well, that’s life. Thanks for the info.

    { reply }
  7. Bropocalypse says:

    I have two computers- a laptop with a four-core processor and 8 gigs of ram but with sort of a mediocre GPU(AMD Radeon HD 6520G, and a desktop with two cores and 4 gigs ram but a stellar video card(nVidia GeForce GTX 670).
    Any idea which of these two would be preferable to run the game on?

    { reply }
  8. musteline says:

    i tried for 5 minutes to “fix” the images ithought my internet was worse than usual, then i realized it wasnt a bug.

    { reply }
  9. Yeol says:

    This is by no mean the only form of secret game industry shame. See for example The Great Router NAT-Traversal Network-a-thon, where network programmers assemble vast collections of routers to be used as offerings to the Dread God Non-Standardization. They will then enact rituals wherein they create mock replicas of the networks that might be found in Nature, while repeatedly cursing their forebearers for thinking that a mere Thirty-Two Bits would be sufficient to hold Terrible Things at bay. This goes on until the Dread God is appeased and the Packets can once more flow freely, or the Deadline is made manifest.

    { reply }
  10. Ghin says:

    I lost control of my bodily functions momentarily and let an amused chuckle slip out at the “programmer art” bit.

    { reply }
  11. Derpling says:

    We, the peons who game on toasters, thought Gaslamp was our savior with Dredmor. And now you rebuke us? What foul sacrifices must I make to ensure HD 3000 compatibility?

    { reply }
    • If I have time, I’ll do something very stripped down. I know that one of our testers on the HD3000 is currently getting about 5 FPS by running the game with a smaller resolution – and seemingly all the bells and whistles turned on! – so there is hope. The problem is the card just does not have enough fill rate to be viable.

      We *might* be able to do it by turning absolutely everything off. But we’ll see. Definitely not how I would like the game to be played. 😀

      { reply }
  12. Gnoupi says:

    Funny, it looks like supporting Intel integrated video cards is the gaming programmer’s equivalent of support old versions of Internet Explorer for web developers 😛

    { reply }
  13. Jabberwok says:

    Wow, is the Intel HD 4000 old? That’s what I have in this Macbook, which is less than a year old. But it looks like there is also a Geforce GT 650M on it. Here’s hoping I can get better than 20 FPS. That sounds unpleasant.

    { reply }
    • The HD4000 isn’t all that old; I think it’s from 2012. Doesn’t mean it’s fast, though. Or good. 😀

      { reply }
      • Samuel Creshal says:

        The motto of Intel’s graphics department is “We suck, but we’re damn good at it!”.

        For a long time, their cards were simply not designed for gaming, and they have a lot of catching up to do.

        { reply }
  14. sarbian says:

    Do you plan to support XP ? Steam survey put it under 7% and it seems to be a pain to still support it (and 32bit)

    { reply }
  15. Jason says:

    happy thanksgiving guys!

    { reply }
    • Thanks 😀 you too!

      { reply }
      • shMike says:

        I thought your Thanksgiving was weeks ago.

        The Intel HD4000 is the single biggest reason I do not plan on upgrading my old MacBook to another Apple laptop. It occasionally has problems with webpages with too much video (making AdBlock a necessity rather than a convenience). Just trying to support it makes you better people than Apple, Intel, and most game companies.

        { reply }
  16. rrreeeggg says:

    Will my NVIDIA GeForce GTX 550 Ti be able to run this game?? I really hope so…

    { reply }
  17. Onamar says:

    Well my laptop houses the accursed Intel HD Graphics 4000, my desktop has a NVDIA GeForce 560 Ti, which has yet to be defeated by any settings besides the accursed “High” shadow settings in a few games.

    { reply }
  18. muffinimal says:

    I wish there was a warning along the lines of “There is nothing wrong with your screen. Do not attempt to adjust the picture…” I also hit F5 a couple of times. Are you guys having a competition of who gets the most views on a blog?

    Good luck with your struggle with compatibility!

    { reply }
  19. Isaac Bickerstaff says:

    So you’re *not* planning on supporting my Kyro? 🙁

    { reply }
  20. Jabberwok says:

    Question about an earlier post on having characters carry steam around in metal balls: I think I understand that from a design perspective, but realistically, wouldn’t the labor involved defeat the purpose of using steam at all? I dunno, maybe it would feel more believable to me if they were carrying coal straight to small individual furnaces. Though I do hope the steam pipes work out, as well.

    { reply }
    • Matt says:

      That was almost certainly a reference to the Japanese anime movie “Steamboy,” in which the plot McGuffin is a spherical device that contains an infinite amount of pressurized steam. I doubt that they plan to implement it to the point of being a broken game mechanic.

      { reply }
  21. dtanders says:

    You guys are being extremely generous by referring to HD4k and below as ‘graphics hardware’. Such big hearts at Gaslamp Games 😉

    { reply }
  22. Keleim says:

    So does this mean it will work on an NVIDIA GeForce GT 555M? I think that’s what your saying, but my understanding of such things is somewhat less than optimal. Will there be a playable demo so the more paranoid and/or tight fisted of us can check it works before we buy?

    { reply }
  23. Edward says:

    I own a beefy desktop but would love to play this on my windows tablet! I am not joking 😛 Intel Atom 1.5ghz Quad CPU 2GB DDR3 RAM Intel HD graphics Windows 8.1 OS

    { reply }
  24. Eagleon says:

    I really wonder if that 4% is just people using steam on their laptops as an IM service, as I do. Do they publish gameplay activity statistics or anything like that? I know I wasn’t expecting to be able to run this on anything but my desktop, not that it’s not a pleasant surprise.

    { reply }
  25. Pertusaria says:

    Belated, but sincere, thanks for this – having laptop-shopped recently, it isn’t easy to get one with anything but Intel, and I couldn’t find one with Intel 5000 / Iris at all. I’m not really settled where I’m living, so it’s not the right time to move to a desktop for “serious” use. It’s great to get confirmation that I’ll be able to play CE, even if it’s less than ideal.

    { reply }

Leave a Reply

Your email address will not be published. Required fields are marked *