Jump to content
Site Stability Read more... ×
  • Advertisement
Sign in to follow this  

Using lidgren in a reliable kind of game

This topic is 2924 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I did these questions to lidgren author and he suggest me to ask here for details ...

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.

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 ( link )
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.
Multiplayer and Network Programming ).

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!