Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2001:
[Freeciv-Dev] Re: [Patch] next_step_on_line
Home

[Freeciv-Dev] Re: [Patch] next_step_on_line

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: rf13@xxxxxxxxxxxxxxxxxxxxxx, freeciv development list <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: [Patch] next_step_on_line
From: Gregory Berkolaiko <gberkolaiko@xxxxxxxxxxx>
Date: Sat, 6 Oct 2001 17:12:21 +0100 (BST)

 --- Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx> wrote: 
> 
> The attached patch is my conclusion to the very long
> straightest_direction thread. And yes the _optimal_ solution to this
> whole problem can be put in a 110 lines patch.
> 
> It didn't show any failures during my testing.
> 
> If there no objections I will apply it and and finally close this
> thread.

Please do.

However the straightest direction is only used for connecting (roads and
RRs) and I plan to write a more flexible method for it in the nearest
future.

The idea is as follows: in freeciv geometry there are, in general, many
way to build the shortest road between two cities
( e.g. (0,0) -> (1,1) -> (1,2)  and (0,0) -> (0,1) -> (1,2) )
but some of these roads might take longer to build (because of mountains
or such like).  I would like to write a function which would map the
future road taking into account future road distance and time to build
it.
Advantages:
1. Less time to connect cities with roads
2. Takes into account existing roads
3. One can add additional weighting to the route selection, e.g. to pass
through other cities, to pass through squares which would get trade bonus
from the road etc.
4? Would make straightest direction obsolete.

Comments on the idea and suggestions for implementation are welcome.

Best wishes,
G.

____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie


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