<URL: http://bugs.freeciv.org/Ticket/Display.html?id=39872 >

> [wsimpson - Fri Feb 22 07:29:28 2008]:
> 
> Originally had thought about client.player, but changed
> it to .playing after considering the meaning.  In freeciv,
> "player" is the civilization, not the user.  That's what's
> somewhat confusing.
>
I think that reasoning could work for both "playing"
and "player"; it is just that 'client.playing' struck
me as some manner of boolean variable when I first saw
it (of course a quick bounce via cscope to the decla-
ration cleared up that misconception). Anyway it is a
very minor quibble, and this way (with "playing") at
least there is not a search ambiguity with 'struct
player' (were it "player").

 
> The clients are playing (or observing) the civilization.
> 
I like to use a slightly more precise terminology:
- server: an entire civserver.
- client: an entire civclient.
- connection: a client that can connect to a
  server. Can be detached, an observer, or control
  a player.
- player: a game entity. A player can have zero
  or more connections attached to it, though only
  one controlling connection (the rest being
  observers).

"Connection" corresponds to 'struct connection' and
"player" corresponds to 'struct player'. A "player"
is a civilization (so the terms are interchangeable).
Unfortunately at the moment a "connection" appears to
be used to represent both a network connection and
a user (e.g. 'struct connection' contains both low-
level networking fields and user-related fields such
as 'username' and 'access_level'). This is not really
a problem at present (since it is used only to handle
connections by clients/servers), but separating the
two might be beneficial for example to implement non-
blocking metaserver communication (a "connection"
would be made to the metaserver, its write buffer
filled with the POST request, and the main select loop
could be used to wait for writability).

Yes rather off-topic. But the metaserver (meta.freeciv.org)
is not responding today (again) so it is painfully
reminding me of this inconvenience. :(

_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to