This is the mail archive of the xconq7@sources.redhat.com mailing list for the Xconq project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

pathfinding refueling


There was some discussion on another thread about refueling,
so I though I would attempt to tie this together in its own thread.

I propose that only one material per unit type be considered for
refueling control during pathfinding. In the standard game, this
would be fuel. In bellum, there appears to be marine fuel and aircraft
fuel. If a unit type is under refueling control, then a path is invalid
if the unit does not have enough fuel to travel to a refuelling point at the
end of its trip, and it would have enough at the start.

The pathfinding is helper-ai, not "refereed" code, so we try to keep it out
of the GDL. A material is a candidate for "fuel" for a unit if
1) The storage of that material is greater than zero
2) The consumption per move, or base consumption, is greater than zero
3) The distance that the unit can receive the material is zero.

I cannot see any units that require more than one type of fuel. In
bellum for example, the "c" material is not a fuel because it has a
send/receive distance greater than zero. In the roman game, food is a
fuel though it is only consumed per turn.

The main reason only one material can be a fuel are as follows:
- To be within range, a final untaken trip is calculated to a supply
  point, and having multiple supply points makes it all too difficult.
- It would require a variable length array to be added to pathfinding
  structures, making it a bit cumbersome.

Refueling points are units whose capacity and current supply exceeds the
travelling units capacity, are either immobile or have a "refueling"
task. So an aircraft carrier could be assigned a refueling task to
support an invasion. It just sits there doing nothing while aircraft
automatically go to it, refuel, get ammo, and return to the attack.

I would add some code to take ammo as well if refueling.

Peter


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]