So you want to build a game engine? Congratulations, that’s ambitious.

You’ve probably already heard “don’t build a game engine, build a game”. Which is good advice if you have a game in mind and want to finish it. Going down this rabbit hole makes it much more unlikely you will finish a game - at least one made with your own engine. It’s not impossible, but it is much harder. If that is your primary goal, you should pick an available game engine (Unity, Godot, Unreal) and run with it.

However, if your goal is to start or learn to build a game engine like those listed above, you’ve come to the right place.

What do I do?

The goal of the site is to be used in two different ways:

  • If you just want to learn about a particular subject, you can dive right into that section. One of the goals of the engine is to be loosely coupled, so you shouldn’t need a lot of background in a different module to get what you want out of it. That said, you should still look at the Core module, as those classes are used throughout the engine.
  • If you want to start at the beginning and go through everything, the site has a linear progression from one module to the next. At the bottom of each article you’ll find links to next and previous sections to help you move through the code and articles.

What’s included?

This site’s focus is game engine architecture and what I call the “glue” that brings it all together. We are going to make a complete game engine that resembles a Unity or an Unreal Engine. That includes an editor, scripting, a real-time server for multiplayer, an asset pipeline, and more. Often these are the most valuable assets an out-of-the-box engine brings to the table, but there are precious few resources on them compared to articles on rendering.

That said, we’re not going to build it all ourselves - we’ll use a number of 3rd party libraries for physics, scripting, audio, and more. Some stuff we will build ourselves, since I believe it is important to understand in-depth; in particular, the networking and rendering systems will be custom. And our final product probably won’t look like Unity or Unreal, which have hundreds of employees working full-time to deliver great products. We’re going to focus on education over performance.

Here are the pieces we’re going to build:

  • An Entity-Component-System (ECS) framework for composing objects.
  • Core libraries for IO, threading, messaging, and working with files.
  • A real-time client and game server for multi-player.
  • A JavaScript scripting engine based on Google’s V8.
  • A rendering system in OpenGL 4.0.
  • Integration of physics, audio, navigation and other 3rd party libraries.
  • An asset pipeline for importing of shader, textures, scripts, models, and more.
  • A streaming terrain engine for unlimited size terrains.
  • A game editor built with Qt for dragging and dropping and editing 3D scenes.

What’s not included?

As I mentioned above, our final game engine will be complete (ie. we could build a game using it), but it won’t be as performant or feature rich as commercial 3D engines. It serves as a foundation for you to learn and build on. Similarly, I wouldn’t call myself an expert in building game engines; there are likely many areas for improvement.

If you have feedback, or there is something you would like to see, please reach out.

Third Party Libraries

The engine created here uses many 3rd party libraries. Here is a full list:

What’s next?

Next, head back to the Table of Contents and click Getting Started to start at the top or find a section that interests you and dive in from there.