Game Development Reference
In-Depth Information
From Bars to Buckets
If we were to turn the bars on their sides, however, and lay them end to end, we
change our perspective. The bars are still in the same proportion as they were before:
4 to 1. By placing them in this orientation (Figure 12.1, right side), we can see how
they lie across what is now an x -axis. In this example, the “yes� answers run from 0
through 4 and the “no� answer is the single unit between 4 and 5.
We can refer to these ranges as buckets —a name that makes sense when you
extend the metaphor slightly. Imagine a game of randomly dropping a ball into
these buckets (not too dissimilar from the game Plinko from the game show, The
Price Is Right ). If the ball drop is truly random, it would have a 4:1 chance of land-
ing in the “yes� bucket. This is a result of the “yes� bucket being four times as big
as the “no� bucket.
Now, because these are not real buckets and we are not dropping a real ball, we
have to simulate dropping a ball into the buckets. To do this, we generate a random
number between 1 and 5. By referring to the number line below our buckets, we
can determine which number corresponds to which bucket. For example, if we
were to roll a 2 (using our dice terminology again), we would let that signify that
our random ball has fallen into the “yes� bucket. In fact, if we were to roll a 1, 3, or
4, our ball would have landed in the “yes� bucket as well. On the other hand, if we
were to roll a 5, our ball would have landed in the “no� bucket. The difference is
that the ball landed on the other side of the edge that defines the separation be-
tween the buckets—in this case, the edge is 4.
In such a simple example, all of this seems rather obvious. However, as we shall
see, there is a lot of potential wrapped up in this method of approaching random
selection.
Adding More Buckets
For a slightly more involved scenario, let us return to another example from the pre-
vious chapter. When we were trying to re-create the results of the Guess Two-Thirds
Game, we identified four segments of the population that had distinct characteristics.
Each of those four types of guessers had their own method of approaching the game.
We also identified what we believe to be the relative occurrence percentages of the
four groups. To reiterate:
Group
%
“33� guessers
4
“22� guessers
3
Random guessers
30
Semi-logical guessers
63
Search WWH ::




Custom Search