>>22894
>You generally don't do your own engine because you love games and you want to get your game made (unless you are already very experienced and skilled), you do your own engine because you love the programming and problem solving involved for its own sake, or as an educational endeavor (or you have a development team and you're the engine guy).
This pretty much sums up enginedevving. It's fun if you're a programmer. Discovering how to write a model loader or implementing occlusion culling or even draw batching are all pretty challenging stuff and there are so many ways to tackle those problems.
Myself I'm working on a multi-platform API-independent engine. Been working on it since March this year, but I took a break for 4 months in April because I had to do a major rewrite and I was lazy as fuck. It'll be a general all-purpose engine but I'm going to be using it to make an adventure game later on, so I'm eventually adding things like seamless asset loading, terrain LOD and that sort of stuff, but I'm working more on the general aspect of it first.
Since it's multiplatform and API-independent, anything that relies on hardware specifics is abstracted away using a plugin system. Basically I have functions like GPUAssembleRenderingInfo or OSLoadFile which are set up as function pointers to nullptr. There's an external header that gets included into whatever game I'm making and loads up the appropriate DLLs/.so/.prx libraries depending on the target platform and APIs. So there's also plugin files that get compiled to shared libraries and export these functions, this way I can easily add on new platform plugins and API plugins when needed. (the main engine sort of works as a plugin system too but it just uses namespace versioning, so I can pull in different versions of different parts and it's setup so that each part is completely independent of the others)
There's multi-threading support using a thread pool/task manager implementation I wrote up. It runs pretty fast and scales well so I'm proud of it. There's IO support for loading files and stuff/reading input, there's audio manipulation stuff, HUDs, physics, pretty much the norm.
For modeling, I just export from blender or Maya as usual but since Models in the engine aren't represented exactly as they are in the .obj/.fbx or whatever, I had to make a model loader. Mine was shit so I ended up writing a program that uses Assimp to load it, then I take that info and compress it and put in a format where I can just memcpy it into the game memory instead of all the Assimp overhead.
Shaders of course need to be abstract too but instead of going overkill I just have a simple parser that loads in a single format of file, and this file contains info about all the different versions of that shader (GLSL or HLSL, which API it uses etc), so I just load this file and extract the appropriate shader depending on which API I'm using.
As for the engine, any game I write up just gets compiled using clang. Clang allows you to modify the precompiler but it was alot easier to just write up a regex replacer on my own since I didn't want to do anything fancy. You just include the engine header, override a GameState object's start() and stop() functions, and the library gets built into the game and out comes a DLL or an executable if it's a release build
For scripting, there's a good blog run by Molecular Musings, can't remember the guy's name but he has a pretty nice engine, and he had a technique that allowed him to use regular old C++ for scripting rather than using Lua and adding bindings and managing libraries and shit. Basically, you make a dll like usual with a Script class that overrides some virtual methods (or in my case, using an unordered map to store function names and pointers to them), use placement new to create the script object, and by being careful and not using functionality that your engine library doesn't have (like pulling in standard library functions you never use in your engine), you end up with Scripts that are a fraction of the size of the .cpp file that made them and compile super fast. I use that scripting setup and it works wonders.
Right now, all I'm working on is fancying up all the HUD code, getting a good particle system setup, and improving the rendering pipeline a bit. I honestly thought it would be alot more daunting originally because I never made an engine like this before but it's easier than I thought.