Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2003:
[Freeciv-Dev] Re: (PR#4242) Clean up the goto route network protocol and
Home

[Freeciv-Dev] Re: (PR#4242) Clean up the goto route network protocol and

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients:;
Subject: [Freeciv-Dev] Re: (PR#4242) Clean up the goto route network protocol and route execution
From: "Raimar Falke" <rf13@xxxxxxxxxxxxxxxxx>
Date: Mon, 19 May 2003 01:44:58 -0700
Reply-to: rt@xxxxxxxxxxxxxx

On Sat, May 17, 2003 at 09:22:14AM -0700, Gregory Berkolaiko wrote:
> 
> On Fri, 16 May 2003, Raimar Falke wrote:
> 
> > On Fri, May 16, 2003 at 10:23:37AM -0700, Gregory Berkolaiko wrote:
> > > I have a complaint on the "wait" bit too, though.  Why are you reinventing
> > > the wheel?  Path Finding implements the waiting by reinserting the
> > > position into the path.  We should keep it throughout the code, instead of
> > > converting from one format to another.  Just make goto_route_execute
> > > recognize this convention, instead of doing it in compact_path.
> > 
> > I think the wait bit has the clearer semantics. So I'm for changing
> > the path-finding to also return the information in this form. Since we
> > do only have a few users it is painless to change now.
> > 
> > Can both forms express the same? There may be differences which I
> > overlook.
> 
> They do the same, but "wait" is an extra byte per position in the packet.

If you are concerned about _this_ we can reduce it:
 - 1 byte for the direction and 1 byte for the wait bit
 - 1 byte for direction (3bit) and the wait bit (1bit)
 - 1 byte for direction (3bit) and the wait bit (1bit) for two positions

Just tell me how far you want to go.

> Also, I think that the path printout is more readable the present way.

The programmatic test however is more complex.

> But if you really want you can change it.

I would just move the compact function into path_finding.c and
postprocess internally all path which are given out. If you don't like
this it is also possible to construct_path. But you have to do this.

> On the other hand, the patch to support double-positions at the
> server is absolutel minimal.

But we get this more complicated piece of code in every other
execution engine. There aren't this many but at least GA.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
  Living on earth may be expensive, but it includes an annual free trip
  around the sun.




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