Hardware Compatibility

Today I’m working on trying to finishing up better support for the myriad of graphics cards out there.

The main issue is that many graphics cards report themselves as working with DirectX 11, but they seemingly don’t fully support it. There’s all sorts of random crashes occurring in draw calls, and many times crash reports show the game dying in the graphics driver DLL itself, with no call stack, leaving no opportunity for meaningful debugging.

On my development machines, with DirectX in debug mode, I get no errors or warnings, so I don’t believe the code is doing anything bad that would cause this issue. I could still be doing something wrong at initialization, but so far I can’t track it down.

Most all video cards drivers that exhibit this problem work just fine with DirectX 9. In hindsight, having the game start in DirectX 9 mode would have been a better choice – but since DirectX 11 provides a much better frame rate, I decided that should be the default. Even so, if a player were to change to DirectX 11, there’s a chance that the game would then crash.

DirectX 10 and 11 have much stricter feature requirements than DirectX 9 did, so I’m not sure where this issue comes from. Especially since the frame outputs of the two modes should be nearly visually identical, and at the lowest level the native commands sent to the video cards should be the same, except for the method of instancing support. And in most cases the crash occurs before any instanced geometry renders.

There are a few other edge cases that I’m taking care of, such as monitors that don’t have 60Hz output modes, machines with multiple graphics adapters, the game getting stuck in undisplayable video modes, and exception handling and recovery for video drivers that crash on initialization.

Too that end, I’ve added more video options and a front end launcher to the game, instead of players having to use registry hacks or deleting dlls from the game directory when things do go wrong.


Launcher

In some ways this is annoying. Many users have no issue with their video cards, so this is just an extra click when starting to play. I’ve considered adding a ‘Don’t show this dialog at startup’ type check box so that players can just jump into the game, but in the event of a crash, it would have to come back up to allow the player to change settings – it’s hard to know if a crash was caused by a graphics event.

But this launcher is also a good place to allow users to select which mods are going to be loaded (when I finish support for that…) so in the end it’s not terrible. I’ve seen other games with this sort of setup.

From the launcher, all video settings can be changed, and there are now options for picking which video adapter to use and what refresh rate to use in full screen mode.


Video Options

Coding wise this isn’t as clean as I’d like it to be. This interface requires an additional set of UI code that basically does the same thing as the in game configuration. While a lot of code is shared, if I add more video options at any point, the interface needs to be changed in two places.

But since the in game UI requires the graphics hardware to render it, an operating system backed UI is really the only option to be able to display and change settings before the game engine fully initializes.

In game, the video options are the same as the launcher, and can be changed without shutting down the game. I’ve tried to make this system more robust so that invalid video modes can’t be selected, but in the event they do, players can make changes and fix the issue next time the game starts by using the launcher.


Game Video Options

When the game gets ported to other platforms, the front end launcher will require more similar UI code – or none at all, depending on what system it is. I plan on using a cross platform UI library for the widgets, but there will still be differences – for example there’s no need to pick between DirectX versions or switch to a different graphics adapter on a Mac, it’ll just use OpenGL, and assume usage of the video card that drives the system.

I had it much better than I realized back when I did console programming. Once a game was rendering on the development machine, you knew it would run on every system at the same frame rate. The land of PC development is much rockier. I’d like to get back to making console games for that reason, but at this point with a fairly robust game engine I’d imagine I’ll always release games on PC’s as well.

