What I wish I knew before starting game engine

My first engine had a render graph, a job system, an event bus, and a reflection layer. It never drew a character. Every one of those systems was defensible on its own, and together they formed a machine for making decisions I did not yet have the information to make. Here is what I would tell the person who started that project.

An engine is a game that got pulled out

Every engine you admire was carved from a game that shipped. The abstractions exist because a specific problem repeated three times in a specific project. Starting from the abstractions means solving for requirements nobody has had yet, and you will guess wrong in the expensive direction: too general, too early.

So build the small thing first, badly, and let the second use of the same code tell you what the interface should be. Extracting a system after it has been written twice is far cheaper than designing it correctly on the first attempt — because the first attempt is never correct.

The renderer can wait longer than feels right

Rendering is the visible part, so it collects the attention. But the parts that decide whether your engine is usable are dull: a window that behaves, timing that survives a slow machine, a loader that reports failures, and a way to get back to a known state. A flat-shaded cube with a correct clock teaches more than a deferred pipeline running on a loop that cannot be trusted.

Tooling is half the engine, not the polish

Debug line drawing, a reload key for the current scene, a console that evaluates one expression, an on-screen timer, and a camera you can detach. None of these appear in architecture diagrams, and all of them pay for themselves within a week, because without them every bug costs an hour of restarting the program to look at a number.

Every abstraction is a promise to maintain it

An interface with exactly one implementation is a bet that a second one is coming. Sometimes that bet pays; usually it just adds a layer to step through while debugging. Count how many of your layers have one implementation, and delete the ones you cannot justify with a name you can write down.

The same goes for configuration. Every setting is a code path that must be tested in combination with others, so a settings file with forty options is a test matrix disguised as flexibility.

Finish something small, where people can see it

The projects that survive are the ones with a deadline attached to a small deliverable — a clip, a jam build, a demo someone can download. Publishing forces the build to be reproducible, the readme to exist, and the scope to close. It also gives you the only feedback that changes your next decision.

If I started again, I would spend the first month making one ugly, working thing, and I would write down every place the code fought me. That list would have been a better engine design document than the one I actually wrote.