> Thanks for the interesting info, Matthias. Could you please elaborate a
> little? Why are these changes necessary to increase the number of possible
> players?
First of, I'm *not* an expert! That I'm telling you could be wrong. It
includes the knowledge I got from looking at the code and some testing!
Theoretically, you could increase the number of players by increasing
MAX_NUM_PLAYERS in common/fc_types.h. But if you try this you will get a
segmentation fault quickly. This is due to the fact that the code often
assumes that there are no more than 32 players. You have to find and fix all
these code blocks. If you are doing this, you will have to change or even
rewrite some code.
The above list proposes a new structure of the player code which is (I hope)
robust for a high number of players. It especially can handle the addition of
players while keeping the basic data of the old players using only a small
amount of memory.
You could also try to use the current structure which allocates the player as
a static variable at the start of the server (as done by only increasing
MAX_NUM_PLAYERS). It's the easy way out. But even doing this, you will have
to solve a lot of segmentation faults.
If I try the above and define a game with > 32 players, I hit an assert in the
team code after executing the start command:
Core was generated by `./server/freeciv-server'.
Program terminated with signal 11, Segmentation fault.
#0 0x0000000000480ee7 in real_sanity_check (file=0x5a0918 "srv_main.c",
function=0x5a162c "begin_turn", line=752) at sanitycheck.c:528
528 SANITY_CHECK(team_by_number(i)->players == count[i]);
(gdb) bt full
#0 0x0000000000480ee7 in real_sanity_check (file=0x5a0918 "srv_main.c",
function=0x5a162c "begin_turn", line=752) at sanitycheck.c:528
No locals.
#1 0x000000000040c0b9 in srv_main () at srv_main.c:752
__FUNCTION__ = "srv_main"
#2 0x0000000000404099 in main (argc=1, argv=0x7fff669f38a8) at
civserver.c:376
inx = 1
showhelp = false
showvers = false
option = <value optimized out>
__FUNCTION__ = "main"
I think there are a lot such small things to solve before it is working ... (I
did not further investigate this one).
Matthias
>
>
> - Andreas
>
> _______________________________________________
> Freeciv-dev mailing list
> [email protected]
> https://mail.gna.org/listinfo/freeciv-dev
--
Matthias Pfafferodt - http://www.mapfa.de
Matthias.Pfafferodt <at> mapfa.de
_______________________________________________
Freeciv-dev mailing list
[email protected]
https://mail.gna.org/listinfo/freeciv-dev