Repository navigation
feat: Add the flame_navigation package for path finding - #4259
Open
ufrshubham wants to merge 31 commits into
Open
ufrshubham wants to merge 31 commits into
ufrshubham wants to merge 31 commits into
Conversation
flame_navigation package for path finding
ufrshubham
marked this pull request as ready for review
December 1, 2026 19:50
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This adds
flame_navigation, a new package for path finding in Flame games.Flame has no path finding today. With this package, you bake the obstacles of your world into a
navigation grid once, and then agents find their way through it. You don't place waypoints or
build a graph by hand.
What the package has:
NavigationRegionbakes aNavigationGridfrom its sources, and finds paths through it.NavigationAgentis added as a child of a component. It finds a path to itstargetand movesits parent along it. With
autoMove: false, it only gives adesiredVelocity, for games thatmove their characters themselves.
HitboxNavigationSourcebakes the hitboxes of the world,ShapesNavigationSourcebakes shapes made in code, and you can write your own.
closest obstacle, and an agent only walks on the cells where it fits.
of some areas.
NavigationObstacleis for things that move, like doors and crates. Only the part of the gridaround them is baked again.
NavigationGrid.toBytesandNavigationGrid.fromBytessave and load a grid, so big levels canbe baked ahead of time and shipped as an asset.
debugMode, in the same way as hitboxes. Flags choose what is drawn: thegrid, the blocked cells, the areas, the clearance, the cells that a search explored, the paths
of the agents, and more.
NavigationBakerandAStarcan also be used without any components.1-click-to-move.mp4
2-agent-sizes.mp4
3-areas.mp4
4-obstacles.mp4
5-path-finding.mp4
Checklist
docsand added dartdoc comments with///.examplesordocs.Breaking Change?
Related Issues