Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2001:
[Freeciv-Dev] Re: [PATCH] Unit movement
Home

[Freeciv-Dev] Re: [PATCH] Unit movement

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv development list <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: [PATCH] Unit movement
From: ccrayne@xxxxxxxxxxx
Date: Mon, 15 Jan 2001 13:42:23 -0800

In <20010115084754.A8047@xxxxxxxxxxxxxxxxxxxxxxx>, on 01/15/01 
   at 08:47 AM, Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx> said:

:[ snip description of code which does similar things as my csai-0.1 ]

Are the two of us the only ones who have some running code, or is there
anyone else who should be part of this discussion?

:This indicates you are checking at least some of the move conditions
:(can't move ground unit to ocean,...).

Yes. "can_unit_move_to_tile" can not be used verbatim, but it only takes a
couple of minutes to modify it for client use.

:The programming model would be event driven. In code which is
:"algorithmic" (for example a loop over every unit under control and
:issuing commands) I think such event driven programming isn't nice.

To play well, client ai code must be event driven, because each move can
reveal additional information about the terrain and the deployment of
other players units. For example, if an explorer with moves still
remaining suddenly finds itself next to an enemy unit, it still has time
to retreat.

:Suppose <http://arch.freeciv.org/freeciv-dev-200008/msg00248.html> is
:implemented with an extra result field and a serial number of command
:field. And if there would be a serial number in every command would this
:solve your problem?

I like the concept of the new event packet, which would make it
unnecessary to parse error messages. However, if this proposal is
implemented, I see no need for a serial to be sent with the command, or
returned with the response, since the proposed packet already has enough
fields to identify itself as a response to a command; provide a status
code; and identify the unit, city, or other entity, to which the command
applies.

Best,
        -- Chuck Crayne
-----------------------------------------------------------
ccrayne@xxxxxxxxxxx
-----------------------------------------------------------




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