MMORPG MULTIUSER DESIGN

Started by
1 comment, last by Pyros-AtEarth 20 years ago
Hey there, i have a small game team which we plan on creating a game. The only issue i have is that i am not sure how i can have multiple users. Do other people who use servers use winsock? or directx play? or something else? And how do they handle more than 1 user. Examples would be helpful, as well as meaningful descriptions about them. Thanks alot Pyros
Advertisement
You should ask this in Networking or General Programming forum.
There are several different ways to go here in handling multiple users.

1) Spawn a thread for each new person that connects. Basically each connection has their own ''bit'' of time on the server.

Pros: Each person is handled in their own space. Can handle two people at the ''same'' time.
Cons: Big overhead, spreading data across different threads is very difficult to do and do correctly.

2) Deal with data as it comes in. So you see what socket has data on it an deal with it as it comes in and handle it sequentially. Your server maps what user is connected to what port.

Pros: Much easier to handle all data in single thread.
Cons: Could cause latenecy on the server if you process things in order.

3) Worker threads. You set up a few threads to deal with incomming traffic. When a new connection is made it is added to the thread doing the least.

Pros: Can make server more responsive.
Cons: Again, handling cross thread data can be a big pain.





-------
Andrew
PlaneShift - A MMORPG in development.

This topic is closed to new replies.

Advertisement