Complete.Org:
Mailing Lists:
Archives:
freeciv-dev:
October 2002: [Freeciv-Dev] Path-finding code (with danger). |
[Freeciv-Dev] Path-finding code (with danger).[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Hi Raimar, (and others, please don't feel excluded:) Attached are my latest path_finding.[ch] and a tiny patch to wire it to the explorer code. Load the attached game, hit "X" on any unit, a path is found to (21,40). Grassland is considered dangerous, tiles with x-coord >= 20 give 6000 extra cost. Just for testing. It's fully functional. Dangerous tiles don't give extra costs. Paths seem to be right. There is a problem though: because dangerous tiles don't give extras, a path actually prefers to pass through danger :( Three solutions to that: 1. Ignore it 2. Try to find paths across danger taking into account COP as well. I have an idea, need to check it. 3. Ignore extra cost on _all_ tiles unless we stay there overnight. Can we do it? In any case, please read, comment (in the code and otherwise) and change what you feel should be changed. Whatever we decide to do about danger+extra, I feel we should speedily go towards inclusion. And I won't have much time in the next weeks, so please help me. Best wishes, G.
pf.tar.gz
pf.diff
t7.gz
|