ABSTRACT

This chapter describes the statistical properties of normally distributed random walks and shows how player can be shaped and manipulated so that they remain unpredictable while also being subject to scripted constraints and responsive to player interaction. It also describes how to generate a simple random walk and discusses some of its limitations. The chapter shows how to overcome those limitations using the walk's statistical properties to efficiently sample from it at arbitrary points in its past and future. It also discusses how to fix the values of the walk at specific points in time, how to control the general shape of the movement of the walk between them, and how to limit the walk to a specific range of values. The chapter focuses on how to generate random walks with arbitrary probability distributions and to allow for player interaction. It presents C++ source code for all the techniques.