The Game Within The Engine Or The Engine Within The Game

For the past few months, I have been making my own game engine from scratch. It has been lots of fun–more fun than I’ve ever had. Implementing and learning about various different systems has been a joy. However, I did not start this journey to make a game engine to rival technologies like Unreal, Unity, or Godot. Instead, I wanted to make a game. That was the goal all along. From the beginning, I knew that whatever engine I’d be creating, will be my game creation tool. And, every once in a while, I get to a crossroads. An intersection that boggles my mind and makes me stay up at night. One which I cannot seem to get past. And if I do, in fact, get past this intersection, I always seem to reach another similar one.

So what’s this intersection?

Engines, inherentlyly, are completed technologies that span multiple systems. Often, a game engine developer has to think about all the possibilities that the engine could be. An engine is not a single entity. Rather, it is a collection of systems and components that perfectly communicate with each other in order to produce the final product of which it was intended: a game. Games, too, are complex. The game engines often do most of the work like rendering and physics, but games also have logic that needs to be computed. Gameplay systems that need to be implemented. These gameplay systems, while they can be separate from any system in the game or the game engine, often take advantage of the systems that already exist.

This crossroads of mine appears whenever I’m done with quite a large system in the game engine. I felt this intersection arrived when I finished the renderer. I felt it when I implemented the audio system. I felt it again when I had text rendering working. One of the problems of making a game engine before the game is that you may never know when to stop creating the engine and when to start creating the game. And it is at this intersection where all of my annoyances lay. Should I start working on the game or should I implement the physics engine? Should I work on the game or should I improve the performance of the renderer? Should I start prototyping the game or should I enable multi-threading across the game engine?

This question is not rare. It is fairly common across game engine developers. Especially those, like me, who wish to make a game using their own custom game engine. And, often, the answer to such a question is to first create the game and make the engine right along with it. That way, you know exactly what your game needs. Anything that your game needs, implement it. Anything else can wait. You see, personally, I agree with such a statement. The question now shifts. It isn’t the question of should I work on the game now or after this system? Rather, it becomes my game needs a very simple collision detection system, how can I do it? The questions become very specialized to whatever game you’re working on. Sure there are common systems that multiple of your games will share. That is especially true if you like making games for a certain type of genre. On the other hand, those who wish to only create a game engine, do not have this dilemma. Since, obviously, the only thing they care about is the actual engine. Perhaps, yes, they will make a game in the future. But, for now, it is only of their utmost care to make a usable game engine.

Unfortunately, however, I fall into none of these camps. In the past, I used to just start making the game. Slowly, then, the game and the game engine lying underneath it start to grow into something usable. However, that was in the past when I made simple 2D arcade shooters. That is not to say that such a thing cannot be done anymore, or that these types of games would not have benefited from a simple 2D game engine. But, still, that kind of behavior is not eligible for me anymore.

For 2 years now I’ve been creating 3D games from scratch, using technologies like OpenGL for rendering and GLFW to handle such things as window creation and input handling. It is not just about drawing simple rectangles and triangles anymore. The tides have shifted towards a more complex set of parameters. Meshes, 3D models, skeletal animations, 3D physics, and the like. I could not just load all of the assets into memory when the game loads up, for example. That would be unimaginably slow, especially with games that have a large quantity of assets. Extra care must be taken to make sure the game does not dip below 30 or 60 FPS. That is all to say that just creating a game and thinking about the game engine later is not eligible anymore.

I started this journey of creating the Nikola game engine to make the game creation process easier and quite specialized to my needs. However, I do see the problem with that method right now. I wish I had just started working on a game and, once the game was over, I could have taken these common functionalities and grouped them into a library which I would have called Nikola as well. But now, at least, I have a game. With this current method of mine, though? I have a semi-functional game engine, with lots of missing features and no games in sight. Again, that would have been fine if I were intending to create game engines. But alas, that is not my goal. Just to remind you, my goal here is to make a game. But all is not lost.

