Dabbling with basic MMO code because it intrigues me.
How does the server handle monsters / mobs?
I understand that generally on each game tick, the server loops through each player to send them updated positions of each other nearby player or mob.
So every player loop you're also looping through every other player but is it just standard to loop through the entire mob list too? I mean there could be 1000+ mobs idling around the game world/zone. Would this just slow the loops down?
I thought maybe they keep a seperate list of ACTIVE mobs, ones that are either near a player or are chasing a player, but that would still require looping the idle ones to check if a moving player comes near one. Unless the aggro loop is less frequent (thinking out loud here)..
Is there some tricks or common workarounds involved? Or is that just how they work?