Archive:
Since, oooh, about Xmas time, my primary work environment has been Manjaro running on my Framework 13 laptop. KDE Plasma spin, if you're interested. For a few reasons:
And, to be honest, I've been looking for an excuse to jump away from Windows since the day Unity forced me off my Retina MacBook Pro, back in 2014. Unreal Engine and the Affinity tools are the only things holding me back, as pretty much everything else I use on a regular basis is either open source, or there's a decent enough equivalent on Linux that'll see me by. (Lets not talk about GIMP...) which means all Eggnob and EH500 development to date has been done on Linux, with the odd hour spent here and there making sure everything compiles on Windows. (It does.)
But. The Windows builds need MinGW UCRT 64, which works perfectly fine, but it's another crappy little terminal, that needs all its own dependencies installed, and blah blah blah. Nah.
2umo's Linux native builds were cross compiled from Windows, so I figured it must be perfectly possible for my Eggnob build script, on Linux, to spit out Windows executables. And it was!
Mingw has a full GCC for Linux that targets Windows x86_64 -- perfectly obvious in hindsight -- that outputs PE executables and links against the Windows CRT instead of glibc. Hurrah! Even better, SDL release pre-built Windows import libraries, headers and runtime (basically, the Windows dev package), for MinGW. Wheeee!
Unfortunately, Eggnob is using Meson. An experiment that I'm not particularly happy with, and won't ever be using again, but in this instance it wasn't too bad. I added a cross .ini file to tell it to use the MinGW toolchain and it did the rest, including setting the host machine flag to windows, so my #defines all do what they're supposed to at compile time. I could also set it up to statically link against libgcc & libstdc++, reducing the number of dlls I need to ship. (I couldn't get it to statically link against libwinpthread, no idea why...)
All the assets get shoved into a pack file, so I end up with a folder / zip file containing:
eggnob.exe - the game, statically linkedSDL3.dll - from the MinGW dev packagelibwinpthread-1.dll - from the MinGW toolchain (lib/x86_64-w64-mingw32/bin/)eggnob.tdi - the assetsUtterly painless! One build.sh package-for-windows and I'm done!
Ah, well.
This was the tipping point, because I decided to spend an evening sorting out the post process shader stack on Windows and it was a ballache.
The EH500's shader use is limited; there're four shaders, written in GLSL and compiled to SPIR-V for Vulkan and Metal. These get embedded as static byte arrays into header files, so they can be passed on to SDL_GPU at runtime.
I was hoping to keep using the Vulkan backend on Windows, but SPIR-V wasn't available with it on my machine, meaning there was no post on either renderer. Boo! So, I thought I'd quickly hack the build-shaders script to output DXIL before falling down the rabbit hole of SDK installs MSYS terminals not seeing paths, and god knows what. But I got it going.
And then the next day I relalised I already had all those tools on my laptop, and I could have done it from Linux anyway. Fuuuuuu...
So, the pipeline is now: GLSL source, to SPIR-V, optionally cross-compiled to HLSL and then DXIL, with the SDL runtime selecting which output it wants, depending on the platform.
All in all, a slightly frustrating diversion, that ended up in a good place. For EH500 related game development I'm now 100% Linux.
Until I start looking at the Switch versions...
And speaking of diversions, I wanted some 2umo swag. T-Shirts and stickers, mainly, so if you'd like some pop on over to me little Redbubble shop. There's no mark-up on owt, cos like I say, it's mainly for me (and my Mum). They came out really well!
Musings, random thoughts, work in progress screenshots, and occasional swears at Unreal Engine's lack of documentation -- this is a rare insight into what happens when a supposedly professional game developer plans very little up-front, and instead follows where the jokes lead them.
Journal IndexFriends:
If you like any of my work, please consider checking out some of the fantastic games made by the following super talented people: