I'm currently working on iocp game server. My game is just like diablo3 basically. 1~4 players join a separate session.
I did basic iocp preparations and now I'm working on game session class. The reason why I'm stuck right now is that I'm not sure if I should create a separate thread for each game session. This concept is the first idea that I came up with but I can't come up with other ideas to avoid creating so many threads for sessions when there are so many game sessions.
So here's my question.
- Should I create a separate game logic loop(thread) for each game session? Because that sounds so inefficient when it comes to the situation where only one player joins each session.
- If there are some other ways to design the server, please let me know what I should look for to study.
Thanks for your help in advance and sorry for my bad English.