I don't want to rewrite it all, so here it is in code form. Remember that there are interceptors and bombers, and they are separate kinds of fighters, though each kind may have many different designs.
Also remember that we will have a queue of orders for units in combat.
Code: Select all
enum Type {
/** A fighter that is better at attacking other fighters than at
attacking ships. */
INTERCEPTOR,
/** A fighter that is better at attacking ships than at attacking
other fighters. */
BOMBER
};
/** The missions available to fighters. The notion of "weakest" is
intentionally left fuzzy. The weakest target is one that is
likely to die quickly, and also one that is unlikely to kill the
fighter. Some relative scaling should be employed to come up with
a single weakness value. */
enum Mission {
/** No mission set. This mission is treated as
ATTACK_FIGHTERS_BOMBERS_FIRST by interceptors, and
ATTACK_SHIPS_WEAKEST_FIRST by bombers. */
NONE,
/** Moves to a speficic location. Enemy presence will be ignored. */
MOVE_TO,
/** Attack a specific fighter group or vessel. */
ATTACK_THIS,
/** Defend a specific fighter group or vessel, by attacking its
attackers in order from weakest to strongest. */
DEFEND_THIS,
/** Moves to a speficic location. Movement will be interrupted to
engage targets as soon as they are found. Interceptors will
engage enemy fighters, and bombers will engage enemy ships. */
PATROL_TO,
/** Attack fighters without further direction, in order of nearest
to farthest bombers, then nearest to farthest interceptors. */
ATTACK_FIGHTERS_BOMBERS_FIRST,
/** Attack fighters without further direction, in order of nearest
to farthest interceptors, then nearest to farthest bombers. */
ATTACK_FIGHTERS_INTERCEPTORS_FIRST,
/** Attack ships without further direction, in order of weakest
to strongest. */
ATTACK_SHIPS_WEAKEST_FIRST,
/** Attack ships without further direction, in order of nearest
to farthest. */
ATTACK_SHIPS_NEAREST_FIRST,
/** Return to the fighter's base/carrier. Enemy presence will be
ignored. */
RETURN_TO_BASE
};
I tried to make the orders as specific to this type of game as possible. I don't want the user to be able to do absolutely anything -- that amount of choice is overwhelming. I want the user to be able to quickly and easily pick the smart move at any given time. So, we have orders like ATTACK_SHIPS_WEAKEST_FIRST, which is nearly always what you want. However, another common desire is to attack everything nearby, without losing the ability to switch your fighters to defense. Thus we have ATTACK_SHIPS_NEAREST_FIRST. I can't think of another sensible third tactic, so I stopped there. This is where you come in. If there are other winning tactics I've missed, bring them up now. This group has played enough of these games to know all the good and bad tactics. We won't include the bad ones.
Another thing I tried to do was allow micromanagers to completely control things by queueing up multiple specific missions (the first 3 I mentioned), while still allowing macromanagers to define more of a policy (the other missions). If we pick good policies, this will radically reduce micromanagement by allowing you to just set the right policy and forget it.
We may also want to consider disabling the specific orders in MP games, as a time saver. I for one would rather disinclude them altogether, but I figured that would be a pretty unpopular choice.
I've also considered having an order-all feature where you can command your entire fighter force to do the same thing from somewhere in the UI; you would still be able to give specific orders to specific fighters (or groups of fighters, or whatever the commandable unit size is).
Finally, we may want to have the policy-type orders stick, even combat-to-combat. This would mean that if I give a fighter unit the mission ATTACK_SHIPS_WEAKEST_FIRST, at the beginning of the next combat, if I don't give that unit any other orders, the default order will be ATTACK_SHIPS_WEAKEST_FIRST instead of NONE. As soon as I give another order, this default goes away, of course.
Please, no discussion on the size of a commandable unit or the way units are grouped -- let's save that for another thread.