Hello guys, as you may have noticed, the blog has been frozen since September last year, the main reason for this is that I had lots of college work to catch up with plus I had to work on my application for University. This is kinda a high priority so I had to do that before I could continue working on The Cube Project. I have had some spare time to be able to rewrite the entire meshing system and implement some long needed improvements and also thought of a way to get around the dreaded block placement system what I have right now.
The meshing system what I had before had to be severely limited because I could not think of a way around the vertex limit with Unity. Unity has a 16 bit vertex limit which means that a mesh cannot have more than 65534 ( 65536 - 2 for triangle strip ending ) vertices in a mesh and any voxel based mesh can easily eat away at this limit with a small chunk. Previously I was using 8x8x8 blocks per chunk ( 512 blocks ) which is quite a small amount of blocks when you look at a voxel game. Comparing that to the new system, I can easily have a chunk made up of 16x32x16 blocks per chunk ( 8192 blocks ) which is 16x larger and runs at the same speed as before. I reworked the entire system, writing it back up from scratch and implemented an adaptive meshing system, it will now create new meshes when it reaches the vertex limit, this means that I can have infinitely sized chunks and never get any out of bounds errors. I tested the system on chunks with a massive scale 16x256x16 blocks per chunk ( 65536 blocks ) which renders very slowly ( due to its large size ) but proves that my meshing works. I would probably never have a chunk this size due to the fact that the render time would leave the player waiting for much longer when loading.
I think that its very important to try and find a balanced chunk size, something what loads at a decent speed but also is not too small. For me, 16x32x16 seems like a pretty decent size for chunks, it is not too small and it renders at quite a fast rate.
Looking at the image above, you can see an example of how a 16x256x16 chunk looks like inside the editor. Notice that it has 4 separate meshes.
I currently have a lot of work to do with the game and I need to rewrite a lot of features before it becomes anything playable.
Thanks for reading and keep checking the blog for more updates.
.png)
No comments:
Post a Comment