I am currently in a great position. I have a functional game engine in my hands. It is missing features, yes, but it exists. I could have not said such a thing a year ago. On top of that, this game engine is quite robust in its already-existing feature set. Both 3D and 2D renderers. Dynamic and fast resource loading. An audio system that supports spatialization. As well as crude collision detection algorithms. I could just start working on a game that heavily uses these features while, perhaps, not needing things like physics or 3D animations. A game of the like that I have thought about is a city builder game. A City Reborn, I’m calling it. A game where you take control of a medieval town keeper tasked with re-building a ruined city from the ground up. Your tasks include such things as increasing the population, reaping profits, expanding the land, cultivating the farmlands, and, in general, improving the city to become a metropolis. I do not need physics. I, perhaps, need 3D animations but not until much later. Given my lack of artistic skills as well, I can get some assets and reuse them a bunch. No need to create specialized assets for the game. The complexity and the logic lay in the mechanics of the city builder. The inner logic that makes the game fun. That sense of improving a city and seeing it flourish. This game would be inspired by the likes of Caesar 3, Sim City, and, my personal favorite, the From The Ashes DLC of Kingdom Come Deliverance, where I got this idea in the first place.

A great idea and an effective method, given my current abilities, right? Well, here’s the thing. The game engine that I created, Nikola, was not intended for such games. I made this game engine with FPS games in mind. Games like Deus Ex, Portal, and Half-Life. My dream games. Now, that is not to say Nikola cannot make a game like A City Reborn. It can absolutely make such a game with ease. However, do I wish to create such a game?

What I Want Do VS. What I Can To Do

Every game developer has a certain type of game they wish to create. A certain emotion they felt as a kid playing a game that they want to imitate. A certain genre, perhaps, that gave them so much joy. The games that shielded them from the pains of the world. The games they felt they could play for hours.

And, for me, there was a very special game that I loved to no end. Kojima’s masterpiece Metal Gear Solid.

I know it might not be the prettiest game ever, especially holding it to today’s standard. After all, it was a game that was made in 1998 and it ran on the PS1. But it gave me a feeling that I still remember to this day. The details in the absolutely wild story, the sometimes flamboyant characters, the settings, the voice acting, the stealth gameplay, the musical score, and everything else. All the pieces in that game were taken care of. It was like a symphony, constructed by the most brilliant musician who ever lived. Every piece of the game harmonized perfectly together. It was a game for the ages. A game that made me start this journey. A game I may never forget.

But it wasn’t just MGS that made me feel this way. Portal, Half-Life, Doom, Deus Ex (oh my, Deus Ex. My love). All of them had captivating stories that left me on the edge of my seat. Innovative and immersive gameplay that made me want to be in the game. These worlds they created were so rich in story, characters, and details it made me go wild.

Now, listen, it doesn’t mean that I play just one kind of game. The FPS games with a cool story. I get bored very easily. I like to look at other things, too. One of the genres that I like to dip my toes into as well is the Real-Time strategy genre, or just RTS for short since my fingers are getting tired. In particular, I enjoyed the RTS games from Paradox Interactive. I do not even know how many hours I poured into Europa Universalis 4 (EU4). With RTS games, I liked the idea of improvement. That feeling you get as you’re slowly building your one province city into a rich trade center or, if you’re like me, a terrifying empire that threatened to swallow all of its neighbors. Specifically, though, I loved Crusader Kings 2 (CK2). This, much like EU4 was created by Paradox Interactive and it’s an RTS game as well. However, the difference between CK2 and EU4 is that in CK2 you played as the ruler not the country. If the ruler dies, you don’t lose the game, but you lose all of the good traits the ruler had. And, potentially, you might lose huge swaths of your land if the heir was not particularly likable.

And while RTS games are a great friend, FPS story-driven games are my love. They are the partner I wish I had known all along. The friend, the sister (or brother. No discrimination around these parts), the wife, the mother, and my everything. My moon and starts. My.. you get the point.

I have thought about this kind of question for so long. This question of what kind of games do I want to make? Maybe I’m overthinking it (and I am known to do that), but making games is such a hard endeavor. Making a game can potentially take years if you’re not careful. I can spend years pouring my heart and soul into a game before seeing it take shape. I want to spend that time and effort on something I want to create.

Once again, I like RTS games. I love to play them. But that’s just it. I love experiencing RTS games. On the other hand, I love creating and experiencing FPS story-driven games.

But, from a technological and efficiency standpoint, making RTS games is going to be way more beneficial than FPS story-driven games.

