ABSTRACT

This chapter describes the systems of flow-field generation, flow sampling, and unit movement employed by Fieldrunners 2. The mobile tower defense game Fieldrunners 2 used a combination of vector flow fields and steering behaviors to efficiently simulate thousands of agents, referred to as units. The flow field represents the optimal path direction at every cell in the grid, and is an approximation of a continuous flow function. The flow field is generated via a modified traditional point-to-point pathfinding function. The flow-field generation technique used in Fieldrunners 2 was based on Dijkstra’s algorithm for simplicity and design reasons. More advanced pathfinding algorithms, such as Theta*, can generate smoother, more organic flow fields. Flow fields can be extended to incorporate alternate motivations and concerns for units by blending static and dynamic flow fields. Despite this potential improvement, static flow fields and steering behaviors provided a robust, realistic crowd simulation for Fieldrunners 2.