Game Development Reference
In-Depth Information
The most common method of constructing hand-crafted response curves is to
save the data in a file. At run time, we read the data from the file into the response
curve in almost the same looping fashion as generating it from a function.
Retrieving the data uses the same process as we have discussed above.
D YNAMIC R ESPONSE C URVES
We can also generate data for a response curve at any point during run time. In fact,
as we will find, response curves are at their best when storing and selecting data that
is constantly changing. If we think of the buckets as decisions (e.g., “sugarless� vs.
“sugary�) and the sizes of the buckets as weights , priorities , or utilities for those
decisions, we can see how being able to selected a dynamically weighted decision
opens up many methods of adjusting and selecting behaviors. As the game runs,
we can change the weights by any method we choose. Any time the weights change,
we update the edges, re-sort the vector if necessary, and go about the business of
selecting our behaviors. We will deal with this process in more detail in the next few
chapters.
 
Search WWH ::




Custom Search