[Freeciv-Dev] Re: path finding
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Thu, Aug 01, 2002 at 01:49:54PM +0100, Gregory Berkolaiko wrote:
> On Thu, 1 Aug 2002, Per I. Mathisen wrote:
>
> > Greg/Raimar,
> >
> > Are you planing to use the new path finding also in the server? The server
> > is currently used for path finding by the client only for aircraft (this
> > should be changed) and for aircraft rebasing on turn end (I want to
> > replace this, see another post, in any case we can use teleport instead).
> > Once we eliminate the two cases mentioned, we can move the server-side
> > goto from server/ and into ai/ and we give it some much needed cleanup. In
> > my opinion the server should not need to have access to any path finding
> > implementation, this is an AI and client issue.
>
> Yes. You are right. This is the goal, to make same path-finding usable
> by both client/agents and AI.
>
> > (Note that path walking is a different issue and should still be supported
> > by the server.)
>
> Right.
>
> > The aircraft goto in the client should use the same code as the other
> > client goto, and stop at maximum aircraft fuel range. I don't understand
> > why this isn't done already, it looks almost as if it was begun and then
> > just not finished for some reason.
>
> Aircraft goto involves refuel point hopping, something which is only done
> in the server. I have what I consider an improved refuel point hopping as
> part of the flying AI patch.
> Another way to do it is through is_position_dangerous callback in the
> future general p-f. That would be much slower than the present
> implementation I am afraid.
IMHO this is the right approach. We can make special code for this
(path_finding_air) but everything should go over the path_finding
interface and so is_position_dangerous should be used. It is also
possible that is_position_dangerous turns into a
get_safe_position_list (i.e. the current refuel list) for performance
reasons. Or we have both. It doesn't matter for me.
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
"How about the new language C&? No, that's not 'c ampersand', 'c reference',
'reference to c' or 'c and'. It's pronounced 'campersand', to confuse the
hell out of people who are unfamiliar with it, and it will, of course,
have no pointers."
-- Xazziri in comp.lang.c++ about C#
|
|