Results 1 to 10 of 10

Thread: Help large multidimensional arrays

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #7
    Using an array of organism records will work better for your problem, but for storing large amounts of volumetric data, you could try diving it into chunks. The world from the original post could be represented as a 256x256x256 array of chunks, each sized 256x256x256 (that's 16MiB if each entry is 1 byte). When a chunk is no longer needed, you can save it to file and unload it from memory - and then restore it when the need arises. This can cause some hiccups when you read from disk, but otherwise grants you the possibility to operate on volumetric data, while keeping the memory usage a bit more reasonable.

    @down: Minecraft actually uses 16xALLx16 chunks, so there is no partitioning along the Y-axis. But yeah, the general principle is pretty much the same.
    Last edited by Super Vegeta; 18-01-2015 at 11:29 PM.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •