What is the best way to create a 3D grid?
In java, I am making a game that takes place in a somewhat Minecraft styled world. I need a 3D grid to map out each block, and I’m still a bit confused on how I should go about putting it all in.
I am using LWJGL in hopes that it would make my life so much easier. But if there is something better to use, let me know.
A link to a downloadable minecraft world based tutorial would be wonderful! I have not been able to find any tutorials on the subject (or download-ables).
Basic World Idea:
- Makes a 3D grid 1024 x 1024 x 128
- Different block types with flexible land tops/bottoms (so the land is more “real”)
- Chunk based system for land that would be grouped into 16 x 16 x 128 blocks
If you want change size or implement complex logic on this grid it is better to create your own data structure based on List. But in most cases (only holding data) plain arrays are appropriate.