[Freeciv-Dev] Re: [PATCH] Unit movement
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Saturday 13 January 2001 01:32, Raimar Falke wrote:
> The other introduces a feedback mechanism. Currently there is no easy
> way on the client side to get the result of an operation carried out
> by the server. One way to address this problem is to send an
> information request after the command request and compare the received
> information with the current. Another way is to duplicate a lot of
> conditions which are checked on the server in the client. Yet another
> way is to request an result code from the server. This is the way
> which is implemented in the patch. Currently only the movement of a
> unit is covered (after working on it I think it must the most complex
> process). The unit move request got two additional fields: dry_run and
> report_result. dry_run will only test almost all conditions and will
> not do the final changes. report_result sends in every case (success
> or failure) a result packet back to the client. With these flags code
> on the client side can test movement in a predictable way.
Dry-run is a bad idea, IMO. When doing AI calculations you need to test lots
of moves (just imagine finding a goto route), and asking the server over a
slow internet connection per consideration is not an option. Just copy the 50
lines of code that do the check, dammit! :) Maybe put it into common if you
really hate copying it. We have the capstrings for ensuring compatability
across versions.
Oh, and please conform to freeciv coding style. ie indentation, and an if
looks like
if (???) {
!!!
}
> Currently the result codes are a bit unsorted. It may be better to
> organize them hierarchical. The reporting of the result code can be
> merged with text messages. I remember a discussion about client side
> message generation. What was the result?
I personally liked the idea very much and is still waiting for someone to
show me the implementation.
> Raimar
-Thue
- [Freeciv-Dev] [PATCH] Unit movement, Raimar Falke, 2001/01/12
- [Freeciv-Dev] Re: [PATCH] Unit movement,
Thue <=
- [Freeciv-Dev] Re: [PATCH] Unit movement, Raimar Falke, 2001/01/13
- [Freeciv-Dev] Re: [PATCH] Unit movement, Gaute B Strokkenes, 2001/01/13
- [Freeciv-Dev] Re: [PATCH] Unit movement, Raimar Falke, 2001/01/13
- [Freeciv-Dev] Re: [PATCH] Unit movement, Greg Wooledge, 2001/01/13
- [Freeciv-Dev] Re: [PATCH] Unit movement, Raimar Falke, 2001/01/14
- [Freeciv-Dev] Re: [PATCH] Unit movement, Falk Hueffner, 2001/01/14
- [Freeciv-Dev] Re: [PATCH] Unit movement, Gaute B Strokkenes, 2001/01/14
[Freeciv-Dev] Re: [PATCH] Unit movement, Raimar Falke, 2001/01/14
|
|