Creating a 3D Game Engine
I’ve always loved playing games. Who wouldn’t?
It makes you experience freedom. For a short time, you can become anyone, anything.
A pirate, a hero, the mayor of a city. You can shift your viewpoint, fly above the clouds, or experience the life of a football star. You can be anything for a few moments.
As time went on, new games emerged while the old ones faded away. Companies went bust, and creators moved on to other projects. But I still remembered the good old times. I started to feel nostalgic, longing for the essence of the old games that the new ones couldn’t capture. In particular, nothing could replicate the spirit of Port Royale 2—trade, production, pirates, treasure hunts, military conquests.
To this day, I’m sad that the developers went under. Although the title survived, the vision did not. The successors don’t even come close to the original.
This is the point where I started to dream—like so many others. I wanted to create my own game.
So, I started experimenting.
I watched some videos on the topic, installed the recommended tools—Unreal and who knows what else—and spent days and weeks learning how these tools work. But of course, I didn’t get anywhere. I was stuck in one place, frustrated.
The Opportunity
Later, an opportunity came in the form of a university class—Modern Game Development. Quite a lot of enthusiasts applied to it, myself included.
In the first class, we had to install Unity, the hottest game development platform on the market. It was a success, mostly… Of course, some didn’t manage. Over the next few classes, the success rate dropped drastically.
It felt like the teacher knew how to get to the other side of this labyrinth. But if you didn’t stick close enough to him, you’d get lost.
For the end of the year, he wanted us to create an entire game. It was sorted out who makes what. My group got a card-based game; the unlucky ones got actual board games like Catan or Carcassonne. Of course, only one team managed to create something presentable.
It was a big letdown for everybody. We blamed the university for picking such a bad teacher. We blamed the teacher for having colossal expectations. But that was university—colossal expectations, no actual substance.
During the last class, someone asked him about creating games by coding, not just using drag-and-drop interfaces. I’ll never forget what he said:
No one in this city has the ability to write a game from scratch.
The stress to keep my credit score, the self-humiliating failure, the anger towards the incompetent teacher, and the system for not providing an actual professor all built up in me.
I knew I wanted to create a game since my childhood; it was too deeply rooted in me. I couldn’t let it go. So many hours wasted alone—before and during university. And this incompetent teacher tries to tell me I don’t have the ability? In fact, nobody has the ability in a city of 250k people… No.
We all failed the class. We went on with our lives. And then COVID came. Everybody had to stay at home. Now I had even more time to waste.
A Book is Your Best Friend
So, I got back to it. I’d learned Java and C/C++ during university. I didn’t like C; nobody did, but Java worked out. So it became my de-facto first programming language.
With so much free time, I discovered a book: 3D Game Development with LWJGL 3.
Not about the drag-and-drop nonsense they tried to shove down my throat in uni. This was the real stuff—raw and unfiltered. I hit the jackpot.
So, what did I do? What everybody would. I printed it into A4 papers and bound it into one book. 21 chapters of code and explanation. Thicker than the Bible.
Down to the basics:
Project setup; the game loop; the first window; the first triangle on screen; 3D rendering; textures; camera; GUI; lighting; shadows; skybox; normal mapping; animation; asset loading; object selection; audio.
It had everything and more. I was overloaded with information. I could finally see why we learned matrix calculations. Finally, some of the stuff they taught us—in school and uni—made sense; they had an applicable place in the world.
I always had problems with reading. I’m very slow. So it’s easy to lose interest. But I did persevere. Page by page. Chapter by chapter. With a yellow marker in hand, I slowly turned those pages. And it was not easy.
So many abstract ideas, all compiled into one place. The synergy of different subjects—it finally made sense.
The book came with source code, so the reader could try it out, play around with it. After each chapter, I ran the source code, then tried to recreate it. From abstract numbers and raw calculations to Minecraft cubes, blue skies, lights, and shadows. It was the birth of a new world.
And Then It All Ended
Those 3-400 pages, 20+ chapters, thousands of lines of code. It all just ended. Still no game, only the basics. But now I could finally see. Now, creating a game didn’t even seem that important. Being able to replicate it was enough.
So, I did it. Based on the learned techniques, I put together my own engine. It misses some things—no UI, no audio, and most importantly, no game. But it worked.
Then I refactored it. And did it again. And again. Like a blacksmith strikes steel, I formed the engine to my desired shape. Changed the architecture a few times, loaded terrain into it so it’s not so lifeless. And for some reason, I felt like this is enough.
I’ve seen all I wanted. I could do more, but I didn’t need to. I’ve proven to myself that I can do it, I’ve disproven the incompetent teacher. And I’ve lost the appetite to recreate a game I had nostalgia about.
These old games faded away for a reason. I, for a similar reason, also stopped chasing them. In the end, it was the journey, not the destination that mattered.
The games were nice when I still played them. The ones creating them had fun doing it. I also had fun learning how to do it, and that’s enough for me. Life goes on.
Links
Ready to get started?
I'd love to hear about your project. Let's chat!