Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2002:
[Freeciv-Dev] Re: unit move handling cleanup (PR#1803)
Home

[Freeciv-Dev] Re: unit move handling cleanup (PR#1803)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: "Per I. Mathisen" <per@xxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx, bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: unit move handling cleanup (PR#1803)
From: Raimar Falke <rf13@xxxxxxxxxxxxxxxxx>
Date: Wed, 24 Jul 2002 16:43:55 +0200

On Sun, Jul 21, 2002 at 04:57:10PM -0700, Per I. Mathisen wrote:
> This is a rather big cleanup of unit movement handling. It

>  - moves a lot of ugly AI code out of general server code

This is good. Can you make a patch which only does this?

>  - encapsulates some AI code behind a packetable interface

No problem if this makes the AI code more portable.

>  - changes barbarians so that they can move over huts, but
>    they will not scoop them up. so you can attack a barbarian
>    and be surprised to find that you also stumbled into a hut.
>    I think this is a fair price to pay for generalising away
>    a rather nasty barbarian exception, which would halt its
>    gotos without any advance warning.

The reason you give (rather nasty barbarian exception) isn't valid if
part point above is implemented.

>  - changes what happens when diplomats and caravans move into
>    a city or unit. there used to be lots of exceptions for these
>    units in the lowest level movement code, these have all but one
>    been moved into the client.

I'm not sure if a more smarter client is what we want in this case. In
any case the code should be moved from client/control.c into common/
or client/*_common so that it can be used by other code.

>  - the one remaining exception: a diplomat that moves into an
>    allied city whose owner mysteriously has lost his embassy (this
>    can only happen because of Marco Polo's, i think). in this case,
>    we automatically establish an embassy.

>    i intend to fix this differently later (treaties should be broken
>    if you lose your embassy with your treaty partner).

IMHO we should do this before and not after.

>  - i have added a new server feature: autodiplomats. this is simply a new
>    diplomat action in which the server attempts to do something useful
>    with the diplomat against a given target. the reason for this feature
>    is to avoid the drudgery of client diplomat popups (my diplomats
>    always die while I click around on the popup) while avoiding the
>    simpleton autobuy client hacks. this feature will also be used for
>    ai diplomats (yes, i am working on activediplomats patch now, it
>    contained some grevious errors that i have to fix, tho). i made it
>    prefer tech theft over incite, which may not be a good idea. i am not
>    sure.

I can bake an agent which does this. Client based and faster than the
human defender.

> Please read, test and comment. It is now out of the design stage and I am
> considering it soon committable.
> 
> I will delay my cleanup raid of the client goto code until Raimar and
> Greg's path finding code hits cvs, and I will probably leave the server
> code alone too. Kind of depends on how frustrated I get with it while
> attempting to hack the active ai diplomats patch to work with that crap...

Lets take them step by step.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
  "The primary purpose of the DATA statement is to give names to
   constants; instead of referring to pi as 3.141592653589793 at every
   appearance, the variable PI can be given that value with a DATA
   statement and used instead of the longer form of the constant. This
   also simplifies modifying the program, should the value of pi
   change."
    -- FORTRAN manual for Xerox Computers


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