[Freeciv-Dev] Re: goto algoritm
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
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
[Freeciv-Dev] Re: goto algoritm, Thue Janus Kristensen, 2000/06/09
- [Freeciv-Dev] Re: goto algoritm, Nicolas Brunel, 2000/06/09
- [Freeciv-Dev] Re: goto algoritm, Jules Bean, 2000/06/10
- [Freeciv-Dev] Re: goto algoritm, Thue Janus Kristensen, 2000/06/10
- [Freeciv-Dev] Re: goto algoritm, Thue Janus Kristensen, 2000/06/10
- [Freeciv-Dev] Re: goto algoritm, Jeff Mallatt, 2000/06/12
|
|