Game Development Reference
In-Depth Information
Finish Him!
In a similar way, we can extend our Dude assault example from Chapter 14. If we
have selected our target, fired on him enough to almost kill him, and yet changed
to target someone else who has become even slightly more preferable, we are still
exposed to the threat of the original target. However, if we incorporate the utility of
finishing the job, we would decide to continue attacking the wounded warrior until
we have eliminated him. This is analogous to the mindset, “I have noticed that the
Dude over there is now important. I will need to attack him next… after I finish
killing this Dude.�
This is especially important in games where the offensive capabilities of a unit
are not reduced by the damage that it has sustained. For example, if we face four
dudes who can do 10 points of damage each second, it doesn't matter if they each
have 50% health remaining. We will still face all four of them and, as a result, con-
tinue to take 40 points of damage per second. On the other hand, if we had used the
same firepower over time to completely kill two of the four dudes, we would have
done the same amount of damage and yet reduced the damage to ourselves to 20
points per second instead of 40. The difference was, we finished the job . Taken to an
extreme, if we were to continue alternating between different Dudes, we could
theoretically face four Dudes who each have 1% health remaining—and are still
dishing out 10 points of damage per second each. Obviously, this is not an efficient
way to handle business.
We can return to the principles of increasing marginal utility (Chapter 8) to
help us bias our decisions and imbue our current course of action with some extra
momentum. We incorporated some of this already in our Dude assault algorithm
by using the amount of remaining health that a Dude had left (instead of his max-
imum health) in our calculations. To recall two equations from Chapter 14, we first
constructed TimeToKill out of some relevant information.
We then used two different TimeToKill values to calculate ThreatRatio .
The effect that the TimeToKill results had on ThreatRatio was linear, however. If
we replace the raw TimeToKillEnemy with a value that represents the marginal util-
ity of the time it would take to kill an enemy, we could increase the meaningfulness
Search WWH ::




Custom Search