[Freeciv-Dev] Re: Safe paths for triremes etc. (PR#1007)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
--- Gregory Berkolaiko <gberkolaiko@xxxxxxxxxxx> wrote:
<snip>
> True, true. But, if done step by step, it can be more interesting ;)
> 1. introduce the variable ai_sees_all
> 2. then people who are changing goto code (like me) can add the
> corresponding checks.
>
Nothing suggested so far that you cannot do yourself. In all honesty,
auditing code is very boring. I should know, I've been auditing the
freeciv movement code for some weeks now. AAAARGH!!
It's clear to me that the software engineering part of our IT courses
dealing with sphaghetti code was necessary.
> > currently on another project though where I could use some help. It's
> > to do with movement code, I'm going to replace movecosts of 3 with 30.
> > Same for all other movement costs, multiply by 10.
>
> Oh, you are going to run into all sorts of trouble ;)
Oh Yes, most definately. Lots and lots of trouble, hence the request for
help.
> But presumably you want to make it possible for railroad to take 1/10 of
> a move point. A worthy cause I must say.
>
> > > this is not generating, it's cleaning up before generating.
> > > it should not be neccessary, if for some reason it causes weird
> > > behaviour, it is a bug. I remember checking it by comparing
> > savegames
> > > for autogames, they were identical.
> > >
> >
> > No I am not disagreeing with the change. I was just wondering why it
> > was there
> > in the first place.
>
> Something historical I presume. Goes back beyond 1.7.2
> In these times people believed in variable names like a,b,c,d...
>
> > Nicely done. One small step for the AI, a giant leap for the warmap
> > code.
>
> If warmap code leaps further than others it's because it is standing on
> the shoulders of giants.
>
> > - if (warmap.warunit == punit && !warmap.cost[punit->x][punit->y])
> > + /* If the previous warmap was for the same unit and it's still
> > + * correct (warmap.cost[x][y] == 0), reuse it. */
> > + if (warmap.warunit == punit &&
> > + (is_sailing_unit(punit) ? !warmap.seacost[punit->x][punit->y] :
> > + !warmap.cost[punit->x][punit->y]))
> > return;
> >
> > Air units are missing. So far this code only seems to deal with
> > land and sea. I think that air units have no use for the city warmap.
> > In fact, I'm not sure that sea units have much use for it either.
> > The city warmap seems to be useful only for land units.
>
> No warmaps for air units. It is extremely difficult to do warmap with
> refueling points: if a fighter can reach a point (x,y) in 1st turn with 1
> move left or in 2nd turn with 6 moves left, which one would you record
> down in the warmap?
>
Can you send a seperate email talking about all the problems with air units?
I've been considering it myself(No, I have no solutions, just possibilities).
Your example is eluding me. Clearly we would want the 1st move, if we can reach
a city or aircraft carrier in the 2nd move. Otherwise we would want the 2nd
turn
with 6 moves.
What do you think of the radical idea I have of stealing the Civ 3 approach?
Aircraft have a range (squares they can move to, probably about 20 squares in
each direction). When you want to attack a unit, if the unit is in range
of the aircraft, it goes and attacks and returns in the same turn. The aircraft
is not mobile as such, it cannot go in pursuit of a unit outside of its range.
You can change the base from which the aircraft operates. Aircraft are based
only
in cities or aircraft carriers. Again, a city or aircraft carrier has to be
within 20 squares of the original base.
__________________________________________________
Do You Yahoo!?
Find the one for you at Yahoo! Personals
http://personals.yahoo.com
- [Freeciv-Dev] Re: Safe paths for triremes etc. (PR#1007), Gregory Berkolaiko, 2001/11/02
- [Freeciv-Dev] Re: Safe paths for triremes etc. (PR#1007), Raahul Kumar, 2001/11/03
- [Freeciv-Dev] Re: Safe paths for triremes etc. (PR#1007), Gregory Berkolaiko, 2001/11/15
- [Freeciv-Dev] Re: Safe paths for triremes etc. (PR#1007), Raahul Kumar, 2001/11/15
- [Freeciv-Dev] Re: Safe paths for triremes etc. (PR#1007), Gregory Berkolaiko, 2001/11/16
- [Freeciv-Dev] Re: Safe paths for triremes etc. (PR#1007), Raahul Kumar, 2001/11/16
- [Freeciv-Dev] Re: Safe paths for triremes etc. (PR#1007), Gregory Berkolaiko, 2001/11/17
- [Freeciv-Dev] Re: Safe paths for triremes etc. (PR#1007),
Raahul Kumar <=
- [Freeciv-Dev] Re: Safe paths for triremes etc. (PR#1007), Gregory Berkolaiko, 2001/11/18
- [Freeciv-Dev] Re: Safe paths for triremes etc. (PR#1007), Ross W. Wetmore, 2001/11/19
- [Freeciv-Dev] Re: Safe paths for triremes etc. (PR#1007), Raahul Kumar, 2001/11/19
|
|