White Shining Rock Logo
White Shining Rock Logo

Controllers, Ports, Mods and Languages

January 28, 2014 | Dukus | 106 Comments

This is a fairly long post that covers a lot of things, so if you want, you can just jump down to information on Mods and Languages or my thoughts on the issues and work in porting to Mac and Linux. Otherwise, read on!

The last two weeks have been busy. You'd think that the time between calling a game finished and its actual release would be a time to relax, but there's still plenty to do.

Between emails, crash fixes, compatibility testing, press coverage, and talking with distributors, I'm also trying to decide what's next for Banished and Shining Rock Software. I've got a lot of new game ideas, but there's also more I'd like to do with Banished.

Before I get into thoughts on the future of Banished, I'd like to talk a bit about Steam Dev Days.

Steam OS/Box/Controller

I spent a week in Seattle at Valve's first developer conference – it was both a nice break from my office, and a chance to meet some other awesome game developers in person. In the past, being a 3D engine programmer, I'd be all about the talks on the latest graphics APIs, hardware, and rendering techniques. But strangely, as I've had to become a generalist taking care of all aspects of a game studio, I found myself attended all the marketing, business and community talks rather than sitting through anything technical.

Seeing a talk by Michael Abrash was cool - Who wouldn't want to go see a talk buy a guy that wrote amazing assembly and code optimization books, worked on the Quake engine, and is now working on VR tech at Valve?

I did get a chance to play Banished with a Steam Controller, and to my amazement, without any button remapping, the controller just worked. It could do everything in the game from camera movement to placing objects to interacting with the user interface. Certainly the experience would be better with a dedicated button map, but overall the controller feels pretty good and the game was playable five seconds after I plugged in the controller.

I only put about 45 minutes into messing with the Steam Controller – I plan to do some more testing and playing at some point, probably when I've got time to add full native support for it.

A big push at the conference was obviously moving games toward Linux and OpenGL to support the Steam Box and Steam OS. Since I've been thinking about Mac and Linux versions of the game anyway, being an early entry into games that will run on Steam OS probably won't hurt and not take much extra time. Plus playing Banished on my couch in front of a large TV is pretty amazing.

Porting to Mac and Linux

So porting. It's not the most glamorous of coding, but I've done it many times on consoles. I haven't ever coded on a Mac (unless an Apple IIgs counts), but really it can't be much worse than my experience of getting a PS3 out of the box for the first time and making a game run on it. I've used GCC and Unix previously so the learning curve on Linux shouldn't be quite as high.

I expected (or maybe I hoped) to port my game engine to other platforms when I started writing it so everything is already separated into platform specific code vs generic code. Lately I've been thinking about the effort it's going to take to do the port. From my past experience, ports in well structured code take a few weeks for a basic implementation per platform, and then a few more to work out any issues and get things optimized. I can only hope to be so lucky. It'll probably take a bit longer since this will be my first port of my own engine code.

There are certainly some challenges in doing a port. There are several systems that have implementations in the code that need to be written per platform, and data that needs to be changed to fit the target system.

First, video will have to have an implementation writing using OpenGL. It shouldn't be too much of an issue – adding a new rendering system to Banished only takes about 90K of code (if the Direct X 9/11 implementations are used as a gauge.) I haven't used OpenGL since 2001 or so, so I'll have to learn the 3.X API but I figure that'd be easy. To me it's still just shaders, data, textures, and drawing triangles. The shaders will have to be changed to GLSL instead of HLSL, but this is really no big deal either – the math and structure of the shaders doesn't really change – it's just syntax.

I'll probably write an OpenGL renderer on PC first before moving it to the other platforms. This way I can flip renderers at runtime and make sure everything displays properly before trying to get things to display onto the other systems. I'll also be able to then compare OpenGL with DX11 and see which is actual faster and end the debate once and for all. (Yeah, right!)

There's some work to be done to get a window created and display graphics in it, or switching the display to fullscreen mode. Even if all platforms were to share OpenGL as the renderer, this code is always different per platform.

All text data in the game is currently in a unicode format – I'd like to change this fully to UTF8 at some point – but there's not a whole lot of interaction with in-game text and OS interfaces, so at the minimum I can just convert strings to UTF8 as needed in platform functions, such as opening or creating a file. The file system in the engine has a platform implementation anyway, so this should be fairly easy.

