This is the mail archive of the
xconq7@sources.redhat.com
mailing list for the Xconq project.
RE: Side Mask
- From: Lincoln Peters <peters2000 at mindspring dot com>
- To: Hans Ronne <hronne at pp dot sbbs dot se>
- Cc: Stanley Sutton <sutton at t-surf dot com>, Xconq mailing list <xconq7 at sources dot redhat dot com>
- Date: 23 Jul 2002 15:55:50 -0700
- Subject: RE: Side Mask
- References: <l03130302b9637f42c4e0@[217.115.38.45]>
On Tue, 2002-07-23 at 15:07, Hans Ronne wrote:
> That I can agree with. A more modular worth code would be easier to
> maintain. And if we add support for doctrines, I think much of what you
> suggested can be achieved. But it's not a trivial thing to do.
Some parts of the new exploring_worth function would be easy to put into
their own functions. If the range code was put in its own function,
finding the range of a unit would be quite easy throughout the AI code.
For example, a planning function could determine if a unit could make it
from one place to another with an "if" statement as simple as:
if ( rangeOfUnit(u) > distance(x1, y1, x2, y2) )
Of course, in that case, the AI should also look for a safe path (e.g.
in fantasy.g, don't send cavalry over mountains or swamp), but that kind
of code should probably be placed in the pathfinding algorithm.
I'm not sure how useful it would be to put the mobility code in its own
function, but it certainly could be done.