Tile-Based Flow Field Algorithm Visualization
"It's fast, efficient, and doubles as a vector field."
Game Developer known on Reddit as NonPotato shared a nice visualization along with a write-up showing how their system works before implementing it in the game. They created a tile exploration algorithm to generate flow fields and added multi-room traversal: each quadrant is treated as a separate room, with tiles stored in different arrays.
The demo has been slowed down, but the algorithm can reportedly handle large layouts (216 tiles) in about 1 ms. Moreover, it has linear time complexity, meaning its performance scales directly with the number of tiles being explored.
Another neat feature of this system is that it was designed to break the map into sections, and the data for each room can be reused independently. This means that recomputing the flow field will only update rooms where the path differs.
You can learn more about NonPotato's algorithm here, subscribe to our Newsletter, and join our 80 Level Talent platform, follow us on Twitter, LinkedIn, Telegram, and Instagram, where we share breakdowns, the latest news, awesome artworks, and more.