My current project involves creating a Minecraft-style terrain made up of cubes. To optimize performance, I am looking for a way to merge these cubes server-side before sending the data array to the client. The goal is to reduce the strain on both the client and server systems by minimizing the amount of merging required.
The initial approach involved sending an array from a Node.JS server containing block types for each chunk, which then determines the material index for each block. However, merging each block individually into one geometry proved to be time-consuming and inefficient for my intended use case.
Now, I am exploring the possibility of only sending vertices to the client along with the block type array to create faces for multiple cubes with different materials. This method would not only lighten the load on the client-side but also streamline the merging process on the server side.
If anyone has any insights or suggestions on how to efficiently hide unnecessary faces within a chunk's geometry based on the provided data array, I would greatly appreciate it. Thank you! :)