





🌟 Special thanks to our amazing supporters:
✨ $10 Tier: [Geeks Love Detail]
🌈 $5 Tier: [Arch Toasty][Benedikt][David Martínez Martí]
Hi!
This week, it's my turn to write a blog post. The topic: ports! But not the kind with pirates and ships. No, the kind where you make your game run on a new platform. (Come to think of it, we'll probably have pirates too, on all our ports. Eh.)
Since I've never written here before, let me introduce myself. I'm Robert, the founder and CEO of Room-C Games. I do a whole bunch of stuff: project management, recruitment and hiring, team coordination, programming, playtesting... That's indie game dev for you, everyone has to wear many hats. :)
Since I'm originally a programmer, and have been coding at Croteam for the past 10 years, I know SeriousEngine quite well. That's why I did most of the engine features for The Hand of Merlin, like our custom grid-aware terrain system, outline/fill shaders to help notice occluded units, etc. And yes - now also porting to other platforms.
I'm happy to say that as of right now, we have fully functional, state-of-the-art Linux (Vulkan) and macOS (Metal) builds! That, and the supporting automatic distributed build system to compile & finalize all those binaries and shaders and content for all the different platforms and upload it all to Steam.
Rather than diving into the nitty-gritty technical details, I wanted to talk about my experience as a primarily Windows programmer trying to work on Linux and macOS.
-- Linux IDE --
Let me start by saying this: thank you Microsoft, for making Visual Studio Code, and making it run on Linux. That software is a boon. :) Being able to run and debug the game directly on a Linux machine and to harness the awesome power of GDB (GNU Debugger), all from a familiar, friendly IDE, is such a huge time saver.
As for the game itself, porting to Linux was not a huge amount of work. Luckily, SeriousEngine 4.0 already had legacy Unix support from previous versions and titles, and it natively supports Vulkan. Basically, it boiled down to getting our game code to compile on Clang (rather than just MSVC - Microsoft's compiler).
So after a day of fixing compilation issues, thinking how easy this was, I started the game and... black screen. Sigh.
As it happens, SeriousEngine 4.0 dropped support for OpenGL and its shading language (GLSL) altogether. So, all of our shaders are written in HLSL now (Microsoft's shading language). That's important because Vulkan only supports GLSL out-of-the-box. On Windows, there's Microsoft's DirectX Shader Compiler which can translate HLSL into Vulkan shader bytecode (called SPIR-V), but that's just for Windows - right?
Wrong! :) Thank you, community, for the awesome work of porting DirectX Shader Compiler to Linux and macOS. That's right, Microsoft's HLSL shader compiler runs on Linux - and we're using it to power our Linux Vulkan renderer.
After this major hurdle was resolved, there were just a few Linux specifics left, like detection of high-DPI displays i.e. getting the true native resolution regardless of scaling. Since I use a 4K monitor myself, I couldn't have The Hand of Merlin not handle this properly. ;)
This blog post is getting a bit lengthy now, so I'll save my macOS adventures for next time. As a small teaser, I'll just leave you with this: macOS was definitely a bigger challenge and made me really hone my Port-Fu skills.
If you have any questions or want to chat, stop by the forums or our Discord server. We're pretty much always there.
Stay tuned!
Robert
https://store.steampowered.com/app/600610/The_Hand_of_Merlin/
[ 6081 ]
[ 1294 ]
[ 4061 ]