I want to make a multi player card game, allowing several people to play with each other (each game session should be able to have between 5 - 10 players).
I'm doing this in Python (Django and Socket.IO).
Because you have to wait for all players to finish before you can move on to the next round, issues will arise if one player leaves his computer or is disconnected, thus leaving all the other players waiting.
To solve this, I want to give each player a time limit to act within.
If there are 1,000 games going on at the same time, and 5 players in each game, that would hypothetically mean that at one point, you could have 5,000 timers counting down at the same time (or if not timers, some other way of dealing with this issue).
What is the best way to do this in Python? Spawn loads of threads with timers? Have something more complex like a dictionary with 100 games in each dictionary, and for every second, iterate through the list and check each player? (seems a bit finicky)?
I really want to hear what the best approach to this would be.