PathEngine home previous: 'CollapsibleGroup'next: Controls
Contents, Programmers Guide, Example Projects, Other Examples, 'CollapsibleGroup', Functionality Overview

Functionality Overview


The purpose of the demo is to show an implementation of formation movement:


The demo starts with a number of agents placed in an environment.
The agents can be individually selected or deselected, and movement orders dispatched.

Initial agent placement.

Agents form up into formation, as far as possible, but with formation breaking up where this is necessary to negotiate obstacle and move through narrow gaps.

A group, in formation.

The same group, with formation broken up to move through a narrow gap.

Basic mechanism

Clump assignment

Where agents are not all located within a certain range when a movement order is made, the agents are assigned into 'clumps' and movement orders then executed separately for each such clump.

This enables each clump movement order to be based on a single 'base path', and limits the number of long distance pathfinding requests to one single request per clump, per movement order.

(Local, short distance pathfinding requests are currently also used, to move to start positions, but in most cases these are not actually required, and will early out on a line collision test direct to goal.)

As implemented, each clump always takes the shortest path to the goal, even if there are slightly longer paths that would avoid traversing bottlenecks.

Corridor positions

The movement order for each clump is executed through a set of 'corridor positions' generated around the base path for that clump.

'Corridor positions' generated around a base path.

These positions are generated as required, with point collision queries, and then shared by all the agents in the clump.

Agent to agent interactions

Agents use a kind of 'slot allocation' mechanism to avoid overlapping each other as they move through the available set of positions.
There is no actual agent to agent collision checking involved in this mechanism, and agent positions are generated on each update by fast interpolation between pairs of corridor positions.

Documentation for PathEngine release 6.03 - Copyright © 2002-2021 PathEnginenext: Controls