Making a minecraft clone, stuck in an annoying bug. Help.
I'm coding a minecraft clone (for learning purposes), and I got the terrain generation (yet still very simple), chunk loading and world saving all working. But I've trying to solve a bug related to the rendering.
You see, to create a chunk the game checks for each block if there's an empty/transparent block in the adjacency, but that only works if the adjacent block is in the same chunk. Resulting in blocks with invisible faces at chunk borders. I tried to solve that by checking what block is in that position in the neighboor chunk. That kinda worked, but the chunks are being generated in separate threads, which means one can be rendered before the other, resulting in chunks which their neighboor yet to be rendered to be generated with blocks with invisible faces.
I'm running out of ideas and I want to move on with the project, does anyone know a possible solution to this?