Server side random selection of players

Posted by Ron on Game Development See other posts from Game Development or by Ron
Published on 2014-05-25T13:32:33Z Indexed on 2014/05/26 22:07 UTC
Read the original article Hit count: 261

Filed under:
|
|
|

Assuming I have a simple client-server game, where the server picks random players on a very frequent base, I was wondering what is the best way to select a random player (According to the following constraints):

  1. Solution must be high performance and highly scalable
  2. Random spread should be relatively even (meaning if I have 3 players and pick 99 times, they will all be picked 33 times more or less)
  3. Should only pick players who were active in the past X days (optional, but a big bonus)

The actual DB or data model used to store players isn't an issue here, as we'll select the technology in accordance to our needs.

However, high performance and scalability is (at the moment we have over 60,000 unique daily active players, and we plan on growing even more).

Thanks!

© Game Development or respective owner

Related posts about algorithm

Related posts about server