pathfinder library
A Dart library for autonomous agent steering behaviors, inspired by Craig Reynolds' work. Designed for performance, customization, and modularity, compatible with Flame Engine.
Classes
- Agent
- Represents an autonomous agent in the simulation that can be steered.
- Alignment
- Alignment steering behavior: steers towards the average heading of local neighbors.
- Arrival
- Arrival steering behavior: directs the agent towards a target and decelerates.
- AStarFinder
- A pathfinder that implements the A* (A-star) search algorithm.
- BestFirstFinder
- A pathfinder that implements the Best-First Search algorithm.
- BiAStarFinder
- A pathfinder that implements the Bi-directional A* (A-star) algorithm.
- BiBestFirstFinder
- A pathfinder that implements the Bi-directional Best-First Search algorithm.
- BiBreadthFirstFinder
- A pathfinder that implements the Bi-directional Breadth-First Search (Bi-BFS) algorithm.
- BiDijkstraFinder
- A pathfinder that implements the Bi-directional Dijkstra algorithm.
- BreadthFirstFinder
- A pathfinder that implements the Breadth-First Search (BFS) algorithm.
- CircleObstacle
- Represents a circular obstacle defined by a center position and a radius.
- Cohesion
- Cohesion steering behavior: steers towards the center of local neighbors.
- Containment
- Containment steering behavior: keeps an agent within a boundary.
- DijkstraFinder
- A pathfinder that implements Dijkstra's algorithm.
- Evade
- Evade steering behavior: flees from a predicted future position of a target agent.
- Flee
- Flee steering behavior: directs the agent away from a target position.
- Flocking
- Flocking steering behavior: simulates group movement like birds or fish.
- FlowField
- Represents a 2D grid-based flow field (also known as a vector field).
- FlowFieldFollowing
- Flow Field Following steering behavior: aligns agent movement with a flow field.
- Grid
- Represents the 2D grid map used as the search space for pathfinding algorithms.
- Heuristics
- Provides a collection of common, static heuristic functions suitable for grid-based pathfinding.
- IDAStarFinder
- A pathfinder that implements the Iterative Deepening A* (IDA*) algorithm.
- JumpPointFinder
- A pathfinder that implements the Jump Point Search (JPS) algorithm.
- LeaderFollowing
- Leader Following steering behavior: makes an agent follow a designated leader.
- Node
- Represents a single node or cell within a pathfinding Grid.
- Obstacle
- Base interface for representing static obstacles in the simulation environment.
- ObstacleAvoidance
- Obstacle Avoidance steering behavior: steers to avoid static obstacles.
- OffsetPursuit
- Offset Pursuit steering behavior: maintains a specific offset from a moving target.
- OrthogonalJumpPointFinder
- A pathfinder that implements a variation of the Jump Point Search (JPS) algorithm restricted to orthogonal (horizontal and vertical) movements only.
- Path
- Represents a predefined path for agents to follow using PathFollowing.
- PathFinder
- Abstract base class for all grid-based pathfinding algorithms.
- PathfindingUtils
- Provides static utility functions for post-processing paths (List<Node>) generated by PathFinder algorithms.
- PathFollowing
- Path Following steering behavior: guides an agent along a predefined Path.
- Pursuit
- Pursuit steering behavior: intercepts a moving target agent.
- RectangleBoundary
- Represents an axis-aligned rectangular boundary area.
- Seek
- Seek steering behavior: directs the agent towards a target position.
- Separation
- Separation steering behavior: avoids crowding local neighbors.
- SteeringBehavior
- Abstract base class for all steering behaviors.
- SteeringManager
- Manages a collection of SteeringBehavior instances for a single Agent.
- UnalignedCollisionAvoidance
- Unaligned Collision Avoidance steering behavior: avoids moving agents.
- VectorUtils
-
Provides static utility functions for common operations on
Vector2objects, particularly those useful in steering behaviors and physics calculations. - WallFollowing
- Wall Following steering behavior: guides an agent along walls.
- WallSegment
- Represents a straight wall segment defined by two endpoints.
- Wander
- Wander steering behavior: produces seemingly random, natural-looking movement.
- WeightedBehavior
- Internal helper class to associate a SteeringBehavior with a weight.
Typedefs
- HeuristicFunction = double Function(int dx, int dy)
- Defines the function signature for heuristic functions used in pathfinding.