Results 1 to 10 of 10

Thread: Help large multidimensional arrays

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    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.

  2. #2
    PGD Staff / News Reporter phibermon's Avatar
    Join Date
    Sep 2009
    Location
    England
    Posts
    524
    aka Minecraft, what vegeta (the prince of all saiyans) describes is generally considered to be the best current approach to handling the vast amounts of data (well, until we have voxel hardware in a few more years)

    @up: I didn't know the chunk size. Notch is my hero, bit disappointed that his spaceship coding game didn't see the light of day, would like to do something similar one day
    Last edited by phibermon; 18-01-2015 at 11:43 PM.
    When the moon hits your eye like a big pizza pie - that's an extinction level impact event.

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
  •