So, you want to make a game engine
Unity's recent controversy sparked a heated debate on game engines. Some said that everyone should immediately switch to a new engine, while others replied that switching engines can take months if not years. Some said that the best way is to roll your own game engine, to what others noted that this isn't a simple task. And, you know, everyone is right here: there's no single answer, everything depends on a specific case. But maybe writing your own engine isn't as hard as it sounds? Why would one do that anyway? What does it even mean to make a game engine?
I've never actually worked with any game engine except my own pet engine, which I've been slowly expanding for 3 years by now (it's about 100k LOC already) and successfully used it for over a dozen jam games and one releaased commercial game. However, I've seen people use other engines; I've seen people complain about other engines; I've seen people talk about their own engines; I've studied the source code of other (open-source) engines. So, I believe I have a few things to say on the matter, though, admittedly, my experience might be somewhat biased or unconventional.
Contents
Part 1: The difficult questions
Why make your own game engine?
Let's start with the elephant in the room. This has been discussed over and over, but it doesn't hurt to discuss it one more time. Here are a few reasons why you would ever make a game engine of your own:
You'd release yourself from the burden of questionable corporate decisions, which, as recent events show, is a big deal
from the burden of questionable corporate decisions, which, as recent events show, is a big deal A custom game engine is free (neglecting the development cost, of course, – nothing is really free)
(neglecting the development cost, of course, – nothing is really free) You can optimize the engine to your own needs (or the needs of a specific project), in terms of performance, iteration time (everyone loves waiting for shaders to recompile or lightmaps to bake), engine architecture (you'd probably use a ECS instead of a conventional scene graph for a game with millions of flying objects), and many other things
... continue reading