Am Sonntag, 23. Juli 2006 17:39 schrieb Christian Vest Hansen:
> Hope you don't mind I'm putting this on the dev-list instead of the bug
> tracker, but this just feels like a better medium for discussion.
>
> Alright, sounds like the clients have the initiative all the time - the
> server is not going to contact the clients on its own initiative. So I
> think a statefull synchronous text based (UTF-8?) protocol will suffice.
> With commands along the lines of:
> OPENGAME <port>\t<name>\t<player-count>
> STARTGAME
> CLOSEGAME <name of winner>
> and
> LISTALL
Perhaps it should be "LIST *" or something so we can easily add queries.
Future ideas would be "LIST map=fuu maxplayers=120". But that is not urgent 
and has time.
There pops up another info we need to give the master: The map being played. 
Perhaps we should also transfer more gamesettings? Like participating 
players? Is that usefull? (I can view that in a UT or Quake serverbrowser, is 
it needed for an RTS?)

> The CLOSEGAME part will, however, cause the TCP sessions to be very
> long, if all state is tied up on the IP:PORT values - if the connection
> is closed and the reinitiated, NAT routers could cause the PORT value to
> change. A solution could be to return an ID number on OPENGAME and have
> the client refer to it with subsequent requests, and then bind the state
> information to the IP:ID combination.
"Port" doesn't mean the port the client connected to the master server.
It means the port the game is running on. And that should stay the same.
Or: The port other clients can connect to if they want to participate in the 
game.
And because of this the IP:PORT pair should allready be an "ID".

So my idea was that the game-creating-client connects to the master, tells it 
the port of the game, gamename and max-players. (Perhaps he can update that 
number? Like "JOIN <port>\t<playername>"?)
Then the connection is closed. The master will remove the game after a 
timeout, so we don't have stale games.
When the game is actually started, the creating-client connects again, tells 
the server that the game started and closes connection.
When the game ends, it again contacts the master...

I have no experience with networking, so that aproach might have flaws.

> About the port pinging, do you mean a TCP connection attempt?
Yes, to ensure that the game is reachable. (Should solve bug#4977)

Perhaps more/other people want to give their opinion on what the think they 
want in a serverbrowser. Otherwise we might end up in a mess when I only give 
orders to you karma.

> Dennis Schridde wrote:
> > When Warzone creates a new network game it should send a notification to
> > the master-server with game name, player number and so on.
> > The master should then remember the IP and port of the game and try to
> > ping it on that port. If that works it should store it in his list of
> > open games. When the client starts that game it should notify the master
> > server again that the game has been started. Same should happen when the
> > game ends. Perhaps even mentioning the winner so we can later on gather
> > some stats...
> >
> > When a client asks the master for all games it should get a list with
> > IP,port,name,player-count,status.

Attachment: pgp8Y6d8SMWzB.pgp
Description: PGP signature

_______________________________________________
Warzone-dev mailing list
[email protected]
https://mail.gna.org/listinfo/warzone-dev

Reply via email to