Jump to content
  • Advertisement
Sign in to follow this  
sled

A Pathfinding Optimization Using Flood Fill

This topic is 3666 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
It's a useful technique. It's already a fairly well-known technique, generally called "connected component labeling" or similar, but congrats for rediscovering it. BTW, when doing pathfinding or similar operations, you'll generally refer to the "flood fill" algorithm as a "breadth first" traversal. The term "flood fill" is generally used (to refer to the same algorithm) when you're discussing computer graphics or computer vision.

Share this post


Link to post
Share on other sites
It was taught to me, I didn't come up with it myself. But apparently not with the correct terminology. Thanks.

Share this post


Link to post
Share on other sites
The actual application of this technique to pathfinding is known as the "Distance Transform Algorithm".

Share this post


Link to post
Share on other sites
Are you sure? The top two google hits for "Distance Transform Algorithm" are not the same...

Did you guys at least like the demo?

Share this post


Link to post
Share on other sites
Quote:
Original post by sled
Are you sure? The top two google hits for "Distance Transform Algorithm" are not the same...
Don't worry, what you described in your blog post is 100% accurate, including the use of the "flood fill" terminology. They're talking about something entirely different.

More specifically, you're talking about using flood fill to identify connected regions of a map, coloring them uniquely. Your colored map would be used to determine in O(1) time whether a path exist from A to B. They are talking about another application of "flood-filling" (really breadth-first search) to actually _computing_ the path from A to B.

Yours is a good post. Keep it up.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!