[Networking] Gameserver

Hello all,

So I am trying to develop a multi-player team based game in Panda3d.

So far I’ve managed to connect client to a lobby, receiving and sending packets between them. I’ve also managed to connect the lobby to a Game Server Manager. So my main question for people more experienced with networking is, what’s the best way to create “sub-servers” in this Game Server Manager?

For example, Team 1 wants to play vs Team 2. They want to host the game. So I have to create a game server to hold the match (like Game Server #1). Team 3 and Team 4 want to host other game. Now I need a Game Server #2. What’s the best way to achieve this? I was trying to create new tcp connections to send gamestats to the lobby, but probably isn’t the best approach. Also I need UDP connection to communicate with players to refresh positions, etc, and I think binding to different ports for every different “sub-server” shouldn’t be the method too.

What’s the best way to achieve this?

When the player chooses to make a new server, it sends a packet that your main server handles. Then, it starts the sub server script with the options the user chose. That’s how I’d do it. I don’t know if you meant to say how you would do it or write a simple script but there you go, that’s my answer.

I’m thinking of creating each match on a new thread of the gameserver. Gameserver will only send useful information to the lobby, like stats, etc.