Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2000:
[Freeciv-Dev] Re: goto algoritm
Home

[Freeciv-Dev] Re: goto algoritm

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: goto algoritm
From: Thue Janus Kristensen <thue@xxxxxxx>
Date: Thu, 8 Jun 2000 01:11:45 +0200

On Thu, 08 Jun 2000, Falk Hueffner wrote:
> Thue Janus Kristensen <thue@xxxxxxx> writes:
> 
> > Btw, if anyone wants to really improve the goto algoritm and warmap
> > generation for land units (x1.5 to x2 maybe) they should look replace the
> > queue with a priority queue.
> 
> I am really considering doing this. It would probably even speed up
> gotos to allow realtime sketching of the way taken on the map like in
> civctp, sometimes a nice feature.
> 
> If only we were using C++... I'm not exactly eager to write a priority
> queue myself...
> 
> BTW which would be the functions to replace? do_unit_goto and
> find_the_shortest_path?
> 
>       Falk

find_the_shortest_path() and really_generate_warmap()

As to realtime sketching the current algoritm is fine for that already,
but it would require the code to be moved to /common (not a bad thing)
and for changes in how the goto work, ie optionally saving a goto instead
of recalculation each turn (not a bad thing either).
Also, we would need to save the whole path of the goto in the server and
savegame (not too hard).

Are you sure there isn't a GPL'ed priority queue available somewhere? But
maybe we would wan't to make our own anyway.

-Thue



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