The input system definitely needs a platform implementation as well. The keyboard and mouse have to be queried per frame to allow the higher level systems to react to user input. This generally isn't much code and will probably only take one day per platform. I just have to figure out what to do on systems with only one mouse button and no scroll wheel....

The last major system that needs a platform implementation is audio. The audio system needs to be able to play sound effects and play streaming music. Neither are very complicated in Banished, but I've seen some very complicated audio interfaces over the years as I've worked with different consoles, so I'm not sure what sort of work will be required on this end. I'm currently using a windows only compressed format for audio, so obviously the data format will have to be changed for audio.

And speaking of differing data formats, that's the final thing thing that has to be changed per platform.

The game engine precompiles all data from its original source format into a raw format that is ready for use by the hardware. A PNG or JPG image is compiled into a GPU-ready block-compressed format and stored. Models and animations are loaded from FBX and stored in a vertex format ready for use by the GPU. WAV files are compressed and stored in the xWMA format that xAudio uses. Text assets that describe game data and string tables that hold text are compiled into a binary format.

The reasoning here is that there's no need to decompress a PNG to a full 32 bit format only to recompress it into block format that the graphics hardware uses. There's no need to compress audio at load time, and there's no reason to parse a text format when a simple binary load will work. To give you an idea of the time savings, compiling all the raw data from source assets takes about 3 minutes. Loading a save game and all the compiled assets takes just a few seconds.

But because all this data is precompiled, it potentially needs to be recompiled per platform. Some of the data is common, but there is definitely platform specific data as well.

The target platform might use a different endianness, and require byte order changes – sure this can be done at load time, but why do CPU work that can be done offline as a preprocess?

A block compressed texture works just as well with OpenGL as DirectX – however if I ever moved the game engine to consoles there would be a need to have different memory layouts for textures, or use totally different block compression techniques.

Audio data will be different as well. I could certainly move to a more commonly used format, like ADPCM or OGG that PC, Mac and Linux can use – however again I may one day port to a platform with proprietary audio system and would still need a different data format.

Pixel and vertex shaders are another resource that changes per platform. I currently store HLSL shaders in compiled binary format, and this format is different for OpenGL. Even if I stored the source text and compiled at runtime, there are text differences between the APIs.

I think allowing for different data for different platforms is good practice, as you never know what sort of system the code may be ported to in the future.

So what do I do about this data difference issue? I already have a tool that compiles all the game data into binary format when I make a full build of the game. The tool will have to be extended to output data for different platforms – I prepared for this somewhat, so mostly I just have to take the time to write the converter and serialization code for each platform specific resource. This shouldn't take too long, but it will require a bit of work depending on how different the data is per platform.

The upside of all this work is that any future games will already just work on all platforms, and I only have to worry about the generic code that compiles on all systems.

That's about it for the porting process, but I've also been thinking about the data compilation tool in terms of using it for a mod-kit.

Mods and Languages

The tool I wrote and use internally to create the data for the game is pretty much the perfect mod tool for it. My hope is to provide this tool and a bit of the core data so that the community can reskin the game, change game balance, and add new buildings, professions, and workplaces.

The tool knows how to deal with all the data in the game, and would allow users to change and add to the game data. That includes textures, models, animations, string tables, audio, music, fonts, character sets, user interface configuration, user interface graphics, sprites, vertex and pixel shaders, and render state. It also compiles game data that configures all the objects in game – workplaces, trees, plants, resources, animals, buildings, citizens, weather, environment, lighting, professions, toolbars, general game balance, and more.

In addition to being able to change almost anything in the game, the tool can also package a set of compiled resources into a single file which would be great for distributing mods.

I've had many people ask about translations for the game. The code for supporting multiple languages in Banished is only partially complete and could use some work. I also don't have any plans for official translations yet. However the mod-kit would allow for community made translations distributed as mods.

I would love to see mods that extend the game. You could add an apiary that has beekeepers and produces honey, a miller that grinds wheat into flour, milk production could be added to cattle, and then a baker could take honey, eggs, milk, and flour and produce honey cakes. Or you could reskin the entire game for different time periods or locations. Or add a lumber mill and add a new class of houses and construction. Or make better character models and animations. I can think of so many directions to take Banished that I can't do them all myself – but I think the community could do some amazing things with it.

