How does mmorpg server knows to whom he should send other players position so that client A know he has to draw player from client B on x,y position, player C on x2,y2 position...
I can think only 3 solution.
1) he sends it to every player, but that would be impossible
2) he keeps players in some sorted list/array/whatever and send it just to n nearnest players (eg. for player 55 he send information about position of players 45-56)
but then keeping that list/array/whatever shorted would take the server too much work
3) he send it to every player in area, he send info on players to every player who is with him in the same area (and listening client can make distantion check (packet >> x >> y; if ( ((x - yourx) > maxdistance) || (y-youry) > maxdistance) drop packet; else process packet, draw player from packet...)
but this would mean that game areas should be small, else clients would get hundreads of informations on players that they dont need to follow (they are too far)
I just cant figure out how is this done efficiently