vendredi 7 mars 2014

Multi-Threading in Multiplayer Strategy Games


Vote count:

0




In most online multiplayer strategy games, players build buildings and attack to get better at the game.


But, there's one thing I've never understood. A player could start building some building, that'll last for 3 hours.


But then, even though he disconnects, the building keeps getting built.


That, of course, means that it's server sided.


But to keep the server responsive while the building is being built, it has to be on a separate thread, which then becomes a problem.


Think about 500 players connected to one server, each building 2 buildings. That'll account to 1000 threads, and as a result the server would be unresponsive.


So how is it done correctly? I want to program a similar game (for Desktop with C#) but I have no idea how to manage the server sided constructions with efficient multi-threading.



asked 39 secs ago






Aucun commentaire:

Enregistrer un commentaire