Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2001:
[Freeciv-Dev] Re: [Patch] Extended connect dialog (PR#977)
Home

[Freeciv-Dev] Re: [Patch] Extended connect dialog (PR#977)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Andreas Kemnade <akemnade@xxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx, bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [Patch] Extended connect dialog (PR#977)
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 25 Sep 2001 18:30:26 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Tue, Sep 25, 2001 at 06:08:49PM +0200, Andreas Kemnade wrote:
> Raimar Falke writes:
> 
>  > > I think all exits should kill the server without asking. Does it make
>  > > sense to let the server run with dead stdio? One aim of this patch was
>  > > to make freeciv usable for people who don't know the difference
>  > > between server and client. 
>  > 
>  > What if somebody others joined the server and the client exits for
>  > reasons which aren't meaned to end the game (client crashs, user wants
>  > to change tileset,...).
>  > 
> client crashes: I don't want to mess with SIGSEGV handlers. So the
>                 server will survive.
> 
> the rest: 
> two possibilities:
> 1. Popup: "Do you want to save the game?"
> 

> 2. Menu item (Game menu) "Quit/End game" and "Quit client" instead of
>   "Quit" when
>    civclient has started the server. I think that would cause less
>    confusion. Users, who don't understand what a client is, won't
>    touch "Quit client". 

Ok.

Another problem. It would be nice if we don't put this new code in the
current code as it has been before but make a small design. Reasons:
 1) I notices while I was doing the auto connect that the client
 startup isn't an easy thing
 2) I don't want to get a lot of other "if(special_condition)" into
 the code
 3) I don't want to get code duplication among the clients

For the following I call the new dialog you have coded "main
menu". These are the nodes used:
 - game start
 - main menu
 - connect dialog
 - main window (the map window)

if "game start":
  if "auto connect":
     gosub "connect to server"
     goto "main window"
  else:
     popup "main menu"

if user chooses "new game" in "main menu":
  gosub "start server"
  gosub "connect to server"
  goto "main window"

if user chooses "load game" in "main menu":
  popup "file dialog"
  gosub "start server" with "-f"
  gosub "connect to server"
  goto "main window"

if user chooses "join game" in "main menu":
  popup "connect dialog"
  gosub "connect to server"
  goto "main window"

if user chooses "quit client" in "main window":
  ???

Is this correct till here? 

I would really like to see the logic above in the code structure. This
would allow us to skip various parts: for example a client command
line option "-f" could be used to start the server, load the game and
autoconnect the client. We may also need an option to skip the "main
menu".

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "I do feel kind of sorry for Microsoft. Their attornies and marketing
  force must have tons of ulcers trying to figure out how to beat (not
  just co-exist with) a product that has no clearly defined (read
  suable) human owner, and that changes on an hourly basis like the
  sea changes the layout of the sand on a beach. Severely tough to
  fight something like that."
    -- David D.W. Downey at linux-kernel


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