Archived

This topic is now archived and is closed to further replies.

Dauntless

Interrelationship between Orders, Commanders and Units

Recommended Posts

*Warning...sorta programming related* While I was specifically trying to nail down my concept of Orders, I realized that Orders and class functions of Units were essentially the same thing. When I tried to peg down the most abstract concept I could for what a Unit is, the only thing I could think of was, "It takes Orders". Plus, if you think about it, when you click on a unit in most RTS games and tell it to attack something, you have essentially modeled the reality of a commander issuing an order to that unit to attack a target. Furthermore, not only were Orders and class functions essentially intertwined, since Commanders could issue them it was necessary to figure out all the elements of a Commander that affects the Order object itself. So I really needed to figure out what Commander objects could do, and more importantly what they should (and should not) do. Since all Units | Clusters | BattleGroups have as their defining characteristic that they can take orders, I figured I'd start with this my superclass declaration of a Unit to do simply that. In my game not all Units can attack, not all units can defend, and not all units may even be able to move (buildings). However, all Units must be able to take Orders...either directly from the player or from the AI Commanders. So I realized that Orders had to have several characteristics to them. At a minimum so far, I've found three that I can think of: 1. Who made it- this will determine it's priority rating (if the player made it, it has the highest priority, if a General made it, it has a higher priority than a Major, etc.). 2. Who carries out the order- the recipient of the Order. 3. Target of the order- who is the order carried out on. Once the recipient of the Order is known, the Order figures out who is the target of the Order (it could either be another target, or itself). For example, let's say a Major sends an Order to Move(). Since the Major controls two companies, the Order first checks the priority of the Order and makes sure no other higher ranking orders exist. If there is none, it checks to see who the recipient of the Order is. Once the recipient is handed the Order, the appropriate function call is made with the target parameter being (in this case) itself. Now here's my list of questions to everyone out there: 1. Can you think of any other parameters or intrinsic elements necessary for Orders? 2. Since Orders and Unit functions are correlated, should I handle Orders with the Polymorphic ability to override base functions in the Order class with specific functions of the Unit? Or just make specific function calls to each unit? 3. What kinds of attributes in a Commander object can affect how Orders are sent? For example a short list: a) Charisma- helps determine how well he can control morale b) Leadership- determines UnitIntegrity range c) Offense- how good offensive tactical skills are d) Defense- how good defensive tactical skills are e) Communication- how effective commander is at getting support 4. I'd like Commanders to be able to have limited autonomous capabilities...how much reign is free reign though? What should they be capable of doing independently? 5. Going with #4 above, what kind of personality traits should Commander objects have that would influence their behavior? Short example list: a) Aggression- how aggressively the commander goes into battle (NOT rage, but is officer more timid or aggressive?) b) Temperment- does the Commander become undisciplined easily (not follow orders) c) Courage- what is the morale of the officer d) Initiative- does the Commander wait for orders, or follow up on opportunities? (though this begs the question of seeing opportunities) I realize that this is a really multi-faceted post, but hopefully I'll get some feedback on this. I may post seperate topics on Orders, Commanders, and Unit functions seperately if this is too confusing. [edited by - dauntless on January 17, 2003 12:13:46 AM]

Share this post


Link to post
Share on other sites
christ alive! interesting problem...

RE: 4), if the commander commands a few groups of units and you give the commander an order like "capture and defend this area" the commander should issue sub-orders to groups and individual units in order to complete the objective as it sees fit.
the commander should probably be able to request extra unit groups from other commanders (who may refuse) and divide/combine units if it has to.
since the player is the overriding authority, there should be a "revert" command to undo the unit group ownerships/partnerships altered by the commander''s autonomy.

the main principle here is that the player doesn''t have to micromanage, but they can do so if they have a better idea than the commanders

NB if the player captures a unit or group in use by a commander, the commander should try to aquire more units or reorganise the ones it has.

if the game has resources (C&C style) then the commanders should have the autonomy to spend money on new units within limitsd set by the player (eg no more than X credits per minute)

likewise, if a unit can be sold, the commander should be able to re-organise and raise cash for the extra powerful unit it needs (and block purchases by other commanders, and warn the player if they try to spend too much, and let the player resolve (rare)disputes)

cooperation should exist between commanders. again, they can establish their own partnerships (as long as there''s no conflict of interest) and take by force of rank the command of another commander''s units (also aquiring the objectives of that subordinate)

in this spirit, a commander should be able to delegate sub-objectives to lower rank commanders to be further divided according to their abilities (eg if a commander specialises in violence but is given a stealthy objective, pass it on to a stealth specialist)

********


A Problem Worthy of Attack
Proves It''s Worth by Fighting Back

Share this post


Link to post
Share on other sites
Walkingcarcass-
You bring up something I''ve never thought of before....generals as advisors (or even just advisors)

For example, to run the economy, you could have Commander objects that didn''t lead troops, but instead controlled the economy. Give them a list of conditions and parameters and let them do the work.

As for your other suggestions, it seems reasonable, though I haven''t put much thought into Mercenaries (though they do exist in my game world....although they are more independents than true mercenaries).

As for sub-delegation, this is exactly what I want. I want high ranking generals to give more abstracted order that the sub-Commanders follow through on. However, since I have no AI experience whatsoever, I have no idea how to do this I finally decided to read up a little on Genetic Algorithms and Neural Nets, but I have no idea how they would apply to by Commander''s autonomous agent ability.

Share this post


Link to post
Share on other sites