Game Development Reference
In-Depth Information
In the example in Figure 13.1 (right), the fourth bar is the front-runner with a
value of 16. Later on, the top score may be 32, for example. At that point, a score of
16 (0.50) doesn't look so hot.
Also, because of the automatic scaling of this method, the relative differences
between scores yield important information. When the top score is 16, the differ-
ence between the scores of 12 and 9 are fairly significant: 0.75 - 0.56 = 0.19.
However, if the top score is 32, the scores of 12 and 9 are 0.375 and 0.281, respec-
tively. The difference between them is only 0.09 now. If the top score is 100, that
difference drops to 0.03. For all intents and purposes, when compared to a value of
100, the scores of 12 and 9 are becoming identically poor.
As a variation, we don't have to use the greatest value as our comparison point.
At times, it may be beneficial to use the lowest value instead (Figure 13.3). For
example, if we were concerned with the least time in which an action could be per-
formed (as opposed to the highest score), we might want to rate the other options
by comparing them to the quickest one. Once again, using our original four values,
we recalculate their weights relative to the smallest of the four—the third bar's size of
7. The method that we select will depend on the problem we are trying to address.
FIGURE 13.3 The value to which we compare the other scores does not have
to be the maximum. At times, we may want to know how the other scores
compare to the lowest selection.
G RANULARITY
Another issue that we need to be mindful of when scaling our weight scores is
granularity . This is comparable to the concept of significant digits in science and
math—often with the description of superfluous precision. For our purposes, we can
think of it in terms of the accuracy to which we need to either calculate or keep
track of something.
 
Search WWH ::




Custom Search