White Shining Rock Logo
White Shining Rock Logo

OpenGL

May 1, 2015 | Dukus | 39 Comments

I've finally got OpenGL rendering Banished with identical output to both the DX9 and DX11 renderers. I've still got a little bit of work to support the boring parts of a rendering engine, such as handling window resizes, switches to fullscreen, and handling renderer changes at runtime. But all that's platform specific code. What really matters here is I now have a working GL implementation that should (hopefully) seamlessly work on OSX and Linux.

Here's a screenshot - which is pretty boring, except it's rendered with OpenGL and isn't missing any features.
OpenGL

Initial tests show that the OpenGL renderer is currently not as fast as DX11, but faster than DX9. Not having even tried an optimization pass yet, I'm fairly happy with the level of performance so far.

Getting OpenGL to work has been a bit of a learning experience. I hadn't used GL since around 2003 - and obviously it's changed a lot from 1.1 to 4.5. At least I no longer have to use a ton of extensions (but still a few!).

To support a large variety of systems, I'm limiting the renderer to using version 3.2. I like some of the API features in OpenGL/GLSL 4 better, but 3.2 supports everything Banished needs, and potentially supports everything I'd need for future games in the next few years.

Now that I do have OpenGL working, I can't say that it's any better or worse than Direct3D 9 or 11 (not that I didn't do a bit of yelling and face palming while getting the implementation working). I don't like the API as much as some others, but I've got a lot of years of bias on graphics APIs.

In the end it's still just getting triangles on the screen mapped with textures with some fancy shader programs running. Anytime I've used a new system it's required a new platform specific renderer - Playstation 2, 3, GameCube, Wii, Xboxs, etc all use different APIs, and in the end you get the same picture on the screen at the end of the day. Using GL is really no different. When Vulkan, Mantle, and DX 12 are more widely used, I'll be doing this all again, but probably with different games.

Leave a Reply

Your email address will not be published.

39 comments on “OpenGL”

  1. Sounds good Luke. Glad you managed it to get it working with nice performance.
    And all this contributes on future projects which is one of the best idea's I think. πŸ˜€

  2. Vulkan is almost certainly the long-term future. At least it supports GLSL, so that's one less thing to learn.

  3. Awesome ! I have no idea what all this means but i'm guessing its good πŸ˜›
    Any chance this will solve the lagging issue we get when we hit around 1000pop and above ?
    I love the game, the mods are amazing, keep up the good work Luke !

  4. Yay! Any plans about beta testing on an extra steam beta branch? (Linux here)

  5. Muito bom, um melhor desempenho para futuras novas funcionalidade, quanto melhor renderização OpenGL.

    Abraço e Continue sempre melhorando
    Brasil - Piracicaba - SP

  6. "but probably with different games."
    Let us know when that happens, so that we can throw money in your general direction once again.
    Love your work.

  7. It's impressive to look at everything you've been able to accomplish on your own. With this, you have accomplished something where many major game publishers have failed to deliver. Really outstanding.

  8. Congrats! Then there's the testing, Intel, Nvidia, AMD, open-source and closed source drivers, different desktop environments, windows managers, possible additional dependencies. The usb-sticks/live-cd's/VM's will be needed a lot, even if aiming only for Ubuntu/Mint/SteamOS/OS X.

    When I ditched Windows for Linux, I've been waiting for native version so much! Gallium3d and even Wine can render the game pretty good, but native is native and I can go back to maxed settings.

  9. you are a really good developer, with your own way. hopefully to see more of your fantastic game and development.

    I wish you good luck like Sapan πŸ™‚

  10. I'd buy this if I knew it had a linux binary πŸ™‚ .. I'd even buy it to do testing for ya.

  11. Great to hear yet.
    Im here just waiting for a Linux version.
    Just a Hint: for the platform specific parts, for Mac and Linux, I _deeply_ recomment you take a look at SDL2. It will save ou from a lot of pain (specially in Linux)

  12. I'm one of those who never managed to get Banished to run on Linux, so I'm glad to learn that you are another step forward to let me play this game again. I played it on Windows, but I suddenly decided to give up on Windows last fall. I never regretted the move, except for Banished that won't work, despite the fact that most other games are working just fine.

  13. You have no idea how excited about this I am! I had Banished on a Windows computer but I no longer have access to said computer. I'm a daily Mac user, so this is so awesome. I appreciate all the hard work you're doing to get it accessible for us weirdo computer users! *happy dance*

  14. Thanks for all the hard work. Looking forward to use a native version of banished on my Mac.

  15. Its very great game, but I'll buy it only with multiplayer feature (still have hope)

  16. Looking forward to the Linux version, hope it uses SDL2 as well, will make windowing nice on Linux.

  17. Thats so great! If you need help to translate it into german, i can help you.
    Keep it up! I love banished!

  18. If you ever need testers for Mac OS 10.10.3 and Intel HD Graphics 4000 1024 MB (MacBook Air mid-2012), I'm available. I'm a casual gamer so don't expect technical-heavy feedback from me. I'm a really nice and patient person though... πŸ˜›

  19. Glad to see this is making progress. I have a PC copy with a wine wrapper that I played along time ago. Once this is native I'm looking forward to getting back to this game!

  20. Thank you so much for supporting Linux (&Mac)! I'm so exited to play your game! My friends love it, the press loves it, Let's Players love it!

    This post made me actually buy the game on the Humble Bundle site (where they have a sale ATM)! πŸ™‚

  21. There's one question I have: Will the Mods be working on Linux if the coder was taking care of case sensitivity?

  22. Can we expect a working fix for the infamous "Fatal Error... Runtime-steam-x64.dll" crash soon?

  23. Hello developer,

    About 6 months ago you mentioned that you may decide to make textile limit work. You explained that this would require pastures to ignore that limit so as not to interfere with food.

    The modding community desperately hopes you did not forget this an we beg you please please consider it.

    Regards, Shockpuppet (Colonial Charter developer)

  24. I spent about 5 hours playing Banished before I realised there was just not that much to it. Still I thought it was in development and so things would be added in time.

    But here we are over a year later and all you seem to be doing is rewriting graphics engines. A Great graphics dev != great game dev. You need to spend more time on gameplay design, less on graphics engines. Sorry for being harsh but I'm a paying customer.

  25. Oh... I remember the time when people bought games and stayed at home with it, not complaining about more content for free.

  26. Excited for the OSX port. I switched to mac when they made Windows 8, I think that the thing that I miss most is Banished.

  27. Hey Ash! Actually it's his first game! There are good mods that add additional features to the game!

    The idea is that he can now use the engine to build new games with longer gameplay etc - rewriting the engine does help him to deliver the game on mac and linux.

    I'm a LINUX user and I'm a paying customer, too! And that's why I only buy linux games. Got it? πŸ˜‰

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