/Flowfields

An implementation of a 2D flowfield using the A* pathfinding algorithm in C#, with a Unity3D demo provided.

Primary LanguageC#

2D Flowfield Navigation

This repository is a demonstration of a flowfield. Each grid tile points to the direction of the target. Flowfields are a great optimisation when you have many agents that wish to navigate towards a singular target. This is a common technique used in RTS games.

This demonstration is not made with optimisation in mind but there are many ways to optimise it such as the use of threading or even GPU processing.

NOTE


This repository requires my A* Pathfinding Algorithm Repository to work since it uses the A* pathfinding algorithm to calculate the flowfields. So make sure you import that repository aswell.

Preview

Source

Helpful sources to learn the algorithm:

PDF :: Crowd Pathfinding and Steering Using Flow Field Tiles