Quantcast
Viewing all articles
Browse latest Browse all 165

Chunk position algorithm

Hello, I'm making a Minecraft clone but I'm a bit stuck right now. So first this is what I want to do: ![alt text][1] My chunks are 16x16x16 big and I have 10x10x10 loaded chunks. Because I don't want to instantiate a new Chunk every time, I thought I could "recycle" the old ones. So when a Chunk gets out of the view range, it is clear that on the other side is missing one. But I can't seem to find a solution of how to compute the new position. Especially when the player walks diagonal. Right now I'm storing all 10x10x10 Chunks in a static list. Maybe even that's not the best solution. Please let me hear what you think. [1]: /storage/temp/32454-minecraft+clone.png

Viewing all articles
Browse latest Browse all 165

Trending Articles