Obsidian
Obsidian copied to clipboard
Flow field pathfinding
Implement flow fields for entity pathfinding. There are some cases, where A* is not the best choice:
- If the graph that needs to be traversed is dense (A common example would be a grid-based graph) ✔️
- If you have hundreds of units attempting to path to the same location ✔️
- If the environment is highly dynamic ✔️
- If there is a constant need to change the position of units ✔️ (source)
Flow fields can be of great benefit for us. Some things to consider:
- Implementation may be difficult to get right (eg. caching fields)
- We may want to toggle between A* and Flow fields depending on distances and entity count
- Different entities may need somewhat different vector fields (eg. zombie x spider)
For now, A* should do just fine, but I would like to see this implemented in the future.