48 Comments

    David Pearce
    April 11, 2014 11:36 am

    Hey Dukus

    How about giving us a command line switch to bypass the loader? We can use the switch with a standard windows shortcut or through steam.
    It’ll give the more advanced users who -do- get annoyed by extra clicks a way out, and also more helpful with steam big picture which from my experience doesn’t display these loaders very well.

    Thanks

    David
    April 11, 2014 11:41 am

    I’m one of the lucky early players who have had zero issues with your game. Just writing to say that I have no problem with a front end solution as you describe at all – anything that will improve the general experience for the largest audience is fine with me.

    DB
    April 11, 2014 11:44 am

    +1 David Pearce

    Nesflaten
    April 11, 2014 11:47 am

    And this is why I love this developer. Sharing problems, being open, and just taking care of us!

    mewki
    April 11, 2014 11:52 am

    Same as David ^
    No issues at all and no problem having to click more to play it. I’m just waiting for the patch/mod support coz that’s somethings still lacking for me.
    Great work!

    Keaton
    April 11, 2014 12:00 pm

    Do u have an idea when banished is going to come out on mac!?

    Skyrik
    April 11, 2014 12:06 pm

    I’m With David and Mewki. I’ve had no issues with the game at all and I’d be totally cool with clicking an extra button to get into the game.

    Jon
    April 11, 2014 12:09 pm

    Hey Luke, a launcher seems as a good idea. and that extra click isn’t a problem (at first I thought oh no a extra click… then I rethought what one click is :p ).
    Any how good luck with all the debugging. It’s indeed true that the pc land is quite rocky.

    Jason
    April 11, 2014 12:34 pm

    Keaton, purchase Banished from GOG then go to Paul The Tall’s website and download the Banished wrapper. This will allow you to play Banished on your Mac. I’ve been playing for months now on my iMac and Mavericks.

    Tom Duhamel
    April 11, 2014 12:34 pm

    Luke, regarding the option of bypassing the launcher. I trick which I like in other games is the launcher is only displayed the very time the game is launched. Past that point, if the game crashes, a flag is set so the launcher is used again. If at any point the user wants to use the launcher even if they didn’t have a crash, a command line option can be used (such as –launcher or –safe-mode). Then the installer can create two shortcut, one regular and one with the special command line option. This way, you give the control back to the user, and they don’t feel like they need any special knowledge to do what they need to to fix their problem.

    Russell
    April 11, 2014 12:37 pm

    In a game with 1000s and 1000s of mouse clicks, I do not see how anyone can complain about one more click in the begining :) The game runs flawlessly on my old Core2Quad 8gig 800mhz RAM, NVidia GTX260 DX10 `rig` and I use the term `rig` very loosly here :)

    VincibleAndy
    April 11, 2014 12:42 pm

    This is some great news. I am surprised and excited by how much focus and effort you are putting into these types of updates. Anyhoo, me and all of my friends here at university are loving your game. Thank you!

    Russell
    April 11, 2014 12:44 pm

    On the issue of the option to bypass the launcher, this is an old trick I used back in the day :)

    Have the option to bypass the launcher. The user selects `bypass` and a config switch is set. User runs the game and the launcher is bypassed. At this point the game will turn the launcher back on. When the user quits the game, the system detects a `normal` shutdown and disables the launcher again. This way if there is ever a crash, the launcher is already turned back on AND the system still knows that the user wants it off. So a message can be posted: “We know you want to bypass the launcher but something went wrong the last time….”

    Just an idea :)

    Keaton
    April 11, 2014 12:45 pm

    Thank you very much Jason , I have been waiting to play this gane for a long time!!

    Nova
    April 11, 2014 12:46 pm

    To be honest, a fast bugfix for the most annoying bugs would be better. Removing the “building a street on a tile with a tree and you can’t remove the street” bug and the “food on the field? too bad, i can’t work with it anymore” bug would make so much people happy – and i think it’s a pretty fast fix.

    bob
    April 11, 2014 12:47 pm

    Not one issue so far with the game.

    The odd crash here and there, but it’s an average of one crash for twenty hours of gameplay, and I use a *lot* of alt-tabbing.

    Very very solid results on my end, kudos for keeping up the hard work, please consider letting the community work out fixes for you in order to ease up the pressure a bit, we need you for later ;)

    Joppe
    April 11, 2014 2:31 pm

    Yeah, it seems that graphics card drivers are pretty much a big pile of hacks. Things that are supposed to be supported are randomly not, or to a lesser extent or differently than you would expect.

    For a few years, I shared a room with a colleague who was developing an in-house 3D engine for a simulation software that was supposed to run on Windows, Mac and Linux. I was NOT envious of the headaches he had to put up with…

    Peggy
    April 11, 2014 6:29 pm

    I have no problems with the game at all, its awesome. I just don’t have any sound, in the beginning it really annoyed me but I’ve gotten used to it now.

    yusui
    April 11, 2014 6:55 pm

    Hey, just wanted to let you know that I have no issues regarding this matter at all and that I love playing Banished. No a single crash so far. So awesome job! Thanks for keeping us updated and staying so invested. I personally can’t wait to see a Mac edition as well. I do play on my PC but I’d love to be more flexible and play on my MacBook Pro as well. Cheers!

    Alicia
    April 11, 2014 7:11 pm

    I have had no problems with the game either. And I still love playing it when I get a chance!

    Marius
    April 11, 2014 8:11 pm

    Your DX11 vs. DX9 frame rate comment isn’t consistent with what I’m seeing. On DX9, the game is playable, while using DX11, the frame rate is so ridiculously bad that it’s not playable. (admittedly, this is when running the game on Windows 8 on Parallels on a Mac)

    Eilanzer
    April 11, 2014 8:13 pm

    Playing on windows 7 64b
    Using directx11 max settings

    Hundreds of hours in this game and not a single bug till now…

    But…My cousin using windows XP have some strange blinking in the screen playing this game.

    Glenn
    April 11, 2014 8:50 pm

    Why not have easily editable config files that are read at startup? It’s not ideal for everyone, but it would safely allow people to have a ‘bypass launcher’ option and still be able to recover from a bad configuration.

    meck01
    April 11, 2014 10:16 pm

    This game has been trouble free from the start.

    I applaud your support and wait for future games.

    Ben
    April 12, 2014 1:04 am

    Please add steam support. Please.

    xvx45
    April 12, 2014 11:01 am

    I’m surprised about such graphicals problems. The game work great here on my home computer (Win8.1 X64/i7 3770k/GTX660/16Gb RAM/Dx11 mode/All high) and the surprize come from my profressional computer where it work without bugs or crashes (Win7Pro x86/i5 2540M/HD3000/4Gb RAM/Dx9 mode/all low) …
    With an Intel HD3000 that not meet requirements it work… From here, seem to be misconfiguration or bad install of graphic drivers that causes trouble to some people… Few guys do a proprely install of graphic drivers now, too much people do only updates from years and never a clean install…
    A good question is : does all this people have those problems after a fresh install of the Operating System ? I don’t think so…

    Alan
    April 12, 2014 3:47 pm

    I see you’re nailing down video problems because you want everyone to be able to play no matter their video settings or hardware.
    Still, many people are waiting for that mod support, but it’s okay, take your time.

    I’m glad you’re open and you tell us how things are going. Kudos to you.

    Keaton
    April 12, 2014 4:43 pm

    Jason, will getting banished the way you said affect anything with the gane or make me unable to do certain things?! -Keaton

    Jon
    April 12, 2014 10:08 pm

    Argh, was hoping for a fix to my savegame crashes.

    Oh well at least some development is moving

    Daniel
    April 13, 2014 4:04 am

    Concerning the problem with the “extra click at startup”: How about making the launcher optional as in an extra program and not including it into the game’s exe? That way people who do need the launcher can start it for example with “launcher.exe” and those who don’t need it and want to start the game directly can start it as usual with “banished.exe”.

    Joey
    April 13, 2014 9:26 am

    Hey there!

    Everything fine with me. Though, if you change the font etc. size in Windows 8.1 above 100% (which makes a lot of sense when working with high resolutions), Banished doesn’t take it well (like other Games, too…).

    Regards

    Kantankerus
    April 13, 2014 2:51 pm

    Love your blog, been following for several months.

    Probably too late for this now, but could you create a “-directx9″ argument passed to the executable that just overrode the current setting and forced directx 9? Then you could have a “safe mode” or “directx 9 mode” shortcut that called the argument in case they got stuck on the standard launch link. Not sure how this would work with steam, just throwing it out there.

    Jason
    April 13, 2014 5:06 pm

    Hi Keaton,

    It hasn’t limited me in any way. Now I ran into an issue where my game would crash when a save occured (manual or auto-save) but that didn’t start happening until much later on with very large towns (500+ people).

    There is a patch that corrects this. Basically you replace the application.exe within the Banished wrapper (you downloaded from Paul The Tall) with the 32bit application.exe within the patch. Since then, I have had zero problems. Just reply back to me if you need help doing that.

    I have a town with almost 700 people and zero save problems and no crashes now.

    Your save games will be stored in Documents/Banished in your home folder on you Mac.

    Just make sure you purchase Banished from GOG. Also, reach out to Paul if you need to. He is a super nice guy and very helpful. Just don’t forget to throw him a bone for his work.

    Cheers

    Jason
    April 13, 2014 5:11 pm

    Now with the game crashes under control for those who have implemented the patch, I would love to see you work on the ‘starving’ AI issue. Once I start moving out from the center of my initial storage/supplies locale, people starve when travelling long distances to work, herbalist, or gathering supplies.

    I do like the Tavern offering food option that was suggested. Something to keep people who travel far from home, from dying.

    I love this game and can’t stop playing. Well done!

    Jason

    Canister-VIII
    April 13, 2014 9:39 pm

    Thank you for an excellent game. You clearly outdid most of the gaming companies that exists today. Please do not stop making games as you clearly know what people like to see in a game.

    Take care.

    sixin
    April 14, 2014 2:42 pm

    What Russell said. The most elegant solution.

    Settler Dave
    April 14, 2014 4:54 pm

    I like Russell’s idea too. I see a lot of games offer a front-end launcher in a when-needed way, but I get disappointed with the ones that make me say, every single launch time, “ok I still like the exact same settings that worked every previous time”. It’s not just a mouse click after all, but waiting for a little app to load, just to make me press an OK button, and then waiting again for the actual game to load. It just feels pointless and inelegant as a user, whereas this game in every other way so far exudes elegant craftsmanship.

    As to mods, I’m not sure why they’d have to be loaded in the launcher either. I would have expected them to be in the main menu, or somehow more tightly coupled to creating/loading a village. It seems like some mods might heavily affect game play, and you might want to disable one when creating a village, whereas you might be obligated to include one when loading an existing village (one that included a mod bakery building, for example).

    As a point of reference, Prison Architect seems to be handling mod support well, and uses Steam to handle distribution and installation of mods, keeping things painless for users.

    tintin
    April 15, 2014 2:06 am

    can you please use SMAA? it’s a good AA method which can be used by weak graphics cards.
    you can read about SMAA in here
    http://www.iryoku.com/smaa/
    http://mrhaandi.blogspot.com/p/injectsmaa.html

    Thanks.

    Xextreem
    April 15, 2014 7:12 pm

    I have zero problems with the game and i even crossfire it with my 2xhd5970 on DX11 flawless luke. So my rig is very unstable about bad codes. It will crash for sure. So like you say before there is no bad code so far I noticed it and I have played more than 120 hours in game.

    Brian
    April 16, 2014 10:33 am

    Perhaps the launcher should have a check box to disable future dialog display unless there is a crash. You could have an exit condition file that you check on startup if it shows the app exited improperly last run you can display the settings launcher. Much like a safe mode startup.

    Mike
    April 17, 2014 7:26 am

    It might be worth writing an internal UI interface – it’ll be a bit of work at first, but if you make it render in an OS & graphics engine mode getting the same layout, you could use the same calls to render it separately. You’d just write the window layout once and let the backend choose between ingame or system windows. Possibly use an extra flag for buttons that have no place in one or the other mode? Maybe do an automated layout engine?

    The specifics could take a while but bits of UI aren’t all that performance-critical, so an additional layer of abstraction probably wouldn’t hurt while easing maintenance.

    I can’t look into your code but these are my thoughts.

    Josh Nevin
    April 19, 2014 7:48 am

    Hi, I bought this game and it looks really really really good. I actually downloaded it yesterday and have so been looking forward to playing it today.

    Well, I start it and it says “Failed to start game (missing executable).” Very very dissapointing. I followed all the instructions that steam gave me and restarted pc countless times, to no avail.

    My laptop isn’t very old and I have not had a game unable to play on it yet before.
    In the end I paid so much for a game and also paid extra to download it (small game but data is not cheap here sadly) and I can’t even get into the game… Can i at least get a refund?

    mubarakhb2
    April 19, 2014 1:07 pm

    Imy mubarakhb2

    WolfWings
    April 21, 2014 4:58 am

    @Josh Nevin: Have you done the ‘Verify Game Cache’ step in Steam? That’ll verify if you actually are missing something, and if you are the main executable is very small for Banished.

    Jaime
    April 22, 2014 1:07 pm

    Hi, I’m not sure if you’re checking comment on this post anymore, but I only just realized that you’re updating here and not on steam. I was effected by the DX11 thing, did your work around and then it decided to hate DX9 as well. It runs in the [testing] mode with no fixes at all. If there is any info I can provide that would help you with your patch, let me know.

    saif3r
    April 22, 2014 2:54 pm

    Hi Guys,

    How can I enable multiple monitors on Fullscreen? Got 2×1080, but no clue how to use them both.

    Wheyn
    May 8, 2014 12:56 pm

    Just wondering as it has been awhile since I have played. I had no issues really since the initial release so I never used the first Beta patch. But I am seeing all these other patches and have no idea where to get them I didn’t get the steam version so where do I go to download the patches?

    grave
    May 9, 2014 10:20 pm

    I changed the vid settings in-game, now I get a black screen saying something about compatablity, I read thew here and seen there was a launcher, but I downloaded from steam and my game just launches, no launchscreen, im not sure how I can get my game playable again.