For those of you who don't know, I've been maintaining a port (NOT in the sense of /usr/ports) of UE4 since early 2018 - see this forum for a few threads about it.
These days, as an independent / hobby developer, unless you already have your own engine, I would recommend just writing your game (I like SDL and OpenGL) and then extract useful parts into your own game framework after release. I think engines are a little overrated. They are just glorified libraries after all. I always find it a bit laughable when the engine size absolutely dwarfs the actual game code.
I'll have to partially agree and disagree on that. Disclaimer, I have read and modified the sources of only the Unreal Engine - other engines may not apply.
I agree on the part that writing your own engine/framework/library is possible and as a teaching aid I'd surely recommend it. If you can write just enough code for your needs you'll be certainly off with a much smaller and possibly faster package. But that also comes with its own risks and pitfalls. If you look up the list of (small or large) game developers that created their own engine and went bust it'll be clear that it's a risky strategy. It's also far from easy to support advanced features beyond "display a cube" code. Getting to the same point that the commercial engines are at takes a lot of work. We're talking about man-years here and that's time that needs to be payed for somehow.
Fun fact: the first open-source engine I wanted to "port" to FreeBSD wasn't UE4 but the Nebula Device by Radon Labs. Never got anywhere with it though. Radon Labs went bankrupt in 2010.
Thus, in come the big wieldy engines. They bring nice editors, a more or less usable graphical programming environment and much more features already built in. Taking UE as an example, you have code and build system to support Linux, Windows, MacOS but also PS4, XBox, Android, IOS etc. DirectX, OpenGL, Vulkan, Metal are already there. No need to code anything further. Spatialized audio? Physics engine integration? Network replication? Destructible environments? It's all there. But that all does come with serious downsides too. Being forced to work in a certain way, massive executables, lots of code and features you'll personally never use. It's all a trade-off.
The best reason to start with an existing engine (on a supported platform...
) however is that
it just works and there's actual support. If you have something that isn't behaving right you can look to get some help online. Anything you've written yourself means you have no-one else to fall back on for help. Again, a great learning platform but probably not a very commercially-viable one.
Now, if I were to create a game or large visualization project myself I'd start with an existing engine. If I need something that the engine doesn't provide, I'll add it. If performance isn't good enough or executables are too big, I'll look into it and change the code or build system. I'd probably throw out quite a lot of abstractions too, e.g. having multiple RHI's on a single platform will slow down the code. Things that get compiled in while I'm not using them I'd try to out-#define.
Now, to add to the discussion about having a FreeBSD gaming revolution. It's probably not going to happen
We all know that FreeBSD is a great OS and is really feasible as a gaming platform as well. But FreeBSD doesn't have the numbers to make porting commercial games or software to FreeBSD a commercially viable solution. It's not just about engine support, it's also having distribution means. There is no (native) Steam for BSD, which is still the largest gaming platform out there. There's no Epic game store either. No GOG installers for FreeBSD. There's just nothing.
Now, you might be thinking that we could indeed start a bunch of open-source games using one of the supported engines. That's great, but it's also a massive amount of work. It's not impossible, but it takes real dedication to get to somewhere that there's actually something playable and gain the attention of people. And once it has people's attention I guarantee you it'll be ported to Linux and possibly Windows. There's also a good chance someone puts it on Steam or a mobile app store under a different name to make a quick buck.
Also FreeBSD doesn't even have ports of all open-source games, clearly indicating that there isn't that much interest of coders/porters. I myself have had
The Dark Mod on my todo list for years and still haven't gotten around to it.