As I wasn't thinking about modding when I started coding Banished, there are some things the modkit won't be able to do. You won't be able to change behaviors or add new ones, and you can't make new UI behaviors. You can't make soldiers that fight off packs of wolves or change the AI of the people, or change the deer simulation. All that is in C++ code, and at the moment I don't have a good way to allow plug-ins with new code to extend the functionality. This is something I'm considering, but I haven't really examined the effort or implications this sort of code change would require.

There are a few things I still need to resolve for the mod kit, like making an interface to load multiple mods at once, and dealing with mods that override the same base resource. I also need to think about mods in relation to patches – if I make a patch for the game or extend the game with new functionality, the binary data formats may change, which will require mods to be recompiled with a new tool that goes with that particular data version.


I don't know when all this will actually happen. As its obvious from the rest of Banished's development I'm not good at estimating how long it will take to get things done.

I'd like the mod support to be available soon, but the game needs to ship and I'm sure I'm going to have bugs and crashes and compatibility issues to deal with first. I may also take a bit of a break after these three years of development on a single project - A short break and some part time work on some new tools, tech, and game prototypes might be nice.

Anyway, 21 days left until the release of Banished! Are you counting down? I am!

Leave a Reply

Your email address will not be published.

106 comments on “Controllers, Ports, Mods and Languages”

  1. As soon as I get an email about the game, I stop everything and hop to it...now on to reading...

  2. Very interesting to read. Looking forward on more blogs about the 'ideas' for mod support (if possible).

  3. Hey Duke, sent you an email and an IRT message with the same title. Just wanted to know if it actually got through or not 🙂 Keep up the great work!

  4. Do you have any idea of when we'll be able to pre-purchase it on Steam + a definitive price yet?

    Also, which do you plan to prioritise first - porting the game to Mac/Linux or
    releasing mod tools?

    Release seems so close... and yet so far! 21 days!

  5. Wow, long read but very informative. Love that you will officially support and encourage mods. I am counting down the days until I can throw money at you. Thanks for this game Luke.

  6. I have been lurking for a while...but I just wanted to say that Linux support and powerful modding would be a dream come true for me. When I first found Banished, the only thing I thought it was missing was Linux support. The second thing I thought about was how much potential there was around this platform for a mod community. Congrats! I look forward to finally being able to play.

  7. yes, counting the days indeed - but can I say that because of the way you have shared the progress and ups and downs with us, to me it feels more like waiting for a baby to be born into the family than a game. It is a unique experience (for me anyway) to be an observer of this developing infant called Banish, and now it is nearly full-term yay!

  8. Cant Wait! love the post, it was long.. But worth it!!! I hope to get endless hours of playing withing the first few days! Also cant wait for modding!

    I Emailed you, but you didnt get back to me, thats ok, your probably very busy..

  9. it seems almost unreal to get it so soon, after waiting this long =)

    but im very happy to acquire one of the first copies when it finally releases =)

  10. wow awesome stuff. great to hear about all the potential of Banished, and I can't wait to see where this game will be a year from now!

  11. Really looking forward to this game!
    Nice essay anyway and I am going to be play 24/7 🙂

    Greetings from CZ

  12. Awesome that you are working on porting Banished to Linux & OS X, but please, stop saying PC when you mean Windows.

  13. Wow, very interesting, thank you for the update on how things are going! I am counting down the the release date too!

    I hope I will be able to buy it. Anyone else having a hard time finding a job?! 🙁

  14. Please dont make agressive wolves. They are very social animals and never attack men - at least as long as there are reliable records in Germany. You might show, how they get connected to men and became our best friends - dogs.
    Yours truely

  15. Been patiently waiting and reading your blog for a long time. Spread the word and told my friends about it 6 putnit on their whishlist right away.I like what you did here and how you share the progress and I want to support you. If you're interested id be willing to help you too with a german translation and due to my experience as an Ui/Ux Developer/Designer i'd definately give you feedback about the UI and usability. Keep up the good work and definately counting the days for my little late Birthday present (today :D) was hoping to get it by now but these 21 days wont be too hard. Greetings from Berlin,Germany


  16. I'm planning to get a lot of things done in Minecraft and get to somewhat of a stopping point... and I only have 21 days to do it all !! Yikes !!

  17. I wish I could do the Chinese translations. I don't know whether the mod kit is easy to use for me, we'll see 😀 Congratulations for the news, finally I get the chance of looking into this game

  18. You are going to make so much money from this game bro, and you deserve every bit of it.

    18th can't come soon enough. This is the first game since Skyrim that ive been hyped about - and i know i wont be disappointed.

  19. Excellent news about the Linux version, I sure hope you are planning to also make a standalone version without Steam like you are for Windows.

  20. I am buying this the second it is available, and these honest, well written blogs are one of the reasons why.

  21. I'm looking forward to playing the game, but in all honesty I'm happy to pay the price just for the insights I've gained from this blog.

    I wish you every success.

  22. I don't know if you read the comments here, but I have a suggestion. Maybe a add pre configured keys for options, so people are allowed to change them but they don't have to.
    Thanks for the (what seems to be a) amazing game

  23. how much longer can i play sim city answer 21 days and counting . what is the break-even sales numbers for Luke any ideas

  24. I can hardly wait for any of that stuff =D
    I think this game will be my first serious dabble in modding. =)

  25. Don't back out at the last second on that release date, dukus. You are raising the bar when it comes to publishing a polished and finished product above other mainstream developers but you will stoop back down to their level the second you back out of a promise you made to your ardent supporters. The release date IS a promise.

  26. Hi

    I'd like to ask You about Quill18's videos. Did You see them? Will You make proposed changes or leave it for modders?

  27. Hi. I've just learned about this project through Simtropolis and I have to say, quite an effort! I'll be waiting for this one for sure.

    Really like how you are planning for Banished to go cross-platform. It takes a lot of planing.

    Concerning compatibility between mods and patches, Traiz Simulator has a decent system to manage mods and compatibility. Maybe you could check their system out. 😉

  28. As someone who has been interested in trying my hand at game programming for a while now I am curious whether you considered any of the supposedly platform-neutral game development tools available. Unity for example. And if you did why did you reject them? I suspect as a game-engine developer it probably was a natural choice for you to write everything from scratch but it does sound like you're reinventing the wheel a bit for some things. Or perhaps when you first started on this project the available tools weren't viable yet.

    Just curious. And I'm very much looking forward to your game.

  29. First, great job! Eagerly looking forward to hands-on.

    Saw a couple of Quill's play thrus and must say he made several wrong choices from the start. About his complaint of not being able to build a bridge across the stream from only one side is unrealistic. You obviously can't just plop things down and expect them to work automatically. Glad to see its going to be more challenging than the demo first led me to believe.

    Thanks alot for the update.

  30. So basically.... you offer a perfect amalgam of two games i've played more than 15 years ago and enjoyed immensly: ANNO1602 and Settlers 3 - minus the warfare which i never really enjoyed???? In the words of many people posting here: please take my money!

    I've found out about this game yesterday and i have to give you kudos for giving the release candidate to quill18. Now i can't wait for the release.

    Amazing job.

  31. OMG OMG OMG !!! I CANT WAIT! *dies of anxiety*

    I really hope a pre order discount or something, currently we are having an economic collapse in Argentina and buying with dollars is becoming CRAZY expensive every day.

    ¡keep up the awesome work!

  32. Perfect! I am waiting for this game all my life :)and i hope you will be rich after relase 😉 Greetings from Czech Republic

  33. There's MojoShader (HLSL -> GLSL) and SDL2 (Audio, Video, Input), if you don't mind using some third-party libraries

  34. Can't wait! I just wish I could pre-order it already! I mean, c'mon! Set the price so that we can pre-order it on steam! 😀 That way, the day it releases, one less thing to do 😉

  35. I'm still on to help for a fr loc. A master II in translation French/English can help me if needed.
    Proposition still free of charge and nothing ask in return.

  36. Can't wait to play your game. I normally wait for games to go on sale before I buy them. But because of how open you've been during the games development, and how you seem to be doing what you can to meet user request such as mods support. I will be buying this game day 1 even though I won't have time to play it anytime soon :(, but it's worth it to support devs like yourself.

  37. Duke I have been watching some let's plays and I was wondering if the people age faster than the actual time going by or it's just something that seems that way.

  38. Soo can't wait for this game, been following since the summer.

    I have one major question. What about terraforming and changing the terrain on maps to a players liking?

    Hope you get rich off this, u got my money thats for sure. I'd pay well over $100 for this platform with the mod capability you stated!

  39. The thing about Mods and C++ was interesting. So if C++ cant be modded, then patching new features will have to be fixed into the basefile??

    Still anxious to buy and play the game.

  40. Any Idea of what the download size will be of the game? because i need to see if i need a new computer for storage or now? 😀

    cant Wait

  41. In regards to pathfinding, have you considered making the yellow path nodes (round points) editable by the player? If the player could move those nodes on the path, then the player could make a better path if he/she doesn't like the automatic one.

    The modding sounds great to me. I run a large mod group and am very interested in this game. One of my favorite city building games is Emperor: Rise of the Middle Kingdom and I have yet to find one equal to it. I'm hoping this one will not only match it, but surpass it. I love the aesthetics and how things look in Emperor, I hope to re-create that in Banished. I'm also hoping any other potential modders will look into adding more races to the game in the style of buildings. Could have european, asian, egyptian style buildings and build different types in different parts of the map even though AI would still be the same, the look would still be nice.

    Good luck with the project, I really look forward to it.

  42. Cloud Imperium Games, the studio making Star Citizen is on a hiring spree. I would love to see someone of your talent on that team. They have broken every crowd funded game record by a mile (currently at 37.5 mil).

    Since you mentioned looking for something new 🙂

  43. There's a typo in the post where it says, "Who wouldn’t want to go see a talk buy (by) a guy...."

  44. I have watched Quill18's lets play about your game. I would like to play it, but guess need to wait for the linux version. Some years ago, I decieded to ban switch to linux ubuntu and buy a xbox 360 for gaming. But the tipe of game I like to play is not available on the xbox like your banished. The civilisation version offers some hours gameplay and than you have finished and are bored. So plabably it might be interesting for you to bring out a version for the console as well.
    Regards Pros

  45. Its great to see some of your future Plans for the Game, and of course I'm counting down the days to release!
    But one question occurred to me: are there rebindable Keys? I love to set the Keys of anny Game to my prefered Loadout, so I'd be happy to do this in Banished too.

  46. Why is Feb the 18th taking so long? I have been haunting the steam forums, here, and watch Quill18 Let's Play Banished every single day. I just want to play this game! Lol...

  47. I just spent 4 years porting ESO to Mac.

    Anyhow I would recommend you port your code base to SDL2 first, That alone should make most of your OS level code JUST work. Instead of building abstraction layers for each OS.

    I also recommend Premake it is SIMPLE to use 100% lua driven tool to generate project files, It can make project files for most platforms, VS, XCode, Make, major consoles, CodeBlocks etc lets you easily use the best tool on the target platform. Well worth the time to set up. Much easier to use then cmake etc.

    Personal opinion here... When it comes to PC games ( non console... ) as long as your engine can stream in data on another threads I don't feel there is much of benefit in pre processing all your assets, Most PC have plenty of cores and extra CPU to spare loading in data. This would apply to the average indie project and not a MMO with millions of assets as thats much more like a console engine.

    Having non processed data makes things x100 easier for artists or nodders to work with. ( IMHO )

    BTW nice game, Good luck, Game was just pointed out to me today.

  48. oh man, i would die for a beta ;D
    keep up the good work with your game!
    and with me u have +1 sold copy of banished ;D

  49. I'm seeing that a lot of folks are watching Quill18's LP as am I. To get a different style of gameplay check out AKiss4Luck (Eva is Quill's Mother-in-law) She's awesome.

  50. As long Banished uses DirectX 9, there is a good chance that it works with WINE on Linux. I'll try it once the game is out. I hope it works.^^

  51. I'm seeing Quill18's videos too, and this game seems AMAZING!!! ;-D
    I hope to see the Mac port out in the wild as soon as possible, to play the game!!! Can't wait!

  52. This comes out on my birthday and I cannot wait!!!! Also does anyone know how much it costs?

    Thanks Quill18 for showing me this amazing game 😀

  53. Will modders, especially translators, get the chance to begin with their work before the release?

  54. Thanks Ryan Simard for sharing that, I just discovered it myself and came here to tell everyone. Glad to see someone else was first. 🙂

    Anyhow for everyone wanting to see more Banished here are a few videos and some of them are series so that's hours of watching (I haven't seen these but I'm certainty going to right now):
    - Let's Play: Banished (Pre-Release) - #1 (By quill18) http://www.youtube.com/watch?v=9gAXcREfjbQ
    - Banished - Sandbox City Survival! [Ep.1] (By GamersDissent) http://www.youtube.com/watch?v=gale3t75CRc
    - Banished Let's Play #01 - Starting Out (City Building Strategy) (By Biffa2001) http://www.youtube.com/watch?v=25UcWqWHC1Q

  55. The mod potential of this game surpass skyrim !!

    Quill LP made me discover your game and its incredible !

    Keep up the good work

  56. I really cant wait to play the game. Every gameplay video, I see, makes me more wanting it 😀

    Bye the way, if you are looking for a german startup community for banished, come to banishedforum.de and join me exploring this awesome game 🙂

  57. I'm extremely excited about this game. Hopefully my PC can handle it. If not, I'll be waiting in agony for the mac port. Don't give up on us!

  58. Knowing that you are planning to port to Mac & Linux is good enough for me. It'll be sooo worth the wait.

  59. OMG, I just discovered this game, it looks AWESOME! Can't wait to get it!!!! And I hope there will be a huge modders community, the potential of this game is huge! Good job!

  60. i have been on quill 18 for the last week watching the same video of banished i cant be leave how the game behaves its just wonderful and all by a chap called Luke are you a millionaire if not you soon will be

  61. This game has such a great future! Being made by 1 man , took 4 years , but by god its worth it.
    I will be buying it on steam to support him in the future.

    Possible DLCs or expansions for the future, you should look at possible different map types aka like deserts or Rain Forrest, give the player a harder challenge.

    Best of luck

  62. Would it be possible to have each season be a year on the people's age. I noticed that all the YouTube videos people were asking about the little people and trying to follow them in the game. All wondering about the age situation of the little people, and when they would go to work or school.

  63. You can add Lua bindings to the project to allow script extension via Lua. This is what I do in most of my C/C++ projects to allow modding.

  64. Mac only here, but I'm even considering buying it anyway to encourage development.

    I'll stick a public pledge here though, if you commit to a Mac build I'd happily pay $50 for it.

  65. Here's another vote for a Mac port. I think you will be pleasantly surprised by the current Mac development tools and no - we haven't had one button mouses for a long long time. We have multi-touch mouses now (which all support a secondary click - equivalent of right click).

  66. After playing the game for 5 hours straight, I can't wait for the modding tools to be released! This game sooo need a wheat->windmill->bakery chain! The question is, will we be able to use several mod "packs" simultaneously?

  67. Waiting for Linux port. 🙂

    Some comments recommend this already, but I want to urge you to look into SDL2. Not sure if you know this already, there's currently a big transition going on in the Linux world from using the X display server to either the wayland protocol (most distros) or Mir (Ubuntu). That means the traditional way of creating a window etc. is going to change and it will not be the same for each Linux distro. Yeah, that's quite a mess, but SDL2 is supposed to hide all of it and "just work". It also supports Windows and Mac, so maybe you could just rework some parts of your engine to work on every platform you want to support by using SDL. I think most steam games use it. Disclaimer: I'm not a game/OpenGL/GPU dev.

  68. Since it took ~4 years to finish and since learning OpenGL (2 and 4) to port to mac/linux will no doubt take quite some time, wouldn't it be faster to open source the code so maybe some interested parties that already know SDL, OpenGL, etc. do the porting, translations, modding, etc. while you start your next project?

    If people still need to buy the game to get the non executable files it can continue to be profitable IMO.

  69. Hah, only just found this post.

    Nicely answers all my questions about what can and can't be modded.

    Now when you've finished rolling on that bed covered in money please get the Mod Tools finished :-)*

    *Yes that's meant to be a smiley face.

    Seriously, this is a fantastic piece of work. For one developer to do all this over such a long period is amazing. It must have been a relief to finally get to release day.

More Posts

Code Rot

April 17, 2022
1 2 3 47
Back to devlog
Back to devlog
© Copyright 2021 Shining Rock Software
Website Design & Branding by Carrboro Creative
menu-circlecross-circle linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram