Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

okay as for my MC clone:

how i achieve kilometers of render distance: you know the chunks are stored in a hashmap for the chunks with their chunk coords etc... so think of that but instead we get 5 of them.

basically the LODs are just separate grids of chunks, and chunks also know what LOD level they are so when rendered their LOD is also taken into account, so LOD0 chunks are rendered in LOD0 chunk coords, while LOD1 chunks are rendered in LOD1 chunk coords, and so on until LOD4.

and each LOD is 2x2 its previous level, so LOD1 is 2x2 LOD0 space, LOD2 is 2x2 LOD1 space, and so on, until LOD4 where it takes the 16x16 LOD0 space.

also each LOD level has the same 16x128x16 (to be faithful to Alpha) voxel data, and they are all meshed the same, the only difference is when generating LOD chunks the terrain generator itself skips the worldX and worldY and worldZ by the LOD factor.


and so basically instead of just one grid of chunks, i have 5 grids of chunks all stacked on top of each other and each using the chunk coords for their own LOD level..


and if you wanna calculate the render distance, basically take the length of LOD4 chunk and multiply it by the render distance, so LOD4 chunks have the length and width of 256 blocks, and on 16 chunks render distance radius, it ends up as 16x256 = 4096 blocks of render distance

(1 edit)

WOW That's genius! Now it makes sense how you did achieve it. What i tried were the greedy meshing system instead, but it still had some problems at long view distances. Ill can only imagine how much performance boost i will get with using both of the systems!

What are you plans for the feature? Do you plan to stop at one point? Or do you have bigger ambitions?

(1 edit)

i plan to recreate Minecraft Java 1 to 1 in C++ (AKA, what Bedrock Edition SHOULD have been), and follow a similar historical progression but instead starting from late infdev and reaching an infdev 2010-06-30 (the last one) equivalent, and then going from Alpha 1.0 to Alpha 1.2.6 and then going from a Beta 1.0 equivalent to a Beta 1.8.1 and all the way until release 1.8 (that is where i will stop)...

all while implementing QoL features like LODs and many optimizations (like very VERY heavy multithreading, and even a future Vulkan transition too for extra optimization), also preserving all the different terrain generations and letting people choose instead of just limiting to the latest one, and who knows maybe i could have either a branch of the game for cubic chunks too.


edit: so yeah this is my long term plan, but this MC clone is just one project of many others of mine that i am making simultaneously, so yeah, no rush, slow but sure progress, which is also why the code is open source too

That sounds cool! 

Really nice to see that one person can make a better voxel engine then a full blown out studio with a multi-million budget!

Well good luck with your plans!

i wouldn't say it is a better voxel engine, this is my first ever voxel engine too and my god i underestimated how much difficult making a voxel engine would be, it is because of this that i learned multithreading and i also realized that for voxel engines it is much MUCH better to use a ChunkProvider approach to manage chunks instead of whatever the hell i had before

Yeah its really complex. I my self now, I had been rewriting my code over and over just to make it perform better. It feels like I am making spaghetti right now. Maybe should focus more one adding new features, instead of just using my whole free time to make a code that runs 5-8 fps faster.... :skull: