This is an update to my minecraft clone. For those who haven't seen the first thread, it is written in javascript and I'm using a library called three.js. Since the last post, I have been working on greedy meshing, which is an important optimization, connecting chunks together to create a world, and world generation.
Here are some pictures of the process:
Greedy meshing - 3D rendering breaks every 3d object down into triangles. The more triangles, the more lag. Initially, each face of each block that could be visible was being rendered separate from eachother - meaning each block, at most uses 12 triangles to be rendered (2 triangles in a side, 6 sides to a block). It would be much better if I just rendered one giant rectangle for blocks on the same level as eachother rather than render several different squares for each block. This is what greedy meshing solves.
These pictures are visualizations of what my greedy mesher was doing. It was pretty messed up at first, but I got it to work eventually.
After the greedy mesher was finished, I got to work on the fun part of combining a bunch of chunks into one world and then creating terrain. I played around with this a lot, which resulted in a couple interesting worlds.
The trees had weird stuff going on with the leaves. They still have problems, only fewer.
I guess the end goal is to either make the game similar to survival mode or just to re-create one of my parkour maps on it. It's been fun to work on so far
Here are some pictures of the process:
Greedy meshing - 3D rendering breaks every 3d object down into triangles. The more triangles, the more lag. Initially, each face of each block that could be visible was being rendered separate from eachother - meaning each block, at most uses 12 triangles to be rendered (2 triangles in a side, 6 sides to a block). It would be much better if I just rendered one giant rectangle for blocks on the same level as eachother rather than render several different squares for each block. This is what greedy meshing solves.
These pictures are visualizations of what my greedy mesher was doing. It was pretty messed up at first, but I got it to work eventually.
After the greedy mesher was finished, I got to work on the fun part of combining a bunch of chunks into one world and then creating terrain. I played around with this a lot, which resulted in a couple interesting worlds.
The trees had weird stuff going on with the leaves. They still have problems, only fewer.
I guess the end goal is to either make the game similar to survival mode or just to re-create one of my parkour maps on it. It's been fun to work on so far