I always thought it was a neat exercise to try and remake your favorite game. I once tried to rewrite Super Mario Galaxy's planet gravity (at a time when I had no idea what quaternions were), but that was a long time ago.
Around a time in 2026, I thought to myself : what about a Minecraft clone? Turns out it wasn't the first time I had that thought. Many times
I have attempted to make my own Minecraft, with my own blocks and own mechanics. The first drafts go all the way back to middleschool, with
the most naive approach imaginable. I remember creating an actor per block in Unreal Engine 4, and lagging the heck out of the editor in no
time.
But as time went on, I would gain more and more knowledge, clearer visibility on the inner workings of the original game, and finally start
getting some decent results.
Before we get to the current state of my Minecraft clone, let me tell you about that time I went archaeologist mode on my old PC. I discovered yet another attempt, this time in pure Java, and using the same technologies as the original game (OpenGL 2, LWJGL). I had no idea how old this project was, and I still don't know, but the oldest file I found in this whole project was dated June 2018 (with the most recent modifications being in May 2022).
Looking at the code today, it's... still very much naive, but there was progress. The world was small, divided into chunks of 16x16x64 blocks,
each with their own prepared vertex buffer. Rendering was fast, world update as well. Player collision only worked on the top face, however.
We arrive at my current project, my baby, my pride. For this one, I decided to start fresh. I'd still use OpenGL to make it easy on myself, but
I would rewrite it in C++, base it on my old Java project, and optimize every possible corner.
My main goal was to recreate the original experience as faithfully as possible, while still adding custom blocks and mobs that I wish were in the
game. I guess I could have just made a mod, but where's the fun in that?
There is so much to talk about, I don't know where to begin.
First, modding support. Java's structure as purely object-oriented and supporting reflection out of the box makes it super easy. But with C/C++,
I was forced to think about what was really going on under the hood. And I love low-level stuff, so that's perfect!
Outright, one major problem is platform-dependence. A mod must present itself as a module that can be integrated seamlessly into the game. That
module would of course have to contain some code, which follows a specific ABI, but also provide symbols that the main program can read. That's
quite a long way of saying "shared library time!"
Imagine I make a mod, and I want to release it for Windows and Linux. I now have to build two files : "MyMod.dll" and "MyMod.so". What about the
development kit? Don't tell me about it.
Now, granted, it's my own Minecraft, and if I want to extend it, I can just open the project, write stuff and run. Unless I release it, there is
no point adding mods. Still, the idea was fun to dwell upon.
If you want to see me take a shot at an actual mod loader, check out my Pitfall modding
project.
Click an image to enlarge.
My home at dawn
Lighting on the water
Furnaces work exactly like the original ones
Don't worry about it...
Wooden towers with bridge (daytime)
Wooden towers (night)
Index