I'm making a multiplayer game, where players are separated in to rooms that would ideally have about 20 players.
So I need a few pointers on an algorithm to distribute the players in to these rooms.
A few more constraints:
- When a players gets in to a room, he should stay there until he decides to exit (the room itself changes levels)
- There may be more room servers, every server should create more rooms until near full capacity
- There's a central server that manages all the room servers, and directs the players towards their room
EDIT
Because the question is too specific to my game and it is very likely that I will never mention all the details necessary (because they are hidden in my brain until someone asks) I'm considering deleting this question.
I'm not deleting it any longer because I've received an interesting answer.
Although for now I'm implementing a trivial solution, and I will improve it later if needed.