Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2002:
[Freeciv-Dev] FW: unit actions & popup menus
Home

[Freeciv-Dev] FW: unit actions & popup menus

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] FW: unit actions & popup menus
From: Martins Untals <M.Untals@xxxxxxxxxx>
Date: Mon, 6 May 2002 20:35:18 +0300

i have got some conversation with Raimar about my idea and stuff.
maybe you can give me some opinion too.
please read below :)

> > > On Mon, May 06, 2002 at 06:23:52PM +0300, Martins Untals wrote:
> > > >  
> > > > > Such changes have been proposed before. So for example 
> > > F_CARAVAN has
> > > > > been recently splitted into F_HELP_WONDER and 
> F_TRADE_ROUTE. The
> > > > > requirement for more of such splittings (and new 
> additions) is the
> > > > > extension for the number of flags available. Such change 
> > > will be made
> > > > > after the release.
> > > > 
> > > > hmm. no. 
> > > > 
> > > > F_HELP_WONDER and F_CARAVAN  will still be hard coded somwhere.
> > > > 
> > > > so atm if you move diplomat to city.
> > > > it sends one action POPUP_DIPLOMANT_MENU or somthing like that
> > > > to client.  in client gui part is hard coded what actions 
> > > to show and what of em to make enambled/disabled
> > > > by cheking if they are avaiable.
> > > > 
> > > > client gui shouldnt contain such cheks.
> > > > how diplomats acts now:
> > > > 
> > > > 1)client sends move packet to server
> > > > 2) server cheks if unit have flag F_DIPLOMAT or F_SPY
> > > >    a)server cheks if there is unit or city in target coords.
> > > > 3) if a is true server sends packet POPUP_DIPLOMAT_DIALOG  
> > > (or how it was called)  
> > > >    to client.
> > > >    packet contains:
> > > >   int action_type;
> > > >   int value;       
> > > >   int diplomat_id,
> > > >   int target_d
> > > > 4) client cheks if target_id is unit or city.client calls 
> > > function in gui.
> > > > 5) gui cheks if it is unit or city.
> > > >     unit then cheks if its diplomat or spie 
> > > >     and then cheks if player knows actions and disable ones 
> > > he dont know.
> > > >    
> > > > what i suggesting is:
> > > > 1)client sends move packet to server
> > > > 2) server cheks if unit have any avaiable actions agaisnt 
> > > move target
> > > >     a) looks what actions unit got defined in ruleset
> > > >     b) those actions will work against target?
> > > > 3) if a & b are true then server sends packet to client
> > > >    containing 
> > > >    unit_id,
> > > >    target_id,
> > > >    target_is_city_or_unit flag,
> > > >    array of action names,
> > > >    array of ints  // global number of each action name in array
> > > > 4) client popups dialog with names from array.
> > > > 5) user clicks on 'name_1'  
> > > > 6) client sends packet to server that user have clicked 
> > > action with global number 65
> > > > 7) server goes tru swich and stops at NAME_ONE_ACTION 
> which is 65
> > > > 8) server executes action
> > > > 9) server sends new packet to client of action requires it 
> > > >     (like poping up sabotage list)
> > > > 
> > > > advantages of such system:
> > > >    1)game logic is removed from client and client gui 
> > > >      eg all cheking for it is city or unit, can 
> > > diplomat/etc can do that action,etc
> > > >    2)more actions are much easier to add, as you need them 
> > > add only to server and can forget about client.
> > > >    3)modpacks can be made much more different from standard   
> > > > disadvantages
> > > >    1) if freeciv goal is only to make it to be totaly civ2 
> > > compatible then maybe there is no need for such changes
> > > >        as in civ2 only diplomats/spies  and caravans want 
> > > to popup dialogs (maybe thers other units?)
> > > 
> > > Civ2 compatibility isn't a "total goal". However I think 
> that such an
> > > flexible approach is overkill. If we have more actions it 
> may be nice
> > > to unify them. But I don't see currently such a huge amount of
> > > actions. Nevertheless you may want to freeciv-dev with 
> this since this
> > > above is my opinion on this.
> > 
> > u mean its worth sending to dev list?
> 
> Yes. Some people come with more exotic ideas.
> 
>       Raimar


[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] FW: unit actions & popup menus, Martins Untals <=