05-26-2016, 12:12 AM
Maybe save the time each chunk was last active. Then the delta (D) between last active time and current time is compared to threshold (T). T should be low (10-30 sec) for chunks not neighboring active chunks and high (120-300 sec) for chunks neighboring active chunk. (it stands to reason chunks neighboring active chunks are more likely to be visited more often.)
When D > T unload, if chunk is "dirty" save and then unload. (so don't distinguish between clean and dirty chunks)
This could ofc be combined with the max ram strategy.
When D > T unload, if chunk is "dirty" save and then unload. (so don't distinguish between clean and dirty chunks)
This could ofc be combined with the max ram strategy.