It is no secret that the types of games I love to create are a “dying breed”. In the early 2000s, they were the beast of the market. Now, however, they are far and few in between. While I am not saying that there aren’t people who enjoy these types of games, I am saying that it would be more efficient, time-saving, and financially beneficial if I were to make an RTS game over an FPS story-driven game. On the replayability value alone, RTS games are no match for an FPS story-driven game. Not to mention the art, the sound, and the environments that are needed for even a “good” FPS story-driven game are immense. It is not impossible, but for an indie developer making his own engine, it might as well be.

Let me give you an example. Before this A City Reborn game I was cooking up, I was planning to make a 3D FPS zombie shooter with a deep story about this old man who is trying to save his retirement home from a horde of zombies. And even though it is a zombie shooter on the surface, I was trying to tell a deep story underneath it. These zombies aren’t good ol’ zombies, but rather, they are the mistakes from the old man’s past coming to haunt him. It is the struggle of trying to fend off the past while trying to live in the present. The feeling of trying to fight the guilt of the past. I wrote a short story with the same concept not so long ago and I wanted to “adapt” it into a game. I would have called it Retirement Home. Clever.

Okay, not bad. So what’s the problem there? The technology, my friend.

In order to have a game such as this, I need a respectable physics engine computing its results under the hood, a nice particle system, a 3D animation system, and other things, too. I can very well create these systems in a month or two. But see, that’s the problem. A month or two. I have already been creating this engine for the last 7 months. How much longer will it take to create a game? And so, that’s why I came up with the idea of making a game with the current state of the engine and then creating the game I actually want to create later on.

So what now?

The Now And The Future

I always think about the future. There is probably a deep philosophical reason for this behavior, one which I do not care to explore right now. It is not a secret, though, that I always keep the future in my mind with every decision I make. A terrible way of thinking, perhaps, but it is the truth. I say all of this because this decision is wrapped up in this paradox (not the game studio) of the now and the future. Would future me be proud of this moment? Would he thank me for it or would he curse me? Who do I want to be in the next 10 years? Will this intersection lead me to the road I wish to take? Will it diverge me even further from my goals and ambitions? It is an anxious and overthinking mind that never ceases to think about the future. I hate it.

But the question still stands: what now? Should I take the plunge into creating more systems and delay the inevitable game I wish to create even further down the line? Should I just stop overthinking every decision I make and just create a game? Any game? I will learn something with every game I make. I knew this back when I was creating simple 2D endless shooters, and I know this now. Making a city builder game will not “waste my time”. By no means. It will only make me a better programmer and game developer in general.

But wouldn’t I just end up creating these systems after A City Reborn anyway? My eventual goal is always the FPS story-driven game. It always was, and it will always be. This city builder game might take me about 6 to 8 months to create. At least the one that existed in my mind. Once again, I like the idea. I’m excited about it. I just don’t know if it will be the one I wish to make now.

Besides that, while I like these kinds of games as I said a thousand times before, I do not feel like I know them, you know? When I think about the systems and methods of creating an FPS, I know immediately what to do, what to implement, and how to implement it. I made similar systems in the past and I have an intuitive feeling of what fits and what doesn’t since I’ve been playing these kinds of games for damn years now. I’m not saying I’m an expert. Absolutely not. Yet, I know what I wish I’ve had with FPS games. I have a vast catalog of references to these FPS games. With RTS games, though? I have maybe a couple of games to reference.

Ultimately, I think, this is a struggle between love and pragmatism. The city builder game is a pragmatic choice since it hits all the right points of efficiency, time, and the current state of the engine. It is the game I can do right now. However, my love is not pragmatic. It is chaotic, time-consuming, and will take a lot of effort. But… so what? I did not start to make game engines (or more like games from scratch) because I hated Unity and wished for all game engines to die. I make game engines because I love it. It was not a good decision back then, and it is not a good decision now. Choosing a game engine like Unity or even Godot was the pragmatic decision. It still is. And yet, here I am, up until 3 in the morning trying to find a good physics engine that doesn’t suck.

If I were a more disciplined and pragmatic man, I would have probably picked the smarter option. I would have just made the City Builder game already. Who knows? I might not even be here. I might be a millionaire with a happy life and a better career. But, sadly, I am not a smart nor a pragmatic man. I’m dumb. Dumb and full of love.

That sounded bad, but you get the point.