Sign in to follow this  
EuddysRosario

Using lidgren in a reliable kind of game

Recommended Posts

[b]I did these questions to lidgren author and he suggest me to ask here for details ...
[/b]
First of all ... great job, I have read excellent comments for this library, I just downloaded and will try to check the code to learn more about it.


I will make a little talk about my game;
I'm makiing a game where people can play (till now) 4 differents kind of games, they connect to a lobby pick up the game they one to play and if there is an available place in the room he's redirected to the room (some rooms can support 4, 10, 20 depending on the type of game selected by the player). Once in the room the server will start the game if exists the minimum players required. The game is synchronized all the time by the server in a connected way (everyboby in the room must wait until the player in turn make a move and the server send the answer to the rest and go on), so the server must guaranteed the data arrive to each player at least they dropped the connection.
My initial idea is to use TCP because is a reliable connection but is more slow than UDP (as I have undertood). Between 4000 - 8000 simultaneous connections are expected. An initial loggin is required to connect to the lobby for validation. People in the room can chat while playing.


Now, I have some questions to you ...,
1.- Can this library (that use UDP) be used instead of using TCP connections in a reliable and always connected socket?
2.- In a computer with 2.4Ghz dual processor and at least 4GB, how many connections would you think is possible to get without kill the perfomance? what will be the maximum size of each packet?

Now, please a little advice you can give me (independent of the previous questions and answers) ...;
1.- As I said the game will include a lobby server and some game servers (one for each type of game, 4 till now), Should I create a chat server too?
2.- Considering the previous question, how should the player application be make it? I mean,
(a) should I create a socket for connecting to the lobby server (done)?
(b) create a socket for connecting to the selected game server (done)?
(c) create a socket for connecting to a chat server (confuse)? I don't
know if is better (avoid the chat server) interchange the chat messages directly with the game server, in this case the game server must be programmed to understand when is a chat message or a movement or any other thing. Actually for each player turn I do a block connection.
Any advice, Am I wrong with the ideas? somebody ....

Thanks in advance.
Regards,
E/R.

Share this post


Link to post
Share on other sites
1. No idea, I don't know anything about lidgren (just like its author?).
2. I'd say this depends on your game, not just the network library.

---

1. Without chatting the lobby "server" could just be a MySQL database ( [url="http://dev.mysql.com/"]link[/url] )
2a. How would you connect to your server without a socket?
2b. same as above

I suggest you let every player who wants to start a new game host it themselves and use a small MySQL server to keep track of all the games. This way you can handle 4000-8000 players without a single connection to your own server x) (people still need a username/password to use the MySQL server)

Maybe you'll get better answers if you ask your questions in the right place ^^ ( i.e.
[b]Multiplayer and Network Programming [/b]).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this