Why is chunk size often a power of two?

Posted by danijar on Game Development See other posts from Game Development or by danijar
Published on 2013-01-07T14:56:00Z Indexed on 2014/08/19 16:32 UTC
Read the original article Hit count: 287

There are many Minecraft clones out there and I am working on my own implementation. A principle of terrain rendering is tiling the whole world in fixed size chunks to reduce the effort of localized changes.

In Minecraft the chunk size is 16 x 16 x 256 as far as I now. And in clones I also always saw chunk sizes of a power of the number 2.

Is there any reason for that, maybe performance or memory related? I know that powers of 2 play a special role in binary computers but what has that to do with the chunk size?

© Game Development or respective owner

Related posts about Performance

Related posts about data-structure