XaiJu
Mashpoe
Mashpoe

patreon


4D Miner Devlog #4 and Vertical Slabs Poll

Hey everyone,

It's been a while, but the fourth 4D Miner devlog, which covers the biggest changes to 4D Miner since the previous devlog, has finally been released! You can watch it on YouTube right now: https://youtu.be/f4CMKoVgqOM

While I encourage all patrons to visit the official 4D Miner Discord server to see most of the Patreon-exclusive content, Patreon is still a great place for patrons to provide feedback. You can always feel free to message me directly on this platform if you have any questions for feedback.

As most of you probably know, in the previous poll, which was released alongside the third 4D Miner devlog, you chose to add water to the game. I hope I did not disappoint with the result. I am personally very proud of how it turned out. I ended up adding both flowing water AND flowing lava. The way the liquids are implemented is pretty complicated, but I felt that it was necessary in order to fit in with the way the rest of the game looks. As a result, there are still some issues with the liquids, but I will continue fixing them over time. It is now obvious to me why other games don't implement liquids this way, ignoring the extra difficulty of making them 4D, which did actually make it considerably harder to do.

4D Miner's development has primarily been focused on major changes for the past two years, which has understandably made things feel a lot slower. I don't think most of you want another major update right now, so I will be focusing on many smaller features instead of a few big ones.

This poll is obviously about vertical slabs. These would be much easier to implement than water, but they would still have a profound impact on the game, and implementing vertical slabs in a game like 4D Miner is not without its challenges. A lot of the collision and camera-adjusting code would have to be rewritten, but that shouldn't be too difficult, since I recently rewrote all of that code after I rewrote entity coordinates and added regular slabs.

Another important concern with vertical slabs is the amount of block ID's they would require. Every block in 4D Miner currently takes up one byte of memory when in a loaded chunk (ignoring mesh data). Top and bottom slabs each have their own unique block ID's, but two block ID's per slab type isn't too big of a deal. Using only one byte to store each block means that the amount of memory each chunk requires is relatively low, but it also means that there are only 256 possible block ID's, including air and some other special block types that are only used internally.

There are currently exactly 100 block ID's in use, which is less than half of the total possible number of block ID's the game can currently handle. The reason vertical slabs are an issue here is that there are 6 possible orientations for a vertical slab in 4D, which would bring the total number of block ID's per slab type from 2 to 8.

With 13 different slab varieties currently in the game, adding vertical slabs would mean using up 78 of our 156 remaining block ID's, which is exactly half of them. Every additional slab type added to the game in the future would add 8 more block ID's, which means we would run out pretty quick.

Once we run out of ID's, the size of each block in memory would likely have to be doubled to two bytes. This would result in 65,536 possible block ID's, but the block data for each chunk would take up twice as much memory, which would most certainly decrease performance.

You could argue that we are going to reach the limit of 256 possible block ID's anyway, so we might as well deal with the problem now, but some people might not want to risk making the game slower right now.

The decision is up to you. If you choose not to allow for vertical slabs, that doesn't mean they will never be added, but it will probably mean that I won't consider it again until we reach the limit of 256 possible block ID's.

Thanks again for all of your continued support and patience. I will be focused on adding a lot more tangible features for a while, so feel free to voice your opinions about small-ish features here or on the Discord server.

Comments

Block data for them would probably be needed though so we don’t have a bajillion different variants being stored

Sebastian Schwartz

Vertical slabs could be used to align you to half-positions when strafing which could be cool.

Sebastian Schwartz

it would be hard to make a detailed build. but thats what we;re here for

SimplyLight

Assuming this method, expansion doesn't seem the right idea without a re-think of the system. If, say, you wanted to expand to 200 different slab-items, you'd need to support 16,000 different ids, instead of the '200'. In my mind it would make more sense if you could figure out a way to separate the id system from the orientation/slab system so that you can scale appropriately. Note that your system is redundant. In the current system, if 0x011011 is a glass top slab, and 0x011010 is a dirt top slab, you know that they can't both be in the same 'location'.

nqeron

IMO vertical slabs are not necesary. In minecraft, vertical slabs would be cool because they let you add more details to builds, however it is really hard to make a detailed build in this game due to the extra dimension. I think it is unnecesary and the time spent coding them could be used for something more exciting!

Megip

The jellyfish are awesome, I'll try to make an aquarium for them

Rayce Lee


More Creators