Usually I work on my real game project. But now I spent a little bit of time on a “small side project” as I called it. But then suddenly, it turned out not to be as small as initially thought
It was definitely a lot of fun. UE4 is really a great engine for something like this. But I should probably not write too much, you wanna see screenshots, I know! So I won’t let you wait any longer:
Here you have a nice Video:
And here some screenshots:
So, this is it!
All assets in this project are either created entirely by myself or were released as Public Domain and then used directly or edited by me.
While it’s looking similar to Minecraft, my intention was not to create a game similar to Minecraft, but just to see if it works to make a voxel based game with good performance using Blueprints only in Unreal Engine 4. The Minecraft look then later came when I searched for textures, and actually the whole internet is filled with public domain texture packs for Minecraft. So it was the best way for me to get textures for a voxel based project, since I am no artist. And let’s be honest, it does not look bad like this, having the graphical power of UE4 combined with the pixel look of textures which were intented to be used in Minecraft.
What am I using for this? I also want to say that I’m actually not a big fan of Minecraft and I have never spent any time on reading about how Minecraft did anything, everything I did for this is just my ideas on how to do it, and that was the fun about this. I have also never read anything about how any other voxel based game works, so I really started at 0 for this. I decided to use Instanced Static Mesh Components for the blocks, the game is divided up into chunks of at the moment 20x20x70 blocks where every block type has it’s own ISMC.
One thing I first expected to be impossible was implementing the noise generator in blueprint. The whole world is generated procedurally from a seed, so you need to have a noise algorithm to use. You can’t access the noise function from the material inside of blueprint, so you either need to not use any noise, use a plugin, or do it yourself in blueprint. First I used a plugin for this. After I saw that it worked, I decided to actually implement it myself in blueprint. So I implemented a 2D Simplex Noise function in Blueprint. I can tell you, that was a lot of fun. But after many hours, it actually worked!
So, I am not using any plugins at the moment. The whole project s 100% blueprint with no C++ being used. I think this project is a great example for the power of blueprint. If you would have showed this to the Epic Devs who originally built blueprint, they would probably not have believed it how far blueprint came. This project profits greatly from the BP->C++ converter, which is not a surprise with having a SimplexNoise algorithm implemented in blueprint.
The most time I have spent on getting the dynamic streaming of chunks working in a nice and performant way. You can’t use multithreading from Blueprint, so all your game logic has to run on one thread. It’s quite a challenge to get the game to never hitch while it’s only using one thread for all the logic. But, after a lot of work, I think I got it to work quite perfectly. There is obviously a lot of math in this project. Actually, if I disable the BP->C++ converter and profile the game, the nodes that take most time are actually +, -, *, / BP nodes if I remember correctly. Just really a lot of math. Doint it in BP is just a really nice challenge for the start, I will likely change that later.
I am very eager to hear what y’all have to say!