Game Development Reference
In-Depth Information
building other things. A more colloquial way of saying this is that you could spend
your resources where you get the most “bang for your buck� at any given time.
Constructing the Formula
There are a number of different ways that we could construct formulas to express
the changing marginal utility of building the soldiers. Which one we choose de-
pends largely upon how we want our build manager to view the relative importance
of the soldiers.
For a simple example, we will use a linear function. This is similar to our caf-
feine example at the beginning of the chapter (Figure 8.1). There is a steady decline
from the first unit to the last. Let's assume we want to build 10 soldiers. As we dis-
cussed earlier, we are more interested in building the first soldier then we are in
building the tenth. If we were to start with a maximum utility of 100 for the first
soldier and reduce the utility by 10 points for each additional soldier, the utility of
the 10th soldier built would be 10. This could be expressed with the following for-
mula (in terms of the utility of the n th soldier):
This would yield the following utility values for the soldiers:
Soldier
Utility
1
100
2
90
3
80
…
…
9
20
10
10
Just as we have seen in our previous examples, the utility of the first soldier is
high. The second soldier is also important. While the 10th soldier does have a pos-
itive utility, it is relatively insignificant compared to the respective utilities of the
earlier soldiers. The marginal utility of each subsequent soldier decreases; the im-
portance of building each soldier after the first decreases.
One problem with this approach, however, is that it continues on in this fashion
beyond the 10th soldier. The 11th soldier would have a utility of zero, which is prob-
ably interpreted as being useless. Worse still, the 12th soldier would have a utility of
-10. The marginal utility has become negative. In other words, the importance
of acquiring this next soldier is actually detrimental. The implication is that we
 
Search WWH ::




Custom Search