Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2004:
[Freeciv-Dev] Re: packet_conn_ping_info and connections
Home

[Freeciv-Dev] Re: packet_conn_ping_info and connections

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Freeciv-Dev <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: packet_conn_ping_info and connections
From: Andreas Røsdal <andrearo@xxxxxxxxxxxx>
Date: Tue, 19 Oct 2004 21:48:50 +0200 (CEST)

On Tue, 19 Oct 2004, Jason Dorje Short wrote:
> Andreas Røsdal wrote:
> > Why should there be a limit to the number of connections? Also, why should
> > there be a limit to the number of players?
>
> 1.  Assumptions in the code.
>
> 2.  Limitations in the network code (arrays must be bounded).
>
> If the first were fixed then MAX_NUM_PLAYERS could be made much larger.
>   MAX_NUM_CONNECTIONS could easily be larger.  However without
> redesigning the network packets or the core network code there must be
> _some_ limitation.
>
> The most common code assumption is that
> MAX_NUM_PLAYERS+MAX_NUM_BARBARIANS<=32.  4-byte bitfields are used for
> players.  However this has been fixed in a number of places already.

So the current limit for MAX_NUM_PLAYERS is 2^32, because 4-byte bitfields
are used for players. This should be way more than enough, for example 256
would be a more realistic limit.

Changing MAX_NUM_PLAYERS to 60 has no problems, I just tested. However,
setting it to more than 60 means that the AI players run out of flags and
nations. So then either set MAX_NUM_PLAYERS to the number of nations, or
come up with a way to provide more nations. (eg. by randomly generating a
flag, or something....)

Although most games probably don't have that many players, I just thought
it would be interesting to see a MMOG-type of game-style. Maybe even a
large tournament where all the players play at once in the same game, not
in a hiarchy of consecutive games.


Andreas Røsdal


[Prev in Thread] Current Thread [Next in Thread]