This article with be the first of a long list about the development of my own Game Engine. This series of posts will document the progress made during development, re-transcribe the struggles, but also progresses, the thinking process and the cool stuffs found along the way.

This first article will set the base for this series: Where does this idea come from? Why doing this? And what will be the goal?

The beginning

Since I started programming, I have had in mind to learn how to build video games. Every single game that I play, I am obsessed with find which engine it uses, how is it made, etc... . Around 4 years ago (might be 5 or 6), I started to think about investing time in learning how to create video games. But as everything related to programming, I was more obsessed with the low level functioning of the systems that make games possible more than having a clear project in mind.

Don't get me wrong, I have a couple of ideas of video games I want to produce - one being written and partially scripted already. But my need for understanding of the subsystem was winning at the time. And still is.

I then started to develop my own game engine in C++, starting with the 3D engine, following development tutorial for OpenGL. I came to a point where I could load 3D models, render textures, skybox, having a basic Phong lighting model, a basic system of plugins and a "fairly" abstracted 3D rendering engine.

Example of what the engine could do. (low end computer with integrated graphics, no Nvidia or AMD

But as I was doing that in parallel of a full time job, sometime motivation faded out and eventually I basically stopped committing.

For around 1.5 years, I barely committed to the repo and improved what was in place. Until 2 weeks ago.

The new beginning

Behind this catchy section title is actually the truth.

2 weeks ago, I decided to start a refactoring (more of a rewrite) of the engine, with more defined goals and a slightly different approach.
First, let me list the points and objectives that will stay the same and where I will be focusing my next few years:

  • Cross platform: I want the engine to run on Windows, Linux and MacOs. Hopefully I will add more platforms to it in the future but this on those 3 platform that my experience is.
  • Abstracted: I want a sufficient level of abstraction that it will be easy to replace the Audio engine, the rendering engine, the physics engine, add plugins, etc...
  • 2D and 3D: I want to be able to choose rendering pipeline for both 2D and 3D, and having the subsystems working with it.
  • Editor: I still want to have a Game/Level editor coming with the engine.
  • Open Source
  • There are many many more ideas that will be listed on the repo of the project. Those are just the main lines of thinking, and what will drive the overall architecture and process around the Engine.

What will change now:

  • I want to build games with it. Meaning that throughout development, I want to produce examples demoing and proving that the engine works and is made for building games (example: Tetris, R-Type, small 3D puzzles, ...)
  • I want to divide the project development into small challenges: for example cool module system, plugins, UI renderer, Bloom effect, ... And document them, write about them, ...
  • Implement only features that are understood and used in an example: in the previous project, I implemented some small bits because some tutorial said it was nice but never dug into what was the real purpose and all.
  • Finally I want to be less picky. I am learning, this is a fun and learning experience. I used to be stressed not to do the right thing. But this is ok, I will do mistake and I will fix them.

Next steps

I started a refactoring-0.1 branch that intends to rewrite the code up until a similar state as before.

I will spend a lot of time in playing around with an architecture that will enable:

  • A good module system that enable hot reload of some subsystem (I had this on my todo list of things to play with for years)
  • A good plugin system to write proper plugins to load resources, enable algorithm, etc...
  • Abstractions of the platforms and the rendering API/Driver
  • And finally of the rendering pipelines: 2D/3D/UI.

As mentioned, this project is a learning experience, mistakes will be made, non optimal code will be made (do not forget, no code review, no peer help... yet, and no experience in that domain...).

Conclusion

The project is named CodeHero (this is up to change), it is hosted on github.com: CodeHero.

I hope to make great progress and share experience as often as possible on this "devlog".