I want to create an effectively infinite world, like Minecraft, where chunks are generated as users come close to the edge of their current chunk.
As I understand it, monsters in Minecraft are put to sleep when the chunk they are currently in is unloaded (as far as I understand, if a player moves away from a chunk and that chunk is not close to any player, it is unloaded). That is, they don't move or do anything, and are just stored statically on disk.
This means that all the monsters are effectively territorial and have the behavior of being awake only if a player is nearby - otherwise they sleep forever.
EDIT: Actually in Minecraft mobs despawn when a certain distance away from the player, resulting in a more random experience.
What if I want to simulate the behavior of large scale migrating herds? In an infinitely large world, there should be infinitely many monsters randomly wandering around. There might be herds of monsters wandering around. Obviously they cannot be all loaded in memory at once.
Now, if a player discovers such a herd, he might want to walk away some distance, and then come back later to follow the herd's tracks, which might be quite some distance, but he will eventually catch up to it. This seems impossible with Minecraft's way of dealing with loading/unloading chunks.
Is there some way of simulating long distance monster migrations whilst maintaining Minecraft's advantage of having memory usage be linear with respect to the number of players (rather than the size of the world)?