|
|||
|
Coordinated Unit Movement |
|||
|
By
Originally |
Planning
is a key element of unit cooperation. All of these predictions and calculations
should be as accurate as possible. Inevitably, though, things will go
wrong. One of the biggest mistakes we made with the Age of Empires' movement
was to make every decision within a single frame of reference. Every decision
was always made correctly, but we didn't track that information into future
updates. As a result, we ended up with units that would make a decision,
encounter a problem during the execution of that decision, and then make
a decision that sent them right back on their original path, only to start
the whole cycle over again the next update. Planning fixes this tautology.
We keep around the old, resolved collisions long enough (defined by some
game-specific heuristic) so that we can reference them should we get into
a predicament in the future. When we execute an avoidance, for example,
we remember what object it is that we're avoiding. Because we'll have
created a viable resolution plan, there's no reason to do collision checking
with the other unit in the collision unless one of the units gets a new
order or some other drastic change takes place. Once we're done with the
avoidance maneuver, we can resume normal collision checking with the other
unit. As you'll see next month, we'll reuse this planning concept over
and over again to accomplish our goals.
|
||
| Basic
Definitions
|
|||