

WORLD:
 Map should be composed of chunks
 EACH CHUNK US 256x16 FOR A TOTAL OF 4096 TILES
 At least 8 chunks in each direction of the player are loaded in memory at a time, max 64 loaded in total.
  Chunks will be managed in groups of 8. When a chunk is entered, check if there are chunks within 8 chunks of the player
   If there aren't, check if there are enough open chunks for a new group of 8.
    If there are, generate/load the next 8 chunks
    If there aren't, unload the furthest 8 chunks and load in the new 8 Chunks
  Handle loading in of chunks with threads. Load in at most one chunk per frame
  Instead of being deleted, chunks will simply be rewritten
 Entities will be kept in a list on a per-chunk basis
  Only chunks within an 8 chunk area around the player tick Entities
 Data should be stored as a structure with an id referecning the type of tile
  special cases for items that are above some arbitary limit (2048?) will instead reference from the tile entity list
AI:
 Entities should be stored in a list on a per-chunk basis



CHUNK LOADING
 Load in chunks by changing their replacement depth and adding them to a "to be loaded" chunk list.
 Chunks in this list will be processed one per frame on a seperate thread
  First serialize and write the old chunk to the disk
  These chunks will use their replacement depth to rewrite the data currently stored, based either on stored disk data or fresh generation
