A common mistake people learning programming with an eye towards game development make is the idea that they require a game engine. It just seems natural, a car needs an engine to move so surely a game needs an engine. If only life were so simple.
Look at the history of most of the successful game engines in history, let’s use the Unreal Engine and the id Engine for my examples here, and you’ll find they started off with the game and the engine came afterwards. The Doom Engine (precursor/father to/first version of the id Engine) was not written to be a powerful game engine (for the time), it was written to run Doom. It just so happened a lot of the code got reused in other projects and thus the id Engine was born.
The Unreal engine began, oddly enough, with the game Unreal. Then a lot of the code for Unreal got used in lots of games that followed, being changed, refined and completely rebuilt along the way.
Game engines are not so much invented as they are accidentally created. You write a game, and then you refactor a lot of the code you used so it can be used in a later game. This alone is often enough for the developers/publishers/marketing department to say that both games run on a modified version of the same engine. And I guess technically it’s true.
The idea of a game engine is inherently ill-defined, it can mean a whole lot of things. At the end of the day, seeking to create a “Video Game Engine” is a foolish endeavour, as trying to create something ill-defined often is. Without a lot of luck and skill, you’ll get distracted by the shiny things you can do and at best you’ll wind up with a fantastic technical demo, but not something wholly individual you can use to make a game.
In fact, one could easily argue that the creation of a technical demo, getting someone to run around the screen, is one of the simplest aspects of game development. It is often the unique aspects of a game, the unique code which doesn’t quite always fit efficiently into the average generic “engine”, that provide the real challenges in coding and in developing.
The reason the Unreal Engine, the id Engine and the Source engine are at their current state of awesome is because they have been used to create so many games that the code-base has been refactored, modified and reused countless times in a long, iterative process. This is how a true game engine is made: iteratively.
The best way to make a ‘game engine’ is, at the end of the day, almost always going to be to make a game. The old adage, “Make games, not engines”, is as true today as it was in the days of Doom.
Quote of the Day
“My advice to you, if you’re trying to write an engine, is: Don’t. No matter what your reasons are — it doesn’t matter if you’re writing an engine so you can write your dream game, or if you’re writing an engine because you think it will be a good learning experience, or any number of similar reasons. They’re all wastes of time.”