Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2003:
[Freeciv-Dev] Waypoints for path-finding
Home

[Freeciv-Dev] Waypoints for path-finding

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Gregory Berkolaiko <Gregory.Berkolaiko@xxxxxxxxxxxx>
Cc: freeciv development list <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Waypoints for path-finding
From: Raimar Falke <rf13@xxxxxxxxxxxxxxxxx>
Date: Mon, 31 Mar 2003 10:01:00 +0200

I want to convert the client goto (remove client/goto.c). It was
decided that I should preserve the waypoints-feature. So we have to
add waypoint support to the path finding. Suggested interface:

struct pf_path *pft_get_path(const struct pf_parameter *const parameter,
                             int end_x, int end_y,
                             int num_waypoints,
                             struct map_position *waypoints);

Reasons: a naive implementation creates a new map for every part
(start-1st waypoint, 1st-2nd,...) and assembles the paths together at
the end. I think this may be done without internal knowledge and so
can be placed in pft.

Another option is that the pf.c does it. Then we would pass in a
map. However I don't see that the implementation of this will just
came from the code we already have. IMHO we would have to extends pf.c
here and we can do the same in pft.c. So I prefer the first solution.

        Raimar
                          
-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "Es gibt sechs Milliarden Menschen auf der Welt - und 14 Milliarden
  Mikroprozessoren. Wir sind schon in der Minderheit."
    -- Peter Cochrane, Forschungschef der British Telecom



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